Virtualization, Containerization and all that Jazz

There's a lot of confusion out there about the terms virtualization, containerization, etc. and the related products such as Vagrant, Docker, VirtualBox, etc. When do I use what?

I like to think of it this way.



  • The physical machine could be a Mac or a Windows PC or laptop.
  • VirtualBox is an Oracle product that provides the virtualization layer, thereby allowing you (for example) to run Linux on a Windows machine. You can configure the resources (disk, CPU, RAM) you want to allocate to each virtual machine (VM).
  • Vagrant is for consistent environment management paradigms across all platforms/OSs. You can use it to install base software for you application, e.g. the Apache web server.
  • Docker is for containerization and only runs on Linux because it uses Linux's container facility to do its thing.
    • So, it used to be that if you're using Windows, you had to run VirtualBox or some virtualization software to stand up a Linux machine first before you could install Docker.
    • But now Docker comes bundled with a lightweight Linux distribution called Alpine, so you can run it directly on Windows without using VirtualBox.
    • The purpose of containerization is to package up your application code and all of its dependencies (other than the ones covered in the remaining layers of the above diagram).
    • This allows you to run your application (e.g. AEM) in a well-defined, consistent and reliable configuration in an easily/quickly reproducible way across every machine in your team and across all your environments (e.g. QA, UAT, Production, etc.).
    • Containerization is a great solution when you have different applications and/or different versions of the same applications with very different dependencies. For example AEM5.6 and AEM6.5 have very different requirements in terms of which Java versions they support. And typically it's cumbersome to recall and specify those different versions each time you start an AEM instance. It's much easier to define the dependencies in the container once and let the container worry about remembering the details forever after.

Comments

Popular posts from this blog

Milwaukee Appliance Hand Truck

My Experiments with the PICAXE 08M2+

Utility trailer buying guide