by andymoe · 8y ago · 0 comments
I’ve run Docker CE on azure vms on individual host, also customized ACS for swarm and they are both a PITA in their own ways.
Either way use terraform or ARM templates to provision where you can. Probably need the ARM templates for the newer container instance service since I doubt terraform is updated yet.
Azure container instances look good, I'll take a closer look at that. What would the implementation then look like? I need two containers for the apps and then one for the MySQL database. So in the end I would have 3 container instances, correct?
Is it cheaper to use Azure MySQL or to run MySQL in a container instance?
Thanks in advance
It will take a lot of time configuring MySQL to be production ready with backups, etc. Layer on top of that the complexity of running it in a container... How do you patch the DB software if you run it in a container? Make a new container stop the existing container and reattach the data volume correctly and then you have to deal with downtime or a cluster of containers running the DB if you don't want downtime. You're going to have a bad time unless you really know what you are doing and I still would not run MySQL in a container instance.
ACI current pricing as of Dec 2017
1 create request x 1GB memory x 1 month (2592000 seconds) x $0.0000125 (GB/sec) = $32
1 create request x 1 CPU Core x 1 month (2592000 seconds) x $0.0000125 (GB/sec) = $32
Total ~ $64 / month.
I think you might be better off running an Ubuntu VM with Docker for your services and then add Azure Databases for MySQL for persistence. That is how I deploy inside azure.
It is also possible, if I consider your suggestion to run MySQL directly on the VM - then the two containers above. This would be cheaper, wouldn't it?
using a vm you'd save about 30usd/mo
i could provide a configuration that you can run directly on your machine. drop me a line if you need help, i'm @andreicon on twitter