Migrate multiple apps/services from VMs to Docker using ... uhm... how many VMs?

I have a collection of applications/services - such as JIRA, Confluence, SVN. Currently, each of these is running in its own (Ubuntu) VM, all hosted on a single ESXi server.

I am now trying to move these to docker, but am new to docker and therefore struggle with the right approach to the relation between containers and VMs.

I understand that I would want each application to be backed by one or typically multiple containers. For example, JIRA would be two containers: one for JIRA, one for the database server.

However, how many VMs do I want in the end? There are many articles saying that combining docker and VMs obviously possible, but there is no guidance how to approach this. Do I want:

  • to continue using a VM per application/service, each hosting 1-2 containers? Seems pretty straight-forward, but also means that I need to continue managing multiple VMs and their OS updates, memory allocation,etc, which somehow defeats some of the docker advantages

  • to use a single VM that hosts all docker containers (perhaps 6-10), even for unrelated applications? Also seems like a good choice. One important question would be how to access individual applications with different host names, not just different ports on the same host. I need to maintain the current URLs for these.

  • use a combination, i.e. some (2-3) VMs, hosting several (6-10) containers? How do I decide which containers go into the same vs. different VMs?

I know, that there is not the one right approach to doing this, as many other factors may play into this.

Note that the ESXi server will continue to host other VMs not anyhow related to these apps/services and docker at all, so I am not planning on dropping it entirely. Also note, that I am using the free version of ESXi and am not planning to move to their paid tiers.

Also, downtime or high-availability is not a main concern, whereas ease of management and updates would be highly appreciated.

Thanks for any guidance you could share on this topic.

Uh … that’s a tough question … and as usual the answer is: “it depends …” :wink:

It depends on the amount of users that access the application, their memory consumption, local disk and NAS/SAN utilization, security concerns and monitoring … So quite a lot of stuff.

As for JIRA, Confluence, SVN there are ready-made containers that just need to be configured. No additional planing of volumes and/or fine tuning of the app configs needed.
But if you run other apps that need contanerized from scratch …

If you really plan 6 - 10 containers, I’d suggest one big machine … as this is a quite small amount … but again, it denpends on all the factores mentioned above …