SlideShare a Scribd company logo
Virtualization for Developers
John Coggeshall
@coogle
http://www.coggeshall.org/
Welcome
 A bit about me
Involved with PHP since
1996
Author of tidy extension
Published Author of
many PHP texts
What we’re going to be talking about
today
 Virtualization for you, the developer
 Creating fully encapsulated development environments
▪ Fully Version Controlled
 Available locally using free tools or deploy to EC2 as
necessary
 The technologies we are going to discuss
 Vagrant – Bootstrap virtual machines, manage box settings,
etc.
 VirtualBox – Provides the actual VM environment for
machine
 Puppet – Provisions box, installs and manages various
software, code, etc. (also supports others such as Chef, shell
scripts, etc.)
How it all fits together
Why Virtualization?
 There are a lot of reasons to use VMs for
development
Keep your host machine clean / easily recover from
corruption
Keep separate projects from stepping on each other
Super easy developer on-boarding
 There are even more reasons to use Vagrant &
Puppet
Much easier management of the stack, versions, etc.
Allows seamless deployment to various environments
for testing
Getting Started
 To get started, you’re going to need to
download two pieces of software
Vagrant - http://www.vagrantup.com/
VirtualBox - https://www.virtualbox.org/
 There are builds available for all major
platforms
The steps to building your VM
 Step 1: Download the tools
 Step 2: Define your VM parameters
 Step 3: Build your puppet manifests
 Step 4: Prosper
Defining your VM Parameters
 Every repository should have a Vagrantfile in the root
directory that defines the VM itself
 Ruby based, but no Ruby knowledge required
 Defines a few key aspects of your initial VM
configuration
 Base VM type used (various available)
 Network configuration for VM in relation to host machine
 Provisioning tooling used (i.e. puppet)
 VM resource limits (memory, etc)
 Different configurations can be defined for different
environments, and propagated throughout the
process
Defining your Puppet Manifests
 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
That’s it!
 With everything defined, one command takes care
of it all!
Downloads the VirtualBox image if necessary
(precise64)
Boots the VM with the defined parameters (memory,
network, etc)
Sets of shared folders, copies puppet manifests as
necessary and executes puppet to run those manifests
Important Vagrant commands
 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
Deploying to AWS
 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
 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
Other cool tricks
 A single Vagrantfile can define multiple VMs
(multi-machine environments) useful for all
sorts of things:
A web server and database server
API client and server
Etc.
 Vagrant can do more than just VirtualBox as
well, through providers can also provide
VMWare VMs, etc.
Other cool tricks
 Vagrantfile configuration files can be created
at various levels, and will be merged together
to define/override settings
Box itself (precise64)
Home directory (~/.vagrant.d)
Project directory
Thank you! Questions?
 Thank you for coming!
 Questions?
 Further Reading:
http://docs.vagrantup.com/v2/
http://puppetlabs.com/
http://www.github.com/coogle/skeleton

More Related Content

PPTX
Virtualization for Developers
PPTX
Virtualization for Developers
PPTX
PPTX
Vagrant-Overview
PPTX
Vagrant 101 Workshop
PDF
Introduction to Vagrant
PDF
Vagrant for Virtualized Development
PDF
An Introduction to Vagrant and Docker
Virtualization for Developers
Virtualization for Developers
Vagrant-Overview
Vagrant 101 Workshop
Introduction to Vagrant
Vagrant for Virtualized Development
An Introduction to Vagrant and Docker

What's hot (20)

PPTX
Vagrant + Docker
PPTX
How To Set a Vagrant Development System
PPTX
Vagrant
PPTX
Vagrant
KEY
PPTX
Development with Vagrant
PPTX
Node.js, Vagrant, Chef, and Mathoid @ Benetech
PPTX
Vagrant crash course
PDF
Vagrant presentation
PDF
Vagrant: The Oscar Plug-in
PPTX
Webinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
PDF
Deployment automation
PDF
Vagrant + Docker provider [+Puppet]
PDF
Vagrant for real (codemotion rome 2016)
PDF
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
PPTX
Using vagrant
ODP
Building (localized) Vagrant boxes with Packer
PDF
Vagrant for Development
PPTX
Foundation of starting your drupal project to vagrant environment
PDF
Create your very own Development Environment with Vagrant and Packer
Vagrant + Docker
How To Set a Vagrant Development System
Vagrant
Vagrant
Development with Vagrant
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Vagrant crash course
Vagrant presentation
Vagrant: The Oscar Plug-in
Webinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
Deployment automation
Vagrant + Docker provider [+Puppet]
Vagrant for real (codemotion rome 2016)
Oscar: Rapid Iteration with Vagrant and Puppet Enterprise - PuppetConf 2013
Using vagrant
Building (localized) Vagrant boxes with Packer
Vagrant for Development
Foundation of starting your drupal project to vagrant environment
Create your very own Development Environment with Vagrant and Packer
Ad

Similar to Virtualization for Developers (20)

PDF
Keep calm and vagrant up
PPTX
Harmonious Development: Via Vagrant and Puppet
PDF
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
PDF
Local development environment through virtualisation
PDF
Intro to vagrant
PDF
Powering Development and Testing Environments with Vagrant
PDF
Instant LAMP Stack with Vagrant and Puppet
PDF
Puppet and Vagrant in development
PDF
Vagrant workshop 2015
PPTX
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
PDF
Take Home Your Very Own Free Vagrant CFML Dev Environment
PDF
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
PDF
Create Disposable Test Environments with Vagrant and Puppet
PDF
Create Disposable Test Environments with Vagrant and Puppet
PDF
Vagrant For DevOps
PDF
Virtualization with Vagrant (ua.pycon 2011)
PDF
Security Testing Using Infrastructure-As-Code
ODP
It Works On My Machine: Vagrant for Software Development
PDF
Improved development workflows using vagrant
PDF
Using Vagrant for Local WordPress Development
Keep calm and vagrant up
Harmonious Development: Via Vagrant and Puppet
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
Local development environment through virtualisation
Intro to vagrant
Powering Development and Testing Environments with Vagrant
Instant LAMP Stack with Vagrant and Puppet
Puppet and Vagrant in development
Vagrant workshop 2015
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Take Home Your Very Own Free Vagrant CFML Dev Environment
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Create Disposable Test Environments with Vagrant and Puppet
Create Disposable Test Environments with Vagrant and Puppet
Vagrant For DevOps
Virtualization with Vagrant (ua.pycon 2011)
Security Testing Using Infrastructure-As-Code
It Works On My Machine: Vagrant for Software Development
Improved development workflows using vagrant
Using Vagrant for Local WordPress Development
Ad

More from John Coggeshall (20)

PPTX
Migrating to PHP 7
PPTX
Peek at PHP 7
PPTX
ZF2 Modules: Events, Services, and of course, modularity
PPT
PHP Development for Google Glass using Phass
PPTX
Introduction to Zend Framework 2
PPTX
10 things not to do at a Startup
PPTX
PPT
Building PHP Powered Android Applications
PPT
Ria Applications And PHP
PPT
Beyond the Browser
PPT
Apache Con 2008 Top 10 Mistakes
PPT
Ria Development With Flex And PHP
PPT
Top 10 Scalability Mistakes
PPT
Enterprise PHP: A Case Study
PPT
Building Dynamic Web Applications on i5 with PHP
PPT
PHP Security Basics
PPT
Migrating from PHP 4 to PHP 5
PPT
Ajax and PHP
PPT
Top 10 Scalability Mistakes
PPT
Top 30 Scalability Mistakes
Migrating to PHP 7
Peek at PHP 7
ZF2 Modules: Events, Services, and of course, modularity
PHP Development for Google Glass using Phass
Introduction to Zend Framework 2
10 things not to do at a Startup
Building PHP Powered Android Applications
Ria Applications And PHP
Beyond the Browser
Apache Con 2008 Top 10 Mistakes
Ria Development With Flex And PHP
Top 10 Scalability Mistakes
Enterprise PHP: A Case Study
Building Dynamic Web Applications on i5 with PHP
PHP Security Basics
Migrating from PHP 4 to PHP 5
Ajax and PHP
Top 10 Scalability Mistakes
Top 30 Scalability Mistakes

Recently uploaded (20)

PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PDF
The Internet -By the Numbers, Sri Lanka Edition
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PDF
Sims 4 Historia para lo sims 4 para jugar
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PDF
Testing WebRTC applications at scale.pdf
DOCX
Unit-3 cyber security network security of internet system
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PPTX
Introduction to Information and Communication Technology
WebRTC in SignalWire - troubleshooting media negotiation
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
QR Codes Qr codecodecodecodecocodedecodecode
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
international classification of diseases ICD-10 review PPT.pptx
presentation_pfe-universite-molay-seltan.pptx
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Cloud-Scale Log Monitoring _ Datadog.pdf
Introuction about WHO-FIC in ICD-10.pptx
The Internet -By the Numbers, Sri Lanka Edition
Paper PDF World Game (s) Great Redesign.pdf
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Tenda Login Guide: Access Your Router in 5 Easy Steps
An introduction to the IFRS (ISSB) Stndards.pdf
Sims 4 Historia para lo sims 4 para jugar
Decoding a Decade: 10 Years of Applied CTI Discipline
Testing WebRTC applications at scale.pdf
Unit-3 cyber security network security of internet system
Triggering QUIC, presented by Geoff Huston at IETF 123
Introduction to Information and Communication Technology

Virtualization for Developers

  • 1. Virtualization for Developers John Coggeshall @coogle http://www.coggeshall.org/
  • 2. Welcome  A bit about me Involved with PHP since 1996 Author of tidy extension Published Author of many PHP texts
  • 3. What we’re going to be talking about today  Virtualization for you, the developer  Creating fully encapsulated development environments ▪ Fully Version Controlled  Available locally using free tools or deploy to EC2 as necessary  The technologies we are going to discuss  Vagrant – Bootstrap virtual machines, manage box settings, etc.  VirtualBox – Provides the actual VM environment for machine  Puppet – Provisions box, installs and manages various software, code, etc. (also supports others such as Chef, shell scripts, etc.)
  • 4. How it all fits together
  • 5. Why Virtualization?  There are a lot of reasons to use VMs for development Keep your host machine clean / easily recover from corruption Keep separate projects from stepping on each other Super easy developer on-boarding  There are even more reasons to use Vagrant & Puppet Much easier management of the stack, versions, etc. Allows seamless deployment to various environments for testing
  • 6. Getting Started  To get started, you’re going to need to download two pieces of software Vagrant - http://www.vagrantup.com/ VirtualBox - https://www.virtualbox.org/  There are builds available for all major platforms
  • 7. The steps to building your VM  Step 1: Download the tools  Step 2: Define your VM parameters  Step 3: Build your puppet manifests  Step 4: Prosper
  • 8. Defining your VM Parameters  Every repository should have a Vagrantfile in the root directory that defines the VM itself  Ruby based, but no Ruby knowledge required  Defines a few key aspects of your initial VM configuration  Base VM type used (various available)  Network configuration for VM in relation to host machine  Provisioning tooling used (i.e. puppet)  VM resource limits (memory, etc)  Different configurations can be defined for different environments, and propagated throughout the process
  • 9. Defining your Puppet Manifests  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
  • 10. That’s it!  With everything defined, one command takes care of it all! Downloads the VirtualBox image if necessary (precise64) Boots the VM with the defined parameters (memory, network, etc) Sets of shared folders, copies puppet manifests as necessary and executes puppet to run those manifests
  • 11. Important Vagrant commands  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
  • 12. Deploying to AWS  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:
  • 13. Deploying to AWS  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
  • 14. Other cool tricks  A single Vagrantfile can define multiple VMs (multi-machine environments) useful for all sorts of things: A web server and database server API client and server Etc.  Vagrant can do more than just VirtualBox as well, through providers can also provide VMWare VMs, etc.
  • 15. Other cool tricks  Vagrantfile configuration files can be created at various levels, and will be merged together to define/override settings Box itself (precise64) Home directory (~/.vagrant.d) Project directory
  • 16. Thank you! Questions?  Thank you for coming!  Questions?  Further Reading: http://docs.vagrantup.com/v2/ http://puppetlabs.com/ http://www.github.com/coogle/skeleton