[erlang-questions] REPLACE_OS_VARS in erlexec?
Wed Mar 29 21:55:16 CEST 2017
For different reasons (for instance to be able to run distributed Erlang
inside Kubernetes for instance, like here:
there is a need to be able to override or replace the settings in vm.args
(or the args_file if you use the name of the argument to erlexec) with
For instance like so (example taken from the above article):
## Name of the node
## Cookie for distributed erlang
The need for this functionality seems to be big enough for there to now be
support for it in the release builders (relx for instance offers a way to
turn on vm.args environment variable replacement with the
RELX_REPLACE_OS_VARS environment variable when running the start script).
My question though is if this functionality (to set variables such as -name
or -setcookie in args_file through environment variables) has ever been
considered for erlexec itself?
For various reasons (mostly to reduce dependencies to other programs such
as various shell utilities) I would like to start my erlang nodes without
the generated release script by calling erlexec directly, but I realize I
would, by doing so, miss out on the power to set variables in arg-file with
environment variables (like in relx above).
I guess it would not be extremely difficult to modify erlexec for this
purpose (erlexec already has functions for reading environment variables so
it would be a small change I guess) but I'm not sure if there would be
enough interest in this feature to accept a pull-request and I would not
like to roll my own fork of OTP only for this rather limited purpose. So,
does anyone know if this this feature has ever been discussed or considered
for inclusion in OTP?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions