an introduction to vagrant and docker
TRANSCRIPT
![Page 2: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/2.jpg)
Before we begin☞ Get involved! Audience participation is requested and
encouraged.
☞ If you use Twitter, feel free to tweet about this session (use @NashvilleVMUG or hashtag #NashvilleVMUG)
☞ Feel free to take photos or videos of today's session and share them online
☞ A PDF copy of this presentation will be available online after the event
![Page 3: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/3.jpg)
![Page 4: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/4.jpg)
What is Vagrant?☞ A CLI-based tool for streamlining the use of VM environments
(creation, provisioning, usage, & decommissioning)
☞ Available from http://www.vagrantup.com
![Page 5: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/5.jpg)
A "VM environment"?☞ Think of this as one or more VMs (based on a user-specified
template) along with networking and possible in-guest software customization
☞ Examples
☞ The classic "3 tier" web/app/DB topology
☞ Trying out new technologies (CoreOS and etcd cluster, Open vSwitch)
![Page 6: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/6.jpg)
Use cases for Vagrant☞ Sharing VM environments with other users
☞ Accelerating the creation of VM environments
☞ Automating software provisioning inside VM environments
☞ Providing a CLI for creating/destroying/accessing VM environments
![Page 7: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/7.jpg)
What are the components of Vagrant?
![Page 8: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/8.jpg)
Vagrant☞ Written in Ruby
☞ Multi-platform (Windows, Linux, OS X)
☞ CLI (no GUI)
![Page 9: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/9.jpg)
Vagrant provider☞ Interfaces with back-end virtualization solution
☞ Vagrant comes with a provider for VirtualBox
☞ Provider for VMware desktop products (Fusion & Workstation) available for a fee
☞ Other providers available as open source projects
☞ See https://github.com/gosddc for examples
![Page 10: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/10.jpg)
Vagrant box☞ Template used when creating VM environments in Vagrant
☞ Boxes are provider-specific
☞ Packer is a related product that can be used to help build Vagrant boxes
![Page 11: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/11.jpg)
Vagrantfile☞ A text file (written with Ruby syntax) that describes the VM
environment
![Page 12: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/12.jpg)
Vagrant demo time!
![Page 13: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/13.jpg)
![Page 14: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/14.jpg)
What is Docker?☞ A CLI tool for simplifying the use of Linux containers
☞ Available from https://www.docker.com
![Page 15: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/15.jpg)
What are Linux containers?☞ Linux containers can be thought of as "lightweight
virtualization" or "OS virtualization"
☞ Leverage features built into the Linux kernel (cgroups and namespaces)
☞ Linux containers have been around for a while, but weren't very easy to use
![Page 16: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/16.jpg)
Use cases for Docker☞ Rapidly deploy (or un-deploy) containers
☞ Simplify the creation of custom container images
☞ Make sharing container images very easy
![Page 17: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/17.jpg)
What are the components of Docker?
![Page 18: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/18.jpg)
Docker daemon☞ Responsible for spawning containers
☞ As a daemon, it runs in the background
☞ By default, listens on a local Unix socket (can be configured to listen on a network port)
![Page 19: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/19.jpg)
Docker client☞ CLI client for interacting with the Docker daemon
☞ Can run locally on the same system as the daemon, or remotely (daemon must be listening on a network port)
![Page 20: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/20.jpg)
Docker image☞ The contents of a Docker container
☞ Comprised of multiple filesystem layers
☞ Stored locally, can be shared via the Docker Hub
☞ Images can be based on other images
![Page 21: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/21.jpg)
Dockerfile☞ A simple text file describing a Docker image
![Page 22: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/22.jpg)
Docker demo time!
![Page 23: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/23.jpg)
Docker + Vagrant = ?
![Page 24: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/24.jpg)
![Page 25: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/25.jpg)
Q&A
![Page 26: An Introduction to Vagrant and Docker](https://reader031.vdocuments.us/reader031/viewer/2022032114/55a6928f1a28ab5b4d8b46ff/html5/thumbnails/26.jpg)
Thank you!Be sure to provide feedback to the VMUG leaders regarding this session.
Blog: http://blog.scottlowe.orgTwitter: @scott_loweGitHub: https://github.com/lowescottLife: Colossians 3:17