We are making distributed nodes of elixir application at EC2.
Reading running node names and connect them all together done via hex package https://github.com/kyleaa/libcluster_ec2.
The only work we have to do is to start a
named server in the release and set cookie.
We update file rel/env.sh.eex and put set global variables there, such as:
export RELEASE_NODE=<%= @release.name %>@IP
Finally our question:
- Is it proper way to get an IP of running instance?
- After we start
namedserver node (via ./prod/rel/app/bin/app start) we lost opportunity to connect to it via prod/rel/app/bin/app remote. An error is
Could not contact remote node app@IP, reason: :nodedown. Aborting...
We definitely doing something wrong, any advise appreciated )