SlideShare une entreprise Scribd logo
1  sur  16
Virtualization for
Developers
John Coggeshall
@coogle
http://www.coggeshall.org/
2
•A bit about me
oInvolved with PHP since
1996
oAuthor of tidy extension
oPublished Author of
many PHP texts
Welcome
3
•Virtualization for you, the developer
o Creating fully encapsulated development environments
→Fully Version Controlled
o Available locally using free tools or deploy to EC2 as necessary
•The technologies we are going to discuss
o Vagrant – Bootstrap virtual machines, manage box settings, etc.
o VirtualBox – Provides the actual VM environment for machine
o Puppet – Provisions box, installs and manages various software,
code, etc. (also supports others such as Chef, shell scripts, etc.)
What we’re going to be talking about today
4
How it all fits together
5
•There are a lot of reasons to use VMs for development
o Keep your host machine clean / easily recover from corruption
o Keep separate projects from stepping on each other
o Super easy developer on-boarding
•There are even more reasons to use Vagrant & Puppet
o Much easier management of the stack, versions, etc.
o Allows seamless deployment to various environments for testing
Why Virtualization?
6
•To get started, you’re going to need to download two
pieces of software
o Vagrant - http://www.vagrantup.com/
o VirtualBox - https://www.virtualbox.org/
•There are builds available for all major platforms
Getting Started
7
•Step 1: Download the tools
•Step 2: Define your VM parameters
•Step 3: Build your puppet manifests
•Step 4: Prosper
The steps to building your VM
8
•Every repository should have a Vagrantfile in the root
directory that defines the VM itself
o Ruby based, but no Ruby knowledge required
•Defines a few key aspects of your initial VM configuration
o Base VM type used (various available)
o Network configuration for VM in relation to host machine
o Provisioning tooling used (i.e. puppet)
o VM resource limits (memory, etc)
•Different configurations can be defined for different
environments, and propagated throughout the process
Defining your VM Parameters
9
•Once the VM has been defined vagrant can boot it up as a
headless VM (no display) using VirtualBox automatically and
configure it as necessary
•Once booted, it can then provision the box by installing
software packages, shared paths with hosts, etc. as
necessary through the use of provisioning tools like puppet
•Next step is defining your puppet manifests
Defining your Puppet Manifests
10
•With everything defined, one command takes care of it all!
o Downloads the VirtualBox image if necessary (precise64)
o Boots the VM with the defined parameters (memory, network,
etc)
o Sets of shared folders, copies puppet manifests as necessary and
executes puppet to run those manifests
That’s it!
11
• vagrant up – Brings up the virtual machine
• vagrant halt – Halts the VM (poweroff)
• vagrant destroy – Destroys the VM entirely
• vagrant provision – Run puppet provisioning again
• vagrant ssh – automagically log into the VM via SSH
Important Vagrant commands
12
•Primarily Vagrant is used to build local VMs for
development
•But Vagrant can also be used to deploy to other
environments, such as AWS through the use of Vagrant
plug-ins
• First, install the Vagrant AWS provider plug-in:
Deploying to AWS
13
•Next, you will need to add a new environment to your
Vagrantfile to setup the necessary configuration values for
AWS such as Key/Secret, AMI type, etc.
•Note: To do provisioning using puppet, you may need to
bootstrap the AMI on boot to install the puppet tooling
•To boot, simply add the --provider option to vagrant up
Deploying to AWS
14
•A single Vagrantfile can define multiple VMs (multi-machine
environments) useful for all sorts of things:
o A web server and database server
o API client and server
o Etc.
•Vagrant can do more than just VirtualBox as well, through
providers can also provide VMWareVMs, etc.
Other cool tricks
15
•Vagrantfile configuration files can be created at various
levels, and will be merged together to define/override
settings
o Box itself (precise64)
o Home directory (~/.vagrant.d)
o Project directory
Other cool tricks
16
•Thank you for coming!
•Questions?
•If you loved the talk, please login to joind.in and rate me!
(If you hated the talk, please anonymously troll me)
o https://joind.in/9061
•Further Reading:
o http://docs.vagrantup.com/v2/
o http://puppetlabs.com/
Thank you! Questions?

Contenu connexe

Tendances

Tendances (20)

Vagrant: The Oscar Plug-in
Vagrant: The Oscar Plug-inVagrant: The Oscar Plug-in
Vagrant: The Oscar Plug-in
 
Webinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
Webinar - Auto-deploy Puppet Enterprise: Vagrant and OscarWebinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
Webinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
 
Vagrant presentation
Vagrant presentationVagrant presentation
Vagrant presentation
 
Building with Virtual Development Environments
Building with Virtual Development EnvironmentsBuilding with Virtual Development Environments
Building with Virtual Development Environments
 
Vagrant & Docker
Vagrant & DockerVagrant & Docker
Vagrant & Docker
 
Building with Virtual Development Environments
Building with Virtual Development EnvironmentsBuilding with Virtual Development Environments
Building with Virtual Development Environments
 
OpenNebula Administrator View
OpenNebula Administrator ViewOpenNebula Administrator View
OpenNebula Administrator View
 
JRuby deployments
JRuby deploymentsJRuby deployments
JRuby deployments
 
Local development environment through virtualisation
Local development environment through virtualisationLocal development environment through virtualisation
Local development environment through virtualisation
 
MongoDB on CloudFoundry
MongoDB on CloudFoundryMongoDB on CloudFoundry
MongoDB on CloudFoundry
 
CloudFoundry@home
CloudFoundry@homeCloudFoundry@home
CloudFoundry@home
 
Don't worry with bower
Don't worry with bowerDon't worry with bower
Don't worry with bower
 
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian HeiglOpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
Improved development workflows using vagrant
Improved development workflows using vagrantImproved development workflows using vagrant
Improved development workflows using vagrant
 
Docker Introduction at GDG DevFest 2015 Lagos
Docker Introduction at GDG DevFest 2015 Lagos Docker Introduction at GDG DevFest 2015 Lagos
Docker Introduction at GDG DevFest 2015 Lagos
 
How Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project FeedbackHow Can OpenNebula Fit Your Needs: A European Project Feedback
How Can OpenNebula Fit Your Needs: A European Project Feedback
 
Foundation of starting your drupal project to vagrant environment
Foundation of starting your drupal project to vagrant environmentFoundation of starting your drupal project to vagrant environment
Foundation of starting your drupal project to vagrant environment
 
Containers in 5... 9 minutes
Containers in 5... 9 minutesContainers in 5... 9 minutes
Containers in 5... 9 minutes
 
Ansible & Vagrant
Ansible & VagrantAnsible & Vagrant
Ansible & Vagrant
 

En vedette (10)

Do you queue
Do you queueDo you queue
Do you queue
 
Zend server 6 compliance
Zend server 6  complianceZend server 6  compliance
Zend server 6 compliance
 
Práticas DevOps com Zend Server
Práticas DevOps com Zend ServerPráticas DevOps com Zend Server
Práticas DevOps com Zend Server
 
Ppt polos para polo patagonia norte
Ppt polos para polo patagonia nortePpt polos para polo patagonia norte
Ppt polos para polo patagonia norte
 
Alumni As Advocates
Alumni As AdvocatesAlumni As Advocates
Alumni As Advocates
 
Cartoons History
Cartoons HistoryCartoons History
Cartoons History
 
Department Of Labor Presentation
Department Of Labor PresentationDepartment Of Labor Presentation
Department Of Labor Presentation
 
Modernize Your Drupal Development
Modernize Your Drupal DevelopmentModernize Your Drupal Development
Modernize Your Drupal Development
 
My recommendations
My recommendations My recommendations
My recommendations
 
Kelly Broadbent 2009
Kelly Broadbent 2009Kelly Broadbent 2009
Kelly Broadbent 2009
 

Similaire à Virtualization for Developers

Powering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with VagrantPowering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with Vagrant
Coen Jacobs
 
Avoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and VagrantAvoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and Vagrant
andygale
 
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
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
Hendrik Ebbers
 
Vagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundVagrant-Binding JUG Dortmund
Vagrant-Binding JUG Dortmund
Hendrik Ebbers
 
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
 
Itb2018 cf apps to dev to production with command box cf-config docker
Itb2018   cf apps to dev to production with command box cf-config dockerItb2018   cf apps to dev to production with command box cf-config docker
Itb2018 cf apps to dev to production with command box cf-config docker
Ortus Solutions, Corp
 

Similaire à Virtualization for Developers (20)

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
 
Powering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with VagrantPowering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with Vagrant
 
Avoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and VagrantAvoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and Vagrant
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with Chef
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
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-
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
 
Automating with ansible (Part B)
Automating with ansible (Part B)Automating with ansible (Part B)
Automating with ansible (Part B)
 
Vagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundVagrant-Binding JUG Dortmund
Vagrant-Binding JUG Dortmund
 
Packaging tool options
Packaging tool optionsPackaging tool options
Packaging tool options
 
Vagrant For DevOps
Vagrant For DevOpsVagrant For DevOps
Vagrant For DevOps
 
ITB2019 Scaling with CommandBox in Production! - Brad Wood
ITB2019 Scaling with CommandBox in Production! - Brad WoodITB2019 Scaling with CommandBox in Production! - Brad Wood
ITB2019 Scaling with CommandBox in Production! - Brad Wood
 
Vagrantfordevops
VagrantfordevopsVagrantfordevops
Vagrantfordevops
 
Deployment automation
Deployment automationDeployment automation
Deployment automation
 
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
 
Itb2018 cf apps to dev to production with command box cf-config docker
Itb2018   cf apps to dev to production with command box cf-config dockerItb2018   cf apps to dev to production with command box cf-config docker
Itb2018 cf apps to dev to production with command box cf-config docker
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and Docker
 
Devops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As Code
Devops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As CodeDevops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As Code
Devops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As Code
 
Security Testing Using Infrastructure-As-Code
Security Testing Using Infrastructure-As-CodeSecurity Testing Using Infrastructure-As-Code
Security Testing Using Infrastructure-As-Code
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 

Plus de John Coggeshall

Plus de John Coggeshall (20)

Migrating to PHP 7
Migrating to PHP 7Migrating to PHP 7
Migrating to PHP 7
 
Peek at PHP 7
Peek at PHP 7Peek at PHP 7
Peek at PHP 7
 
ZF2 Modules: Events, Services, and of course, modularity
ZF2 Modules: Events, Services, and of course, modularityZF2 Modules: Events, Services, and of course, modularity
ZF2 Modules: Events, Services, and of course, modularity
 
PHP Development for Google Glass using Phass
PHP Development for Google Glass using PhassPHP Development for Google Glass using Phass
PHP Development for Google Glass using Phass
 
Development with Vagrant
Development with VagrantDevelopment with Vagrant
Development with Vagrant
 
Introduction to Zend Framework 2
Introduction to Zend Framework 2Introduction to Zend Framework 2
Introduction to Zend Framework 2
 
10 things not to do at a Startup
10 things not to do at a Startup10 things not to do at a Startup
10 things not to do at a Startup
 
Puppet
PuppetPuppet
Puppet
 
Building PHP Powered Android Applications
Building PHP Powered Android ApplicationsBuilding PHP Powered Android Applications
Building PHP Powered Android Applications
 
Ria Applications And PHP
Ria Applications And PHPRia Applications And PHP
Ria Applications And PHP
 
Beyond the Browser
Beyond the BrowserBeyond the Browser
Beyond the Browser
 
Apache Con 2008 Top 10 Mistakes
Apache Con 2008 Top 10 MistakesApache Con 2008 Top 10 Mistakes
Apache Con 2008 Top 10 Mistakes
 
Ria Development With Flex And PHP
Ria Development With Flex And PHPRia Development With Flex And PHP
Ria Development With Flex And PHP
 
Top 10 Scalability Mistakes
Top 10 Scalability MistakesTop 10 Scalability Mistakes
Top 10 Scalability Mistakes
 
Enterprise PHP: A Case Study
Enterprise PHP: A Case StudyEnterprise PHP: A Case Study
Enterprise PHP: A Case Study
 
Building Dynamic Web Applications on i5 with PHP
Building Dynamic Web Applications on i5 with PHPBuilding Dynamic Web Applications on i5 with PHP
Building Dynamic Web Applications on i5 with PHP
 
PHP Security Basics
PHP Security BasicsPHP Security Basics
PHP Security Basics
 
Migrating from PHP 4 to PHP 5
Migrating from PHP 4 to PHP 5Migrating from PHP 4 to PHP 5
Migrating from PHP 4 to PHP 5
 
Ajax and PHP
Ajax and PHPAjax and PHP
Ajax and PHP
 
Top 10 Scalability Mistakes
Top 10 Scalability MistakesTop 10 Scalability Mistakes
Top 10 Scalability Mistakes
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Virtualization for Developers

  • 2. 2 •A bit about me oInvolved with PHP since 1996 oAuthor of tidy extension oPublished Author of many PHP texts Welcome
  • 3. 3 •Virtualization for you, the developer o Creating fully encapsulated development environments →Fully Version Controlled o Available locally using free tools or deploy to EC2 as necessary •The technologies we are going to discuss o Vagrant – Bootstrap virtual machines, manage box settings, etc. o VirtualBox – Provides the actual VM environment for machine o Puppet – Provisions box, installs and manages various software, code, etc. (also supports others such as Chef, shell scripts, etc.) What we’re going to be talking about today
  • 4. 4 How it all fits together
  • 5. 5 •There are a lot of reasons to use VMs for development o Keep your host machine clean / easily recover from corruption o Keep separate projects from stepping on each other o Super easy developer on-boarding •There are even more reasons to use Vagrant & Puppet o Much easier management of the stack, versions, etc. o Allows seamless deployment to various environments for testing Why Virtualization?
  • 6. 6 •To get started, you’re going to need to download two pieces of software o Vagrant - http://www.vagrantup.com/ o VirtualBox - https://www.virtualbox.org/ •There are builds available for all major platforms Getting Started
  • 7. 7 •Step 1: Download the tools •Step 2: Define your VM parameters •Step 3: Build your puppet manifests •Step 4: Prosper The steps to building your VM
  • 8. 8 •Every repository should have a Vagrantfile in the root directory that defines the VM itself o Ruby based, but no Ruby knowledge required •Defines a few key aspects of your initial VM configuration o Base VM type used (various available) o Network configuration for VM in relation to host machine o Provisioning tooling used (i.e. puppet) o VM resource limits (memory, etc) •Different configurations can be defined for different environments, and propagated throughout the process Defining your VM Parameters
  • 9. 9 •Once the VM has been defined vagrant can boot it up as a headless VM (no display) using VirtualBox automatically and configure it as necessary •Once booted, it can then provision the box by installing software packages, shared paths with hosts, etc. as necessary through the use of provisioning tools like puppet •Next step is defining your puppet manifests Defining your Puppet Manifests
  • 10. 10 •With everything defined, one command takes care of it all! o Downloads the VirtualBox image if necessary (precise64) o Boots the VM with the defined parameters (memory, network, etc) o Sets of shared folders, copies puppet manifests as necessary and executes puppet to run those manifests That’s it!
  • 11. 11 • vagrant up – Brings up the virtual machine • vagrant halt – Halts the VM (poweroff) • vagrant destroy – Destroys the VM entirely • vagrant provision – Run puppet provisioning again • vagrant ssh – automagically log into the VM via SSH Important Vagrant commands
  • 12. 12 •Primarily Vagrant is used to build local VMs for development •But Vagrant can also be used to deploy to other environments, such as AWS through the use of Vagrant plug-ins • First, install the Vagrant AWS provider plug-in: Deploying to AWS
  • 13. 13 •Next, you will need to add a new environment to your Vagrantfile to setup the necessary configuration values for AWS such as Key/Secret, AMI type, etc. •Note: To do provisioning using puppet, you may need to bootstrap the AMI on boot to install the puppet tooling •To boot, simply add the --provider option to vagrant up Deploying to AWS
  • 14. 14 •A single Vagrantfile can define multiple VMs (multi-machine environments) useful for all sorts of things: o A web server and database server o API client and server o Etc. •Vagrant can do more than just VirtualBox as well, through providers can also provide VMWareVMs, etc. Other cool tricks
  • 15. 15 •Vagrantfile configuration files can be created at various levels, and will be merged together to define/override settings o Box itself (precise64) o Home directory (~/.vagrant.d) o Project directory Other cool tricks
  • 16. 16 •Thank you for coming! •Questions? •If you loved the talk, please login to joind.in and rate me! (If you hated the talk, please anonymously troll me) o https://joind.in/9061 •Further Reading: o http://docs.vagrantup.com/v2/ o http://puppetlabs.com/ Thank you! Questions?