Vagrant v/s Docker: Automating Your Environment

Vagrant v/s Docker: Automating Your Environment

Are Vagrant and Docker competing technologies? Can the two of them co-exist or, even synergize? Join Rohit Dantas, Senior Software Engineer at AKQA, and take a peek at what environments each of them targets, as well as the set (or subset) of features they provide. You'll also spin up Vagrant box(es) and Docker container(s) for similar environments, to see first-hand how easy (or difficult) it is to do and compare the performance of these actions.

E051f30aea48674302e23f4c2e80c1cb?s=128

rohit.dantas

March 27, 2014
Tweet

Transcript

  1. 2.

    Vagrant A tool for Automation Benefits • Lowers development environment

    setup time • Increases parity between environments • Eliminates the “works on my machine” syndrome • Simple and elegant Workflow Core Component: Boxes (base)
  2. 3.
  3. 4.
  4. 5.

    Docker An Engine for Automation Benefits • Lightweight and Portable

    • Affords for a 1-to-1 mapping between environments • Eases Scalability Core Component: Containers
  5. 6.

    What do you get? What do you build? > Daemon

    > CLI > Registry > Containers > Images > Dockerfiles
  6. 7.
  7. 8.
  8. 10.

    Environments • Docker: All • Vagrant Development Boot Speed •

    Docker: Seconds • Vagrant: Minutes Host Dependency • Docker: Ubuntu (primary) and some Linux Distros • Vagrant: Almost everywhere Workflow • Docker: Compact, can run any shell commands • Vagrant: Complete, can run full provisioning tasks
  9. 11.

    Resource Usage • Docker: Minimal • Vagrant: Full VM Stack

    Isolation • Docker: Certain shared components • Vagrant: Complete isolation Partial Builds / Re-builds • Docker: Registry works as a Version Control system • Vagrant: Partial support, but cumbersome Scale • Docker: In-built; Containers/Images can be spun up at low cost • Vagrant: N/A
  10. 12.
  11. 13.

    There are pros and cons for each type of virtualized

    system. If you want full isolation with guaranteed resources then a full VM is the way to go. If you just want to isolate processes from each other and want to run a ton of them on a reasonably sized host, then Containers might be the way to go. Better yet, use a combination of the two. Pros and Cons
  12. 15.