Hello, community!
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:
Is it proper way to get an IP of running instance?
After we start named server 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 )
I’m currently studying this fantastic example repo from https://github.com/bitwalker/distillery-aws-example for deploying distillery releases on EC2 instances. It is definitely a lot to take in at first, but I’ve tried to highlight the relevant parts for you below.