Thanks to a question of my friend Xavier: “Is this something that might potentially interest us? CoreOS Now Available On DigitalOcean!“, I reopened this internal discussion “Vagrant or Docker, this is the question?”. Well here are my thoughts ….
CoreOS is a minimal Linux Distro in order to save RAM when you manage Clusters (or slices within a machine). They promise to use only 144MB RAM.
When you use Docker, you need a host OS in your Server (CoreOS promises to be the lighter host OS).
So the question here is …… should we use Docker?
- SERVER SIDE:
- Docker/CoreOS are scalability tools: as Adrian said this is a really powerful tool to scale applications, you can deploy packaged containers (slices) within a server and among servers in a farm. CoreOS seems to help a lot at this point also, running ‘etcd‘ by default.
- Removes Lock-in: You can move your apps among providers (DO, Rackspace, AWS, Linode,… your private farm). Once you have your container configured, you just need to have a linux host (an AWS linux AMI, Ubuntu, CoreOS ….) with Docker installed.
- DEVELOPER SIDE: Docker instead of Vagrant to emulate the system locally (take a look at this great discussion between both creators)
- This is only possible, for the moment, if your app servers are linux (this does not mean that your Dev workstation should be Linux)
- Docker engine (Virtualization layer) is based on LXC, which manages chroot, network, mount… all kernel “Containerizing” capabilities directly. This efficiency is extreme if your local OS is Linux.
- Vagrant lies over VirtualBox which creates a lot of CPU and Memo overhead.
- Portability: Docker allows to reproduce EXACTLY the production scenario in your workstation (or other environments like staging or testing). You just need Docker/Linux installed in both, and Docker acts as an abstraction layer.
- Vagrant offers images which haven’t the same configuration as your provider’s images (I experienced this directly: ubuntu-14.04 has not the same configuration in vagrantcloud.com‘s box, and DigitalOcean.com’s image)
- Images weight: Vagrant boxes are much larger than Docker repos (ubuntu/trusty is ~600MB image box, against 64MB as Docker repo)
I was until this weekend with an eye on this Infrastructure Maintenance Stack:
- Chef: Manages server installation and future configurations.
- Vagrant: reproduces (approximately) our production server in order to check configurations.
- Capistrano: Manages continuous deployment.
But due to read (and tests) about Docker this weekend, I am thinking to substitute Vagrant per Docker (the reasons above are really persuasive).
So, hey guys!! what do you think? Is Docker/CoreOs something that might potentially interest us?
You’re on top of the game. Thanks for shgarni.