VS
By: Jonathan Chase
whoami
Name: Jonathan Chase
Occupation: Software Engineer
Our Problem
Environment Inconsistency
Our Solution
• Virtual machines
• New problem
– How to push updates?
• Purpose:
– Building development environments
• Started:
– January 2010 by Mitchell Hashimoto
• Produced by: HashiCorp
• Open source
– Pay for professional support
• https://www.vagrantup.com
• https://docs.vagrantup.com
• https://vagrantcloud.com
• Developer defines the VM
configuration
• Vagrant interfaces with VirtualBox
or other VM manger to build and
launch the VM
• Developer can easily rebuild the
VM
• VM configuration can easily be
shared
How it works
• VirtualBox
• VMWare
• AWS-EC2
• Google App Engine
• Many repos of VM images for Vagrant
Adoption
• Since 2010
Google Trends
• vagrant up demo
• Vagrant == awesome
• What’s Docker all about?
• Purpose:
– Build, ship, and run aplications
• Started:
– March 2013 by Solomon Hykes
• Produced by: Docker Inc.
• Open source
– Pay for professional support
• https://www.docker.com
• https://hub.docker.com
• Builds on LxC
– LinuX Containers
• Linux kernel cgroups
– Control groups
– Isolation: CPU, memory, block I/O, network
• Linux kernel namespace isolation
• Container runs as an application rather than a
virtual machine
How it works
• Support Docker:
– AWS
– Vagrant
– Digital Ocean
– Google App Engine
• Using Docker:
– Ebay
– Yelp
– Spotify
Adoption
• Rocket
– CoreOS
– Claims more secure
– Aims to be a more simple container manager
where as Docker as recently focused on managing
containers in clusters etc.
– https://coreos.com/blog/rocket/
Competition
Google Trends
• Since 2010
Google Trends
Vagrant Docker
• docker run demo
Comparison
• Virtual Machine
• Better separation
• Security
• Resource
• Development
environment focus
• Configure
environments
• Can be used for
development
• Can be used for
production
• Light weight
• Portable
• Fast starting/stopping
• Linux only
• Production
deployment focus
• Tied to Docker Repo
Resources
• Vagrant:
– https://www.vagrantup.com
– https://docs.vagrantup.com
– https://vagrantcloud.com
• Docker:
– https://www.docker.com
– https://hub.docker.com
Resources
• Comparison Threads:
– http://stackoverflow.com/questions/16647069/should
-i-use-vagrant-or-docker-io-for-creating-an-isolated-
environment
– http://www.scriptrock.com/articles/docker-vs-vagrant
• CoreOS - Rocket over Docker
– https://coreos.com/blog/rocket/
• Google Trends:
– http://www.google.com/trends/explore#q=%2Fm%2F
0wkcjgj&date=1%2F2010%2060m&cmpt=q
Resources
• Icons and other sources:
– http://www.iconarchive.com/show/operating-systems-
icons-by-tatice/Windows-icon.html
– http://www.iconarchive.com/show/operating-systems-
icons-by-tatice/Apple-Rainbow-icon.html
– http://www.iconarchive.com/show/operating-systems-
icons-by-tatice/Linux-icon.html
– http://www.eightforums.com/virtualization/6793-vbox-
ose-windows-xp-vista-7-8-64-bit.html
– https://www.docker.com
– https://www.vagrantup.com
– https://www.virtualbox.org
Questions ?
VS

Vagrant vs Docker

  • 1.
  • 2.
  • 3.
  • 4.
    Our Solution • Virtualmachines • New problem – How to push updates?
  • 6.
    • Purpose: – Buildingdevelopment environments • Started: – January 2010 by Mitchell Hashimoto • Produced by: HashiCorp • Open source – Pay for professional support • https://www.vagrantup.com • https://docs.vagrantup.com • https://vagrantcloud.com
  • 7.
    • Developer definesthe VM configuration • Vagrant interfaces with VirtualBox or other VM manger to build and launch the VM • Developer can easily rebuild the VM • VM configuration can easily be shared How it works
  • 8.
    • VirtualBox • VMWare •AWS-EC2 • Google App Engine • Many repos of VM images for Vagrant Adoption
  • 9.
  • 10.
  • 11.
    • Vagrant ==awesome • What’s Docker all about?
  • 14.
    • Purpose: – Build,ship, and run aplications • Started: – March 2013 by Solomon Hykes • Produced by: Docker Inc. • Open source – Pay for professional support • https://www.docker.com • https://hub.docker.com
  • 15.
    • Builds onLxC – LinuX Containers • Linux kernel cgroups – Control groups – Isolation: CPU, memory, block I/O, network • Linux kernel namespace isolation • Container runs as an application rather than a virtual machine How it works
  • 16.
    • Support Docker: –AWS – Vagrant – Digital Ocean – Google App Engine • Using Docker: – Ebay – Yelp – Spotify Adoption
  • 17.
    • Rocket – CoreOS –Claims more secure – Aims to be a more simple container manager where as Docker as recently focused on managing containers in clusters etc. – https://coreos.com/blog/rocket/ Competition
  • 18.
  • 19.
  • 20.
  • 21.
    Comparison • Virtual Machine •Better separation • Security • Resource • Development environment focus • Configure environments • Can be used for development • Can be used for production • Light weight • Portable • Fast starting/stopping • Linux only • Production deployment focus • Tied to Docker Repo
  • 22.
    Resources • Vagrant: – https://www.vagrantup.com –https://docs.vagrantup.com – https://vagrantcloud.com • Docker: – https://www.docker.com – https://hub.docker.com
  • 23.
    Resources • Comparison Threads: –http://stackoverflow.com/questions/16647069/should -i-use-vagrant-or-docker-io-for-creating-an-isolated- environment – http://www.scriptrock.com/articles/docker-vs-vagrant • CoreOS - Rocket over Docker – https://coreos.com/blog/rocket/ • Google Trends: – http://www.google.com/trends/explore#q=%2Fm%2F 0wkcjgj&date=1%2F2010%2060m&cmpt=q
  • 24.
    Resources • Icons andother sources: – http://www.iconarchive.com/show/operating-systems- icons-by-tatice/Windows-icon.html – http://www.iconarchive.com/show/operating-systems- icons-by-tatice/Apple-Rainbow-icon.html – http://www.iconarchive.com/show/operating-systems- icons-by-tatice/Linux-icon.html – http://www.eightforums.com/virtualization/6793-vbox- ose-windows-xp-vista-7-8-64-bit.html – https://www.docker.com – https://www.vagrantup.com – https://www.virtualbox.org
  • 25.

Editor's Notes

  • #2 Comparison not Competition
  • #3 I’m Jonathan Chase Software Engineer with BTI360 - BTI360 has been an awesome place for me to grow as an engineer and learn from some really sharp dudes I’ve heard that it’s good to open up with something personal to connect with the audience, So.. I have always admired people that can play a musical instrument, but I have never taken the time myself to learn how to play. The closest I’ve gotten is getting pretty good a the game RockBand. So I’ve done what any good father would and I’ve “encouraged” my daughter Savannah to learn to play the violin. So now she’s going to play Old McDonald this weekend at her first recital. So I am super excited for her, and I found my self a little jealous that she can play and I can’t. So I had her teach me how to play and I am no master, but I am proud to say that I can now play Old McDonald on the violin. Now I tell you this to frame our talk today. I am no master of Vagrant and Docker, but I have played around with them enough to share what I’ve learned here today
  • #4 About a year ago our dev team was running into problems with consistency with our environments. Some developers were on Windows, some Mac and Linux Part of our app depended on a specific version of coreutils We didn’t want to be dependent on AWS or online services for development, so our solution was clearly running VMs locally.
  • #5 Virtualbox is an awesome tool to enable virtual machine management on ones desktop for free. New problem: How to we push our VM to our team and how to we push updates to the VM to our team? We looked at setting up a gold copy VM and creating an image of it and using S3 or Google Docs to make it available to the team. This proposed solution broke down when we considered how to pus updates to the VM. Charlie Cook ON of our developers mentioned we should check out Vagrant
  • #6 Vagrant turned out the be the solution we were looking for. Allowed us to leverage a Vagrant configuration file to define our VM and we can keep this config file under version control in Git. Vagrant then handles the heavy lifting of building the VM and configuring it the way we define.
  • #10 http://www.google.com/trends/explore#q=%2Fm%2F0jwtqm2&cmpt=q
  • #13 The first thing that gets me excited about Docker is their logo. If you notice, the whale has ISO shipping containers on top of it. I’m a fan of shipping containers. They are so versatile and cheap and just cool.
  • #14 This is literally a picture of my garage last year when we had 5 shipping containers installed to make a kind of extension to our current garage The advantage of the ISO container is that the ship or train or truck doesn’t care what’s inside of it. It just know how to move containers. This is the principle of Docker containers. If you can define your app or runnable as a container, then a Docker client exposing a Linux kernel can run it.
  • #22 Comparison - Venn diagram - Vagrant for development - Docker for production - If your main need is isolation and you require to quickly create several different VE images, then definitely use Docker. Docker is also ideal for environments in which you’re testing several short-lived images, such as when you need different scenarios for testing or debugging software. - Vagrant is better when you require full VM’s and full isolation for those VM’s.
  • #24 http://stackoverflow.com/questions/16647069/should-i-use-vagrant-or-docker-io-for-creating-an-isolated-environment Vagrant is a virtual machine manager, it allows you to script the virtual machine configuration as well as the provisioning. However, it is still a virtual machine depending on Virtual Box (or others) with a huge overhead. It requires you to have a hard drive file that can be huge, it takes a lot of ram, and performance can be not very good. Docker on the other hand uses kernel cgroup and namespacing via lxc. It means that you are using the same kernel as the host and the same file system. You can use Dockerfile with the docker build command in order to handle the provisioning and configuration of your container. You have example at docs.docker.io on how to make your Dockerfile, it is very intuitive. The only reason you could want to use vagrant is if you need to do BSD, Windows or other non-linux development on your ubuntu box. Otherwise, go for Docker.