SlideShare a Scribd company logo
Vagrant
Version control your dev environment

Bob Cribbs
Bob Cribbs
Software developer.
Focused mainly on Python, junior on Ruby and
getting started with mobile.
bocribbz

bocribbz

bocribbz

bocribbz

bocribbz

bocribbz.com
Development
environments
made easy.

www.vagrantup.com

Brasov Tech Meet | September 2013
You’re hired. Get the project up and running
on your new machine.
newguy$ git clone git://path-to-code-repo/super_project.git
Cloning into super_project
newguy$ cd super_project
newguy$ ...
newguy$ ./start.sh
Server listening on 127.0.0.1
We have a setup script!
newguy$ ./setup.sh
Installing software.
Installing dependencies.
Configuring.
Success!
We have a setup script!
● multiple ecosystems Win/Linux/MacOS
● multiple package managers yum, apt, homebrew, macports
● its likely some configuration will be done
differently
● its likely it will diverge from the production
environment
We have a README!
It gives precise instructions about what should
be installed and how it should be configured.

For a mature project, the README file ends up
being a few screens long.
We have a README!
● multiple ecosystems Win/Linux/MacOS
● very high chances something will be
misconfigured
● unlikely to be maintained, (most) developers
don’t write English
● time consuming
I’m sure you can do it!
newguy$ start.sh
Failed to connect to MySql at localhost:3333
newguy$ install mysql
newguy$ start.sh
Failed to connect to Redis at localhost:3334
newguy$ install redis
newguy$ start.sh
Missing ImageMagick extensions.
newguy$ install imagemagick
newguy$ start.sh
Server listening on 127.0.0.1
I’m sure you can do it!
Internal Server Error!
Problems
Not repeatable.
Not verifiably correct.
Not isolated.
Difficult to understand.
Problems
Not repeatable.
Not verifiably correct.
Not isolated.
Difficult to understand.

SLOW, SLOW, SLOW!
Vagrant
Its a tool for creating, managing and distributing
portable development environments.
Zero to VM in seconds
$ vagrant init precise32 
http://files.vagrantup.com/precise32.box
...
$ vagrant up
...
$ vagrant ssh
vagrant@precisebox32:~$ echo hello
hello
Problems solved
Repeatable
you can do the exact same thing when needed

Verifiably correct
you should have automation to check this

Isolated
its in a virtual machine (Vbox, VMWare, etc.)

Understandable
You can read it to understand

Fast(er)
It still takes some time, but it is much faster
Some Terms
Boxes
templates for creating a machine, preinstalled OS
Boxes
Snapshots / base operating system images.
Initial state of the VM.
Operating system (Ubuntu 12.04, CentOS 5.9,
etc.)
Can be packaged and shared.
eg. https://github.com/opscode/bento
Some Terms
Boxes
templates for creating a machine, preinstalled OS

Vagrantfile
configuration read by vagrant to create your machine
Vagrantfile samples
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
end

Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.provision "shell"
inline "apt-get update"
config.vm.provision "shell"
inline "apt-get install apache2"
end
Some Terms
Boxes
templates for creating a machine, preinstalled OS

Vagrantfile
configuration read by vagrant to create your machine

"vagrant" command
manages life cycle of the environment
"vagrant" command
vagrant init

Create a Vagrantfile in the current directory
vagrant up

Boot the VM
vagrant halt

Shutdown the VM
vagrant destroy

Delete the virtual machine
vagrant ssh

SSH into the VM
You’re hired. Get the project up and running
on your new machine.
newguy$ git clone git://path-to-code-repo/super_project.git
Cloning into super_project
newguy$ cd super_project
newguy$ vagrant up
Overview
1. Project specific configuration file
2. Import base box
3. Boot up virtual machine
a. Synced folders
b. Networking

4. Configure / provision software
Synced Folders
Automatically sync files from host to guest so
you can use your prefered editor on the host.
VirtualBox shared folders
VMWare shared folder
rsync (for AWS)
etc...
Synced Folders config
Vagrant.configure("2") do |config|
# ...
config.vm.shared_folder "path/on/host/",
"/path/on/guest/"
end
Networking
Configure how you will communicate with the VM or how
multiple VMs communicate with each other.
You can still use your prefered browser or tools to
communicate with the guest servers.
NAT: usually for port forwarding
Host-Only: private network
Bridge: act like a new device on the router/network
Networking config
Vagrant.configure("2") do |config|
# ...
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.network :private_network, ip: "192.168.3.10"
config.vm.network :public_network
end
Provisioning
You can use shell scripts, Puppet or Chef to
install and configure software.
Berkshelf
Create and manage cookbooks that install and
configure software dependencies.
Chef
Automation platform and nodes manager.
Transforms infrastructure into code.
Provisioning configs
Vagrant.configure("2") do |config|
# ...
config.vm.provision "shell", script "setup.sh"
end
Berkshelf
Manage cookbook and it’s dependencies.
http://community.opscode.com/
Create new cookbook and boilerplate configuration:
berks cookbook cookbook-projectname
Example
https://github.com/bocribbz/cookbook-lampdemo
LAMP demo
Show how Vagrant and Berkshelf work together.
Simple cookbook that installs Ubuntu, Apache,
MySQL, PHP and shows phpinfo().
LAMP demo
berks cookbook cookbook-lampdemo
LAMP demo - Vagrantfile
LAMP demo - metadata.rb
LAMP demo - Apache attributes
Setting attributes/apache.rb paths and other
variables used in the recipe.
LAMP demo - Apache recipe
LAMP demo - PHP recipe
LAMP demo - MySQL attrs & recipe
LAMP demo - vagrant up
LAMP demo
Questions
Thank you!
Ad

More Related Content

What's hot (20)

Docker puppetcamp london 2013
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013
Tomas Doran
 
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
Puppet
 
Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-Overview
Crifkin
 
Vagrant presentation
Vagrant presentationVagrant presentation
Vagrant presentation
Mahmudur Rahman
 
Vagrant 101 Workshop
Vagrant 101 WorkshopVagrant 101 Workshop
Vagrant 101 Workshop
Liora Milbaum
 
Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsync
Hazel Smith
 
How we setup Rsync-powered Incremental Backups
How we setup Rsync-powered Incremental BackupsHow we setup Rsync-powered Incremental Backups
How we setup Rsync-powered Incremental Backups
nicholaspaun
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
frastel
 
Lightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and PuppetLightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and Puppet
Hendrik Ebbers
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
Workhorse Computing
 
Automated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packerAutomated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packer
Jan Collijs
 
Light my-fuse
Light my-fuseLight my-fuse
Light my-fuse
Workhorse Computing
 
Wocker @WordBench Osaka No.41
Wocker @WordBench Osaka No.41Wocker @WordBench Osaka No.41
Wocker @WordBench Osaka No.41
Kite Koga
 
Node.js Cloud deployment
Node.js Cloud deploymentNode.js Cloud deployment
Node.js Cloud deployment
Nicholas McClay
 
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet
 
Putting some "logic" in LVM.
Putting some "logic" in LVM.Putting some "logic" in LVM.
Putting some "logic" in LVM.
Workhorse Computing
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Puppet
 
How To Set a Vagrant Development System
How To Set a Vagrant Development SystemHow To Set a Vagrant Development System
How To Set a Vagrant Development System
Paul Bearne
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Christopher Bumgardner
 
VCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environmentVCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environment
Takayuki Miyauchi
 
Docker puppetcamp london 2013
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013
Tomas Doran
 
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
Puppet
 
Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-Overview
Crifkin
 
Vagrant 101 Workshop
Vagrant 101 WorkshopVagrant 101 Workshop
Vagrant 101 Workshop
Liora Milbaum
 
Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsync
Hazel Smith
 
How we setup Rsync-powered Incremental Backups
How we setup Rsync-powered Incremental BackupsHow we setup Rsync-powered Incremental Backups
How we setup Rsync-powered Incremental Backups
nicholaspaun
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
frastel
 
Lightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and PuppetLightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and Puppet
Hendrik Ebbers
 
Automated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packerAutomated reproducible images on openstack using vagrant and packer
Automated reproducible images on openstack using vagrant and packer
Jan Collijs
 
Wocker @WordBench Osaka No.41
Wocker @WordBench Osaka No.41Wocker @WordBench Osaka No.41
Wocker @WordBench Osaka No.41
Kite Koga
 
Node.js Cloud deployment
Node.js Cloud deploymentNode.js Cloud deployment
Node.js Cloud deployment
Nicholas McClay
 
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Puppet
 
How To Set a Vagrant Development System
How To Set a Vagrant Development SystemHow To Set a Vagrant Development System
How To Set a Vagrant Development System
Paul Bearne
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Christopher Bumgardner
 
VCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environmentVCCW - Vagrant based WordPress development environment
VCCW - Vagrant based WordPress development environment
Takayuki Miyauchi
 

Similar to Vagrant - Version control your dev environment (20)

Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
Brian Hogan
 
Vagrant
VagrantVagrant
Vagrant
ProfessionalVMware
 
Vagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy StepsVagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy Steps
Trevor Roberts Jr.
 
Vagrant are you still develop in a non-virtual environment-
Vagrant  are you still develop in a non-virtual environment-Vagrant  are you still develop in a non-virtual environment-
Vagrant are you still develop in a non-virtual environment-
Anatoly Bubenkov
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
Dave Pitts
 
Security Testing Using Infrastructure-As-Code
Security Testing Using Infrastructure-As-CodeSecurity Testing Using Infrastructure-As-Code
Security Testing Using Infrastructure-As-Code
Vision Concepts Infrastructure Services Solution
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
John Coggeshall
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
Adam Culp
 
Vagrant For DevOps
Vagrant For DevOpsVagrant For DevOps
Vagrant For DevOps
Lalatendu Mohanty
 
Keep calm and vagrant up
Keep calm and vagrant upKeep calm and vagrant up
Keep calm and vagrant up
Daniel Carvalhinho
 
Tech Talk - Vagrant
Tech Talk - VagrantTech Talk - Vagrant
Tech Talk - Vagrant
Thomas Krille
 
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Acquia
 
Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10
Stefan Scherer
 
Vagrant - Team Development made easy
Vagrant - Team Development made easyVagrant - Team Development made easy
Vagrant - Team Development made easy
Marco Silva
 
Using vagrant
Using vagrantUsing vagrant
Using vagrant
Cuong Huynh
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
John Coggeshall
 
Intro to vagrant
Intro to vagrantIntro to vagrant
Intro to vagrant
Mantas Klasavicius
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
Glen Ogilvie
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
Antons Kranga
 
Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and Docker
John Rofrano
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
Brian Hogan
 
Vagrant are you still develop in a non-virtual environment-
Vagrant  are you still develop in a non-virtual environment-Vagrant  are you still develop in a non-virtual environment-
Vagrant are you still develop in a non-virtual environment-
Anatoly Bubenkov
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
Dave Pitts
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
John Coggeshall
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
Adam Culp
 
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Acquia
 
Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10
Stefan Scherer
 
Vagrant - Team Development made easy
Vagrant - Team Development made easyVagrant - Team Development made easy
Vagrant - Team Development made easy
Marco Silva
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
John Coggeshall
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
Glen Ogilvie
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
Antons Kranga
 
Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and Docker
John Rofrano
 
Ad

Recently uploaded (20)

Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Ad

Vagrant - Version control your dev environment

  • 1. Vagrant Version control your dev environment Bob Cribbs
  • 2. Bob Cribbs Software developer. Focused mainly on Python, junior on Ruby and getting started with mobile. bocribbz bocribbz bocribbz bocribbz bocribbz bocribbz.com
  • 4. You’re hired. Get the project up and running on your new machine. newguy$ git clone git://path-to-code-repo/super_project.git Cloning into super_project newguy$ cd super_project newguy$ ... newguy$ ./start.sh Server listening on 127.0.0.1
  • 5. We have a setup script! newguy$ ./setup.sh Installing software. Installing dependencies. Configuring. Success!
  • 6. We have a setup script! ● multiple ecosystems Win/Linux/MacOS ● multiple package managers yum, apt, homebrew, macports ● its likely some configuration will be done differently ● its likely it will diverge from the production environment
  • 7. We have a README! It gives precise instructions about what should be installed and how it should be configured. For a mature project, the README file ends up being a few screens long.
  • 8. We have a README! ● multiple ecosystems Win/Linux/MacOS ● very high chances something will be misconfigured ● unlikely to be maintained, (most) developers don’t write English ● time consuming
  • 9. I’m sure you can do it! newguy$ start.sh Failed to connect to MySql at localhost:3333 newguy$ install mysql newguy$ start.sh Failed to connect to Redis at localhost:3334 newguy$ install redis newguy$ start.sh Missing ImageMagick extensions. newguy$ install imagemagick newguy$ start.sh Server listening on 127.0.0.1
  • 10. I’m sure you can do it! Internal Server Error!
  • 11. Problems Not repeatable. Not verifiably correct. Not isolated. Difficult to understand.
  • 12. Problems Not repeatable. Not verifiably correct. Not isolated. Difficult to understand. SLOW, SLOW, SLOW!
  • 13. Vagrant Its a tool for creating, managing and distributing portable development environments. Zero to VM in seconds $ vagrant init precise32 http://files.vagrantup.com/precise32.box ... $ vagrant up ... $ vagrant ssh vagrant@precisebox32:~$ echo hello hello
  • 14. Problems solved Repeatable you can do the exact same thing when needed Verifiably correct you should have automation to check this Isolated its in a virtual machine (Vbox, VMWare, etc.) Understandable You can read it to understand Fast(er) It still takes some time, but it is much faster
  • 15. Some Terms Boxes templates for creating a machine, preinstalled OS
  • 16. Boxes Snapshots / base operating system images. Initial state of the VM. Operating system (Ubuntu 12.04, CentOS 5.9, etc.) Can be packaged and shared. eg. https://github.com/opscode/bento
  • 17. Some Terms Boxes templates for creating a machine, preinstalled OS Vagrantfile configuration read by vagrant to create your machine
  • 18. Vagrantfile samples Vagrant.configure("2") do |config| config.vm.box = "precise32" end Vagrant.configure("2") do |config| config.vm.box = "precise32" config.vm.provision "shell" inline "apt-get update" config.vm.provision "shell" inline "apt-get install apache2" end
  • 19. Some Terms Boxes templates for creating a machine, preinstalled OS Vagrantfile configuration read by vagrant to create your machine "vagrant" command manages life cycle of the environment
  • 20. "vagrant" command vagrant init Create a Vagrantfile in the current directory vagrant up Boot the VM vagrant halt Shutdown the VM vagrant destroy Delete the virtual machine vagrant ssh SSH into the VM
  • 21. You’re hired. Get the project up and running on your new machine. newguy$ git clone git://path-to-code-repo/super_project.git Cloning into super_project newguy$ cd super_project newguy$ vagrant up
  • 22. Overview 1. Project specific configuration file 2. Import base box 3. Boot up virtual machine a. Synced folders b. Networking 4. Configure / provision software
  • 23. Synced Folders Automatically sync files from host to guest so you can use your prefered editor on the host. VirtualBox shared folders VMWare shared folder rsync (for AWS) etc...
  • 24. Synced Folders config Vagrant.configure("2") do |config| # ... config.vm.shared_folder "path/on/host/", "/path/on/guest/" end
  • 25. Networking Configure how you will communicate with the VM or how multiple VMs communicate with each other. You can still use your prefered browser or tools to communicate with the guest servers. NAT: usually for port forwarding Host-Only: private network Bridge: act like a new device on the router/network
  • 26. Networking config Vagrant.configure("2") do |config| # ... config.vm.network :forwarded_port, guest: 80, host: 8080 config.vm.network :private_network, ip: "192.168.3.10" config.vm.network :public_network end
  • 27. Provisioning You can use shell scripts, Puppet or Chef to install and configure software. Berkshelf Create and manage cookbooks that install and configure software dependencies. Chef Automation platform and nodes manager. Transforms infrastructure into code.
  • 28. Provisioning configs Vagrant.configure("2") do |config| # ... config.vm.provision "shell", script "setup.sh" end
  • 29. Berkshelf Manage cookbook and it’s dependencies. http://community.opscode.com/ Create new cookbook and boilerplate configuration: berks cookbook cookbook-projectname
  • 31. LAMP demo Show how Vagrant and Berkshelf work together. Simple cookbook that installs Ubuntu, Apache, MySQL, PHP and shows phpinfo().
  • 32. LAMP demo berks cookbook cookbook-lampdemo
  • 33. LAMP demo - Vagrantfile
  • 34. LAMP demo - metadata.rb
  • 35. LAMP demo - Apache attributes Setting attributes/apache.rb paths and other variables used in the recipe.
  • 36. LAMP demo - Apache recipe
  • 37. LAMP demo - PHP recipe
  • 38. LAMP demo - MySQL attrs & recipe
  • 39. LAMP demo - vagrant up