I’m wondering if anyone has experience in deploying Elixir apps (Phoenix apps or otherwise) to Microsoft Azure. If so, I would love to hear about your experience.
The company where I work is heavily invested in Azure from before, so I’m trying to determine whether it would be a viable option for Elixir apps as well.
Here are some of the types of questions I have in mind:
- How did your setup look like?
- Did you use Azure Container Instances or Azure Virtual Machines?
- Did you deploy to a single node or multiple nodes?
- If multiple nodes: Did you have any issues connecting them?
- Were you using some kind of containers and orchestration, e.g. Docker and Kubernetes?
- Does Azure play well with BEAM instrumentation and debugging tools?
- Is it possible to attach to an Azure environment with Erlang’s remote shell?
- Did you experience any significant difficulties?
- Are there any noteworthy caveats or drawbacks?
Any input on such topics would be greatly appreciated.
(full disclosure: I work for Microsoft, and love Elixir )
I haven’t yet spent too much time on the actual runtime side of Elixir on Azure. One thing I did was to run a Distillery with multi-stage docker, then push the resulting image to Azure Web Apps (with Linux). Also Azure Kubernetes Service (AKS) is an obvious solution. When it comes to running an Erlang Cluster in a virtual network, there are no reasons why it should not be possible…
Regarding your question on whether Azure plays well with BEAM instrumentation, I would guess all BEAM things would be independent of or orthogonal to Azure?
As for the Elixir application side of things, I started to build libraries to interact with various Azure APIs:
Feel free to ping me via mail (chgeuer@microsoft)…
How did your setup look like?
Terraform with its state stored on s3 (could be azure’s alternative), distillery with docker to build releases (on CI) and upload them to s3 (could be azure’s alternative), epmdless distribution over azure’s vpn (might later move to partisan).
Did you use Azure Container Instances or Azure Virtual Machines?
Azure Virtual Machines (mostly the spot instances)
Did you deploy to a single node or multiple nodes?
Multiple. No issues.
Were you using some kind of containers and orchestration, e.g. Docker and Kubernetes?
No, but we used some bash scripts though which would download the releases from s3 and then enable and start the apps via systemd.
Does Azure play well with BEAM instrumentation and debugging tools?
Since it’s just a linux instance, it works as any other linux instance (which is ok).
Did you experience any significant difficulties?
It would be a bit too expensive for us if it wasn’t for the spot instances.
I’m not knowledgeable enough about the inner workings of the BEAM and surrounding tooling to answer that question. Based on what I’ve read and heard in various Elixir podcasts, some hosting services and cloud services impose certain restrictions, but I don’t know all of the details.
Thank you for taking the time to respond and sharing your work! This is very useful.