Parameterizing a node name in Elixir Exrm

I want to use Exrm with Erlang distributed on the same machine.

I need to create several releases that differ only in the name of node.

I know, I can configure the node name in rel/vm.args , but it will be static. Can I somehow generate multiple releases with different node names?

+5
source share
1 answer

I am exploring the same issue. Possible approach:

rel/vm.args supports parameterization of OS environment variables. So you can do something like

 ## Name of the node -name ${MY_NODE_NAME} ## Cookie for distributed erlang -setcookie ${MY_COOKIE} 

Then you will call in the batch file:

 export RELX_REPLACE_OS_VARS=true export MY_NODE_NAME=foobar@my _host export MY_COOKIE=foobar 

Note RELX_REPLACE_OS_VARS - this is important!

+4
source

Source: https://habr.com/ru/post/1234759/


All Articles