Can you please share your setup if you are running a cluster in Fargate? Our DevOps are trying their best to have a setup in Fargate for our new Elixir app, but it‘s hard.
What I want as a developer is node discovery and being able to connect to a cluster in IEx, debug production app, observer would be nice too. I think the state right now is - there is a cluster, but no shell, no ssh, no IEx.
Maybe there is some tip that you can share how to achieve it? It would be a shame to go back to stateless architecture.
Or maybe it‘s common not to have shell/iex in prod?
My old team struggled with this for months and never arrived at a working solution for Fargate. We ended up using ECS.
I have another question about Fargate. Are there any ports we need to open for the nodes to talk to each other? And what about EPMD port? Do we need it or not?
You can add a bastion host. Configure your VPC so that it can be accessed through your bastion host. So from there you can SSH in to your Task’s IP address.
I’ve already shared some details in Distributed Elixir in Amazon ECS
I shared this in an older thread as well, but for anyone looking, I wrote up a fresh step by step guide on deploying distributed Elixir nodes to ECS Fargate with AWS Service Discovery and libcluster DNS Polling. Also includes remote iex shell access. Elixir Clustering with libcluster and AWS ECS Fargate in CDK