Include ERTS in an escript package

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

Include ERTS in an escript package

Mark Geib-2
I normally build erlang releases with rebar3 for deployment in our production environments. I do not require erlang to be installed on these systems since the release includes erlang, etc.

I have a need to provide a escript for some metrics gathering and housekeeping operations, but with no erlang on these production
servers I am wondering what the best approach is to provide these escripts for production.

My question, is it possible, with rebar3 to package an escript in such a way as to include erlang, eliminating the dependency of
 install erlang on these servers. This would also allow me to continue providing releases based on different versions of erlang that run
on the same production server.

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

Re: Include ERTS in an escript package

dmkolesnikov
Hello Mark,

As far I know, It is not possible to package runtime to escript with rebar3.

Easies, faster and reliable solution to package escript along with ERTS to docker...

Another options to package entire application and its deps to escript with rebar3, like you are doing it now.
Then prepare tarball with ERTS. You can either use of-the-shelf kerl builds, use Erlang Solution packages [1] or make a lightweight release that will weight 20 - 30MB. And ship both deliverables. If you’d like to ship a single file then you can make a self extracting tarball. I’ve shared a link to my project where I did similar [2]. However, I’ve stopped doing it now and switched 100% to dockers.  

- Dmitry

References
[1] https://www.erlang-solutions.com/resources/download.html
[2] https://github.com/fogfish/hyperion/tree/0.5.0/rel


> On 10 Jan 2019, at 23.48, Mark Geib <[hidden email]> wrote:
>
> I normally build erlang releases with rebar3 for deployment in our production environments. I do not require erlang to be installed on these systems since the release includes erlang, etc.
>
> I have a need to provide a escript for some metrics gathering and housekeeping operations, but with no erlang on these production
> servers I am wondering what the best approach is to provide these escripts for production.
>
> My question, is it possible, with rebar3 to package an escript in such a way as to include erlang, eliminating the dependency of
> install erlang on these servers. This would also allow me to continue providing releases based on different versions of erlang that run
> on the same production server.
>
> Thanks,
> Mark.
> _______________________________________________
> 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: Include ERTS in an escript package

Loïc Hoguin-3
In reply to this post by Mark Geib-2
Erlang.mk provides self-extracting releases for these situations.[1]
Maybe you can adapt the code[2] for your own use case. Basically it's a
script with the relx tar file appended at the end.

[1] https://erlang.mk/guide/sfx.html
[2] https://github.com/ninenines/erlang.mk/blob/master/plugins/sfx.mk

On 10/01/2019 22:48, Mark Geib wrote:

> I normally build erlang releases with rebar3 for deployment in our production environments. I do not require erlang to be installed on these systems since the release includes erlang, etc.
>
> I have a need to provide a escript for some metrics gathering and housekeeping operations, but with no erlang on these production
> servers I am wondering what the best approach is to provide these escripts for production.
>
> My question, is it possible, with rebar3 to package an escript in such a way as to include erlang, eliminating the dependency of
>   install erlang on these servers. This would also allow me to continue providing releases based on different versions of erlang that run
> on the same production server.
>
> Thanks,
> Mark.
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>

--
Loïc Hoguin
https://ninenines.eu
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Include ERTS in an escript package

John Krukoff-2
Another possible option that recently came up on the Erlang slack channel:

https://github.com/dgiagio/warp/tree/master/examples/erlang


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

smime.p7s (8K) Download Attachment