running centos release tarball on debian

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

running centos release tarball on debian

Garry Hodgson-4
We are using a jenkins build server on centos to create our releases,
using rebar3. The deployed release tarball includes the erlang runtime.
Recently we needed to deploy it on a remote system that runs Ubuntu. The
developers used a tool called alien to convert the .rpm that installs
the release tarball into a .deb package that Ubuntu expects.

The application won't start, complaining that it can't find libcrypto,
though OpenSSL is installed. I'm guessing that the compiled erlang
runtime, having been built for centos, is looking for libs in different
places, perhaps with different names.

Is there a way to make this work by working around with env vars,
symlinks, or other post-buld kludgery? Or do we need to just bite the
bullet and set up a Jenkins build server for ubuntu? Are others
deploying releases on different Linux distributions? Any suggestions or
lessons learned would be appreciated.

Thanks



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: running centos release tarball on debian

Stanislaw Klekot
On Mon, Dec 12, 2016 at 04:31:42PM -0500, Garry Hodgson wrote:
> We are using a jenkins build server on centos to create our
> releases, using rebar3. The deployed release tarball includes the
> erlang runtime. Recently we needed to deploy it on a remote system
> that runs Ubuntu. The developers used a tool called alien to convert
> the .rpm that installs the release tarball into a .deb package that
> Ubuntu expects.

Erlang programmers, meet Linux sysadmins. Linux sysadmins, meet Erlang
programmers. You can _finally_ make acquaintance.

> The application won't start, complaining that it can't find
> libcrypto, though OpenSSL is installed. I'm guessing that the
> compiled erlang runtime, having been built for centos, is looking
> for libs in different places, perhaps with different names.

Of course it is. Even if it could find OpenSSL libs, there are high
chances it would die on missing symbols or some other linking error.

There's also the thing of host OS' architecture (i386 vs. amd64 (Debian)
or i386 vs x86_64 (Red Hat)), though I doubt it somehow.

> Is there a way to make this work by working around with env vars,
> symlinks, or other post-buld kludgery? Or do we need to just bite
> the bullet and set up a Jenkins build server for ubuntu?

Either you bite the bullet or build a release without including ERTS,
leaving the task of providing it for deployment phase. Then receivers of
your release would need to compile Erlang at most.

> Are others
> deploying releases on different Linux distributions? Any suggestions
> or lessons learned would be appreciated.

I don't think many of Erlang programmers pay attention to working along
with their OS. Otherwise we wouldn't have that poor cooperation between
Erlang and package systems with initscripts.

--
Stanislaw Klekot
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: running centos release tarball on debian

Dmitry Klionsky-2
In reply to this post by Garry Hodgson-4
To build for different OSes I use different docker images. Here's
https://github.com/ten0s/alley-docker docker setup I developed at my
previous job,
but admins didn't want(know?) to put it under Jenkins so you will see a
lot of other stuff. Look at centos{5,6} dirs for examples.

Now almost the same docker setup, but for centos7 and centos5.i386 runs
under Jenkins on AWS.
On success I put tarballs to S3.

Your task would be to create a new image for Ubuntu and install needed
build deps.

I like this approach because it allows to have a simple Jenkins slave
with only docker and Jenkins agent on it.


On 12/13/2016 12:31 AM, Garry Hodgson wrote:

> We are using a jenkins build server on centos to create our releases,
> using rebar3. The deployed release tarball includes the erlang
> runtime. Recently we needed to deploy it on a remote system that runs
> Ubuntu. The developers used a tool called alien to convert the .rpm
> that installs the release tarball into a .deb package that Ubuntu
> expects.
>
> The application won't start, complaining that it can't find libcrypto,
> though OpenSSL is installed. I'm guessing that the compiled erlang
> runtime, having been built for centos, is looking for libs in
> different places, perhaps with different names.
>
> Is there a way to make this work by working around with env vars,
> symlinks, or other post-buld kludgery? Or do we need to just bite the
> bullet and set up a Jenkins build server for ubuntu? Are others
> deploying releases on different Linux distributions? Any suggestions
> or lessons learned would be appreciated.
>
> Thanks
>
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

--
BR,
Dmitry

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: running centos release tarball on debian

dmkolesnikov
In reply to this post by Garry Hodgson-4
Hello,

You can solve the issue if you compile OpenSSL and Erlang yourself at build machine, disable-dynamic-ssl-lib. The resulting relx image would not require libcrypto anymore so that you can convert it.

You can get hint on build step here https://github.com/docker-file/erlang/blob/master/Dockerfile   

Best Regards,
Dmitry


> On Dec 12, 2016, at 11:31 PM, Garry Hodgson <[hidden email]> wrote:
>
> We are using a jenkins build server on centos to create our releases, using rebar3. The deployed release tarball includes the erlang runtime. Recently we needed to deploy it on a remote system that runs Ubuntu. The developers used a tool called alien to convert the .rpm that installs the release tarball into a .deb package that Ubuntu expects.
>
> The application won't start, complaining that it can't find libcrypto, though OpenSSL is installed. I'm guessing that the compiled erlang runtime, having been built for centos, is looking for libs in different places, perhaps with different names.
>
> Is there a way to make this work by working around with env vars, symlinks, or other post-buld kludgery? Or do we need to just bite the bullet and set up a Jenkins build server for ubuntu? Are others deploying releases on different Linux distributions? Any suggestions or lessons learned would be appreciated.
>
> Thanks
>
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: running centos release tarball on debian

PAILLEAU Eric

And once you have a portable release,
you can avoid using alien and create debian package on centos using
https://github.com/crownedgrouse/debut in rebar overlay
or use https://github.com/crownedgrouse/debbie module in your own escript.
Regards


"Envoyé depuis mon mobile " Eric



---- Dmitry Kolesnikov a écrit ----

Hello,

You can solve the issue if you compile OpenSSL and Erlang yourself at build machine, disable-dynamic-ssl-lib. The resulting relx image would not require libcrypto anymore so that you can convert it.

You can get hint on build step here https://github.com/docker-file/erlang/blob/master/Dockerfile   ;

Best Regards,
Dmitry


> On Dec 12, 2016, at 11:31 PM, Garry Hodgson <[hidden email]> wrote:
>
> We are using a jenkins build server on centos to create our releases, using rebar3. The deployed release tarball includes the erlang runtime. Recently we needed to deploy it on a remote system that runs Ubuntu. The developers used a tool called alien to convert the .rpm that installs the release tarball into a .deb package that Ubuntu expects.
>
> The application won't start, complaining that it can't find libcrypto, though OpenSSL is installed. I'm guessing that the compiled erlang runtime, having been built for centos, is looking for libs in different places, perhaps with different names.
>
> Is there a way to make this work by working around with env vars, symlinks, or other post-buld kludgery? Or do we need to just bite the bullet and set up a Jenkins build server for ubuntu? Are others deploying releases on different Linux distributions? Any suggestions or lessons learned would be appreciated.
>
> Thanks
>
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: running centos release tarball on debian

PAILLEAU Eric
In reply to this post by dmkolesnikov

I forgot to say that another way is to create a debian package with only the beam files  that depends to another debian package installing the good Erlang VM for Ubuntu.
This imply to build it on Ubuntu or use ubuntu 's Erlang VM in official repositories,  but they are probably not up-to-date with last Erlang VM.

"Envoyé depuis mon mobile " Eric



---- Dmitry Kolesnikov a écrit ----

Hello,

You can solve the issue if you compile OpenSSL and Erlang yourself at build machine, disable-dynamic-ssl-lib. The resulting relx image would not require libcrypto anymore so that you can convert it.

You can get hint on build step here https://github.com/docker-file/erlang/blob/master/Dockerfile   ;

Best Regards,
Dmitry


> On Dec 12, 2016, at 11:31 PM, Garry Hodgson <[hidden email]> wrote:
>
> We are using a jenkins build server on centos to create our releases, using rebar3. The deployed release tarball includes the erlang runtime. Recently we needed to deploy it on a remote system that runs Ubuntu. The developers used a tool called alien to convert the .rpm that installs the release tarball into a .deb package that Ubuntu expects.
>
> The application won't start, complaining that it can't find libcrypto, though OpenSSL is installed. I'm guessing that the compiled erlang runtime, having been built for centos, is looking for libs in different places, perhaps with different names.
>
> Is there a way to make this work by working around with env vars, symlinks, or other post-buld kludgery? Or do we need to just bite the bullet and set up a Jenkins build server for ubuntu? Are others deploying releases on different Linux distributions? Any suggestions or lessons learned would be appreciated.
>
> Thanks
>
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: running centos release tarball on debian

Garry Hodgson-2
In reply to this post by dmkolesnikov
Many thanks to all who replied. I expect we'll address this at the
source, and upgrade our automated builds to handle both Centos and
Ubunu. The Docker stuff looks intriguing as well.


On 12/13/16 4:53 AM, Dmitry Kolesnikov wrote:

> Hello,
>
> You can solve the issue if you compile OpenSSL and Erlang yourself at build machine, disable-dynamic-ssl-lib. The resulting relx image would not require libcrypto anymore so that you can convert it.
>
> You can get hint on build step here https://github.com/docker-file/erlang/blob/master/Dockerfile
>
> Best Regards,
> Dmitry
>
>
>> On Dec 12, 2016, at 11:31 PM, Garry Hodgson <[hidden email]> wrote:
>>
>> We are using a jenkins build server on centos to create our releases, using rebar3. The deployed release tarball includes the erlang runtime. Recently we needed to deploy it on a remote system that runs Ubuntu. The developers used a tool called alien to convert the .rpm that installs the release tarball into a .deb package that Ubuntu expects.
>>
>> The application won't start, complaining that it can't find libcrypto, though OpenSSL is installed. I'm guessing that the compiled erlang runtime, having been built for centos, is looking for libs in different places, perhaps with different names.
>>
>> Is there a way to make this work by working around with env vars, symlinks, or other post-buld kludgery? Or do we need to just bite the bullet and set up a Jenkins build server for ubuntu? Are others deploying releases on different Linux distributions? Any suggestions or lessons learned would be appreciated.
>>
>> Thanks
>>
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions