Allows to connect erlang nodes, via Erlang distribution and without epmd, using tcp or tls.
Erlang >= 19.1
{ epmdless, [
{transport, tcp},
{listen_port, 17012}
]
}.
{epmdless, [
{transport, tls},
{listen_port, 17012}
]}
And follow the instructions found in the OTP docs, Specifying SSL/TLS Options.
Erlang VM needs few extra flags on start to disable epmd daemon startup and override empd client callback module.
Minimal set of options:
erl -proto_dist epmdless_proto -start_epmd false -epmd_module epmdless_client
Note: since epmd is disabled you need to populate epmd-client database manually. Check epmd_dist module API.
([email protected])1> epmdless_client:add_node('[email protected]', 17012).
ok
([email protected])2> epmdless_client:list_nodes().
[{'[email protected]',{"host.local",17012}}]
It's possible to connect to epmdless nodes using remsh. The distribution port can be provided via EPMDLESS_REMSH_PORT environmental variable.
Example usage:
EPMDLESS_REMSH_PORT=17012 erl -name [email protected] -remsh [email protected] -setcookie <cookie> -proto_dist epmdless_proto -epmd_module epmdless_client -pa _build/default/lib/epmdless/ebin
Please also refer: https://github.com/oltarasenko/erlang_distribution_in_docker for an example of complete project running epmdless.
Here is a small project which shows how to setup EPMDLess with TLS for Elixir: https://github.com/oltarasenko/epmdless-elixir-example
(Please also see a discussion here: tsloughter/epmdless#11)