by d3nj4l · 4y ago · 0 comments
If you're using K8s, what I would suggest is:
- create multiple releases of your Mix project[1] with specific OTP applications in each
- one Docker container per release
- one K8s Deployment per release
- one headless K8s Service selecting the pods for all your deployments
- use libcluster for automated cluster formation
Then, with node affinity/tolerations, you can control on which physical node you'll run it (if you want).If you're not using K8s, you can use an Ansible playbook to deploy each distinct release on the target host, and you can use libcluster with a static cluster configuration. This will work the same.
[0] - https://medium.com/@david-delassus/elixir-and-kubernetes-a-l...
[1] - https://elixir-lang.org/getting-started/mix-otp/config-and-r...
I asked the more senior Elixir devs if we should do something to take advantage of the platform and was met with shrugs.