Created
April 16, 2018 20:30
-
-
Save zealfire/246d5de41b2c9959451de764aa959126 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant and Docker are different beasts. Docker is a two part shell/management layer for building and running virtual linux containers, based on lxc. | |
The great thing about Docker is that it is light-weight (because it relies on shared-kernel linux containers) and it is distribution agnostic. While the kernel between all instances is shared (but isolated from the host and each other), the user space for different instances can be based on different linux distributions. | |
Vagrant on the other hand is a wonderful tool for automatically provisioning multiple virtual machines each with their own configurations managed with puppet and/or chef. For its virtualisation it can use different providers. Originally the default provider was virtualbox, but it now supports many more, including vmware fusion and even amazon-ec2. | |
Interestingly, Vagrant has a Docker provider now, so you can use vagrant to manage your Docker builds and deployments. | |
Docker is yet limited in its flexibility - 'everything is an image', and you can create variant images, and whole stacks of images, where each one adds features to a previous one. Managing that can become a challenge. | |
Vagrant has similar challenges, as boxes can become out of date, and sometimes boxes can be hard to find and/or update. There are tools like packer and the older veewee to help you build so called 'base' boxes. | |
I believe that the tools can work very well together, and I think where the combination might shine is where you would plan a significant refactoring of your stack, where you want to test the replacement of entire components, or even the base OS. | |
Suppose you have an application stack based on Centos and want to switch to Ubuntu, or the other way around. Suppose you want to upgrade your OS entirely. | |
I always say that in Development/Test and Staging, you always have to test your application against the current production environment (including configuration) and whatever potential alternate production environment. Are you planning a security update? Do you want to update or switch your Java stack? | |
This is where Vagrant and Docker shine. I would expect Docker to help you speed up testing against multiple operating environments. | |
Whether Docker is a useful vehicle to deploy your application into production? It is the commonly advertised use case - and it might be. However, nitty-gritty changes in configuration files, especially where these have to be orchestrated across the network, are better done with a tool that is aware of other components in the network. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment