SlideShare a Scribd company logo
1 of 29
Download to read offline
Oscar Merida
January 21, 2014
Building with Virtual
Development Environments
Musketeers.me
What will we look at?
• Benefits of using a Virtual Machine
• Setting up a virtual environment
• Updating your workflow
Musketeers.me
Who uses…
• XAMP, MAMP?
• Acquia Dev Desktop?
• Homebrew, Ports, etc?
• Shared development environment?
• Production?!
Musketeers.me
Early Tools were Crude
• “One-size-fits-all”
• Difficult to customize per
site, or may not support
multiple projects
• Tricky to update
• Inconsistent across
individuals
Musketeers.me
Projects are special
snowflakes
• Different PHP versions / extensions
• Different databases / versions
• What about additional services
• Redis?
• Memcached?
Musketeers.me
Common pitfalls
• Mismatches between development,
staging, QA, & production environments
• bugs that “only happen on live”
• Setup can be tedious and fragile
• Setup is poorly documented
Musketeers.me
Virtualization
• Use a Virtual Machine (VM) identical
to production environment.
• Automate setting up the VM, aka
“Provisioning”
• Share setup more easily with
collaborators.
Musketeers.me
Virtualization?
• “Hardware virtualization or platform virtualization
refers to the creation of a virtual machine that acts
like a real computer with an operating system.
Software executed on these virtual machines is
separated from the underlying hardware resources.
For example, a computer that is running Microsoft
Windows may host a virtual machine that looks like
a computer with the Ubuntu Linux operating
system; Ubuntu-based software can be run on the
virtual machine.”
• http://en.wikipedia.org/wiki/Virtualization
Musketeers.me
Virtualbox
• Free & Open Source Virtualization
software
• https://www.virtualbox.org
• Runs on Windows, Linux, Mac (+more)
• https://www.virtualbox.org/wiki/Downloads
• There’s also VMWare, Parallels, and others…
Musketeers.me
Hardware
• Memory helps — a lot
• need enough to dedicate to the
Guest OS
• Disk space
• use files to represent and persist
virtual hard disk storage
Musketeers.me
Vagrant
• “A tool for building complete
development environments”
• https://www.vagrantup.com/
• A Vagrantfile + provisioner
automatically configures a VM Box for
you.
• … but someone has to make it
Musketeers.me
OK, let’s get to the
good stuff already!
• Assuming you’ve installed Vagrant &
Virtualbox…
• What’s the easiest way to get a VM
working?
Musketeers.me
PuPHPet (puffet)
• Online GUI to create
Virtual Machines
• Choose base OS, PHP,
Mysql, and more
• Download a zip file with
Vagrantfile and
supporting files
Musketeers.me
Musketeers.me
Using your Vagrantfile
• Tip: extract the zip file to your
project’s root directory
• Basic vagrant commands:
• vagrant up - start up the VM
• vagrant ssh - SSH to the VM
Musketeers.me
Other Vagrant commands
• vagrant suspend - put the VM to sleep,
use this between work sessions.
• vagrant stop - turn off the VM.
• vagrant destroy - delete the VM,
CAUTION!
Musketeers.me
Musketeers.me
Ooooh, A VM…
• working with files
• viewing your development site in a
browser
• running drush
Musketeers.me
Mapped folders
• By default Vagrant maps your project’s
folder on the Host OS to

/vagrant on the Guest OS.
• For example
• If your project is /home/omerida/drupal8
• The same files are in /vagrant on your VM
Musketeers.me
File permissions gotcha
• Need to insure web server can write
to /sites/default/files
• mount with “anyone can write” file
permissions
• run apache as the vagrant user
• add apache to the vagrant group
• https://www.drupal.org/node/2055947
Musketeers.me
This means…
• Work on PHP, CSS, image, and other files
locally with your favorite IDE, text editor,
and other programs.
• … and the changes are automatically
reflected in your Virtual Environment
• I’ve found default shared maps fine,
some people recommend using NSF but
that involves more setup
Musketeers.me
Browsing your site
• Your Vagrantfile will setup networking so that
the VM is accessible from the Guest OS,
Usually a private address like 192.168.33.10
• Add this IP to your /etc/hosts file
•192.168.33.10 project.dev
• On windows Hosts file is trickier to find.
• You’ll need admin privileges to edit
• Go to “http://project.dev” in your browser
Musketeers.me
Running drush
• vagrant ssh to login to the VM
• > cd /web
• > drush status
• Can install drush from your Guest OS
package repository
Musketeers.me
Vagrant Drupal
Development
• https://www.drupal.org/project/vdd
• Fully configured Linux based VM
• Ubuntu 12.04 LTS
Musketeers.me
Collaboration tips
• One person responsible for initial
setup and configuration
• Commit your Vagrantfile + related
files to your code repository
• Standardize on Virtualbox & Vagrant
versions
Musketeers.me
Provisioners
• You might outgrow PuPHPet (or
phansible.com)
• Various options for automating
• Puppet
• Chef
• Ansible
• Shell Scripts
Musketeers.me
Other Use Cases
• Will my code run with PHP 5.6?
• What if I switch Mysql for Percona,
MariaDB, etc
• Redis or memcached for caching?
• How do I setup Varnish for my site?
Musketeers.me
Testing Drupal 8
• Get Drupal 8 running:
• https://github.com/omerida/drupal8-
vm
• https://github.com/SandyS1/d8ansible
Musketeers.me
Thank You!
• Twitter: @omerida
• Editor-in-Chief php[architect] magazine
• plus Conferences, Training, and books
• www.phparch.com
• Any Questions?

More Related Content

What's hot

Azure VM base images with Packer, Ansble and Vagrant
Azure VM base images with Packer, Ansble and VagrantAzure VM base images with Packer, Ansble and Vagrant
Azure VM base images with Packer, Ansble and VagrantBas Meijer
 
Advanced front-end automation with npm scripts
Advanced front-end automation with npm scriptsAdvanced front-end automation with npm scripts
Advanced front-end automation with npm scriptsk88hudson
 
Node.js 101 with Rami Sayar
Node.js 101 with Rami SayarNode.js 101 with Rami Sayar
Node.js 101 with Rami SayarFITC
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for DevelopersJohn Coggeshall
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeWO Community
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful APISang Cù
 
Webconf nodejs-production-architecture
Webconf nodejs-production-architectureWebconf nodejs-production-architecture
Webconf nodejs-production-architectureBen Lin
 
Afrimadoni the power of docker
Afrimadoni   the power of dockerAfrimadoni   the power of docker
Afrimadoni the power of dockerPHP Indonesia
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentIrfan Maulana
 
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 VagrantCoen Jacobs
 
Vagrant: The Oscar Plug-in
Vagrant: The Oscar Plug-inVagrant: The Oscar Plug-in
Vagrant: The Oscar Plug-inJeff Scelza
 
MongoDB on CloudFoundry
MongoDB on CloudFoundryMongoDB on CloudFoundry
MongoDB on CloudFoundryYohei Sasaki
 
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsTomas Doran
 
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 OscarOlinData
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJSZahid Mahir
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJSHüseyin BABAL
 
The Kitchen Cloud How To: Automating Joyent SmartMachines with Chef
The Kitchen Cloud How To: Automating Joyent SmartMachines with ChefThe Kitchen Cloud How To: Automating Joyent SmartMachines with Chef
The Kitchen Cloud How To: Automating Joyent SmartMachines with ChefChef Software, Inc.
 

What's hot (20)

Azure VM base images with Packer, Ansble and Vagrant
Azure VM base images with Packer, Ansble and VagrantAzure VM base images with Packer, Ansble and Vagrant
Azure VM base images with Packer, Ansble and Vagrant
 
Advanced front-end automation with npm scripts
Advanced front-end automation with npm scriptsAdvanced front-end automation with npm scripts
Advanced front-end automation with npm scripts
 
Node.js 101 with Rami Sayar
Node.js 101 with Rami SayarNode.js 101 with Rami Sayar
Node.js 101 with Rami Sayar
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
 
Node.js debugging
Node.js debuggingNode.js debugging
Node.js debugging
 
Webconf nodejs-production-architecture
Webconf nodejs-production-architectureWebconf nodejs-production-architecture
Webconf nodejs-production-architecture
 
Afrimadoni the power of docker
Afrimadoni   the power of dockerAfrimadoni   the power of docker
Afrimadoni the power of docker
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
 
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
 
Nodejs web,db,hosting
Nodejs web,db,hostingNodejs web,db,hosting
Nodejs web,db,hosting
 
Vagrant: The Oscar Plug-in
Vagrant: The Oscar Plug-inVagrant: The Oscar Plug-in
Vagrant: The Oscar Plug-in
 
MongoDB on CloudFoundry
MongoDB on CloudFoundryMongoDB on CloudFoundry
MongoDB on CloudFoundry
 
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsChasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
Chasing AMI - Building Amazon machine images with Puppet, Packer and Jenkins
 
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
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
The Kitchen Cloud How To: Automating Joyent SmartMachines with Chef
The Kitchen Cloud How To: Automating Joyent SmartMachines with ChefThe Kitchen Cloud How To: Automating Joyent SmartMachines with Chef
The Kitchen Cloud How To: Automating Joyent SmartMachines with Chef
 
CloudFoundry@home
CloudFoundry@homeCloudFoundry@home
CloudFoundry@home
 

Viewers also liked

Vagrant: Your Personal Cloud
Vagrant: Your Personal CloudVagrant: Your Personal Cloud
Vagrant: Your Personal CloudJames Wickett
 
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 Packerfrastel
 
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)Japheth Thomson
 
Building Windows Images with Packer
Building Windows Images with PackerBuilding Windows Images with Packer
Building Windows Images with PackerMatt Wrock
 
Irene Iaccio - Magento2 e RequireJS. The right way
Irene Iaccio - Magento2 e RequireJS. The right wayIrene Iaccio - Magento2 e RequireJS. The right way
Irene Iaccio - Magento2 e RequireJS. The right wayMeet Magento Italy
 
Federico Minzoni - Software as a Service
Federico Minzoni - Software as a ServiceFederico Minzoni - Software as a Service
Federico Minzoni - Software as a ServiceMeet Magento Italy
 
Alessandro La Ciura - Live Chat ed Ecommerce: (ma) la chat vende veramente di...
Alessandro La Ciura - Live Chat ed Ecommerce: (ma) la chat vende veramente di...Alessandro La Ciura - Live Chat ed Ecommerce: (ma) la chat vende veramente di...
Alessandro La Ciura - Live Chat ed Ecommerce: (ma) la chat vende veramente di...Meet Magento Italy
 
Giovanni Cappellotto - Come gestire le recommendation e le personalizzazioni ...
Giovanni Cappellotto - Come gestire le recommendation e le personalizzazioni ...Giovanni Cappellotto - Come gestire le recommendation e le personalizzazioni ...
Giovanni Cappellotto - Come gestire le recommendation e le personalizzazioni ...Meet Magento Italy
 
Riccardo Tempesta - The right tools for the right job (or: surviving Magento ...
Riccardo Tempesta - The right tools for the right job (or: surviving Magento ...Riccardo Tempesta - The right tools for the right job (or: surviving Magento ...
Riccardo Tempesta - The right tools for the right job (or: surviving Magento ...Meet Magento Italy
 
Roberto Fumarola - Il marketing nel post spedizione, tante opportunità da cog...
Roberto Fumarola - Il marketing nel post spedizione, tante opportunità da cog...Roberto Fumarola - Il marketing nel post spedizione, tante opportunità da cog...
Roberto Fumarola - Il marketing nel post spedizione, tante opportunità da cog...Meet Magento Italy
 
Simone Giomi - User experience per gli e-commerce: dall’analisi alla progetta...
Simone Giomi - User experience per gli e-commerce: dall’analisi alla progetta...Simone Giomi - User experience per gli e-commerce: dall’analisi alla progetta...
Simone Giomi - User experience per gli e-commerce: dall’analisi alla progetta...Meet Magento Italy
 
Andrea Zwirner - Magento security and hardening strategies
Andrea Zwirner - Magento security and hardening strategiesAndrea Zwirner - Magento security and hardening strategies
Andrea Zwirner - Magento security and hardening strategiesMeet Magento Italy
 
Usecase examples of Packer
Usecase examples of Packer Usecase examples of Packer
Usecase examples of Packer Hiroshi SHIBATA
 
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5WMauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5WMeet Magento Italy
 
Giuliana Benedetti - Can Magento handle 1M products?
Giuliana Benedetti - Can Magento handle 1M products?Giuliana Benedetti - Can Magento handle 1M products?
Giuliana Benedetti - Can Magento handle 1M products?Meet Magento Italy
 
Giulio Drei - Studio di fattibilità di un progetto eCommerce
Giulio Drei - Studio di fattibilità di un progetto eCommerceGiulio Drei - Studio di fattibilità di un progetto eCommerce
Giulio Drei - Studio di fattibilità di un progetto eCommerceMeet Magento Italy
 
Giorgio Bignozzi - How to develop a Sticker plug-in for Magento 2: best practice
Giorgio Bignozzi - How to develop a Sticker plug-in for Magento 2: best practiceGiorgio Bignozzi - How to develop a Sticker plug-in for Magento 2: best practice
Giorgio Bignozzi - How to develop a Sticker plug-in for Magento 2: best practiceMeet Magento Italy
 
Why Zsh is Cooler than Your Shell
Why Zsh is Cooler than Your ShellWhy Zsh is Cooler than Your Shell
Why Zsh is Cooler than Your Shelljaguardesignstudio
 

Viewers also liked (20)

Vagrant: Your Personal Cloud
Vagrant: Your Personal CloudVagrant: Your Personal Cloud
Vagrant: Your Personal Cloud
 
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
 
The hacker choice
The hacker choiceThe hacker choice
The hacker choice
 
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
 
Building Windows Images with Packer
Building Windows Images with PackerBuilding Windows Images with Packer
Building Windows Images with Packer
 
User Experience
User ExperienceUser Experience
User Experience
 
Irene Iaccio - Magento2 e RequireJS. The right way
Irene Iaccio - Magento2 e RequireJS. The right wayIrene Iaccio - Magento2 e RequireJS. The right way
Irene Iaccio - Magento2 e RequireJS. The right way
 
Federico Minzoni - Software as a Service
Federico Minzoni - Software as a ServiceFederico Minzoni - Software as a Service
Federico Minzoni - Software as a Service
 
Alessandro La Ciura - Live Chat ed Ecommerce: (ma) la chat vende veramente di...
Alessandro La Ciura - Live Chat ed Ecommerce: (ma) la chat vende veramente di...Alessandro La Ciura - Live Chat ed Ecommerce: (ma) la chat vende veramente di...
Alessandro La Ciura - Live Chat ed Ecommerce: (ma) la chat vende veramente di...
 
Giovanni Cappellotto - Come gestire le recommendation e le personalizzazioni ...
Giovanni Cappellotto - Come gestire le recommendation e le personalizzazioni ...Giovanni Cappellotto - Come gestire le recommendation e le personalizzazioni ...
Giovanni Cappellotto - Come gestire le recommendation e le personalizzazioni ...
 
Riccardo Tempesta - The right tools for the right job (or: surviving Magento ...
Riccardo Tempesta - The right tools for the right job (or: surviving Magento ...Riccardo Tempesta - The right tools for the right job (or: surviving Magento ...
Riccardo Tempesta - The right tools for the right job (or: surviving Magento ...
 
Roberto Fumarola - Il marketing nel post spedizione, tante opportunità da cog...
Roberto Fumarola - Il marketing nel post spedizione, tante opportunità da cog...Roberto Fumarola - Il marketing nel post spedizione, tante opportunità da cog...
Roberto Fumarola - Il marketing nel post spedizione, tante opportunità da cog...
 
Simone Giomi - User experience per gli e-commerce: dall’analisi alla progetta...
Simone Giomi - User experience per gli e-commerce: dall’analisi alla progetta...Simone Giomi - User experience per gli e-commerce: dall’analisi alla progetta...
Simone Giomi - User experience per gli e-commerce: dall’analisi alla progetta...
 
Andrea Zwirner - Magento security and hardening strategies
Andrea Zwirner - Magento security and hardening strategiesAndrea Zwirner - Magento security and hardening strategies
Andrea Zwirner - Magento security and hardening strategies
 
Usecase examples of Packer
Usecase examples of Packer Usecase examples of Packer
Usecase examples of Packer
 
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5WMauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
Mauro Lorenzutti - Il passaggio da Magento 1 a Magento 2: le 5W
 
Giuliana Benedetti - Can Magento handle 1M products?
Giuliana Benedetti - Can Magento handle 1M products?Giuliana Benedetti - Can Magento handle 1M products?
Giuliana Benedetti - Can Magento handle 1M products?
 
Giulio Drei - Studio di fattibilità di un progetto eCommerce
Giulio Drei - Studio di fattibilità di un progetto eCommerceGiulio Drei - Studio di fattibilità di un progetto eCommerce
Giulio Drei - Studio di fattibilità di un progetto eCommerce
 
Giorgio Bignozzi - How to develop a Sticker plug-in for Magento 2: best practice
Giorgio Bignozzi - How to develop a Sticker plug-in for Magento 2: best practiceGiorgio Bignozzi - How to develop a Sticker plug-in for Magento 2: best practice
Giorgio Bignozzi - How to develop a Sticker plug-in for Magento 2: best practice
 
Why Zsh is Cooler than Your Shell
Why Zsh is Cooler than Your ShellWhy Zsh is Cooler than Your Shell
Why Zsh is Cooler than Your Shell
 

Similar to Building with Virtual Development Environments

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 DockerJohn Rofrano
 
WordPress Development Environments
WordPress Development EnvironmentsWordPress Development Environments
WordPress Development EnvironmentsJosh Cummings
 
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 DockerChris Taylor
 
Using Packer to Migrate XenServer Infrastructure to CloudStack
Using Packer to Migrate XenServer Infrastructure to CloudStackUsing Packer to Migrate XenServer Infrastructure to CloudStack
Using Packer to Migrate XenServer Infrastructure to CloudStackTim Mackey
 
Oracle virtualbox basic to rac attack
Oracle virtualbox basic to rac attackOracle virtualbox basic to rac attack
Oracle virtualbox basic to rac attackBobby Curtis
 
Automate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & ChefAutomate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & Chef Michael Lihs
 
Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2
Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2
Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2John Heaton
 
Undine: Turnkey Drupal Development Environments
Undine: Turnkey Drupal Development EnvironmentsUndine: Turnkey Drupal Development Environments
Undine: Turnkey Drupal Development EnvironmentsDavid Watson
 
Docker With Asp.net Core
Docker With Asp.net CoreDocker With Asp.net Core
Docker With Asp.net CoreFatih Şimşek
 
Automated Infrastructure and Application Management
Automated Infrastructure and Application ManagementAutomated Infrastructure and Application Management
Automated Infrastructure and Application ManagementClark Everetts
 
Varying WordPress Development Environment WordCamp Cincinnati 2016
Varying WordPress Development Environment WordCamp Cincinnati 2016Varying WordPress Development Environment WordCamp Cincinnati 2016
Varying WordPress Development Environment WordCamp Cincinnati 2016David Brattoli
 
Containing the world with Docker
Containing the world with DockerContaining the world with Docker
Containing the world with DockerGiuseppe Piccolo
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVaidik Kapoor
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...Gaetano Giunta
 
Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016David Brattoli
 
Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016David Brattoli
 

Similar to Building with Virtual Development Environments (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
 
WordPress Development Environments
WordPress Development EnvironmentsWordPress Development Environments
WordPress Development Environments
 
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
 
Using Packer to Migrate XenServer Infrastructure to CloudStack
Using Packer to Migrate XenServer Infrastructure to CloudStackUsing Packer to Migrate XenServer Infrastructure to CloudStack
Using Packer to Migrate XenServer Infrastructure to CloudStack
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Oracle virtualbox basic to rac attack
Oracle virtualbox basic to rac attackOracle virtualbox basic to rac attack
Oracle virtualbox basic to rac attack
 
Automate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & ChefAutomate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & Chef
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Vagrant For DevOps
Vagrant For DevOpsVagrant For DevOps
Vagrant For DevOps
 
Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2
Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2
Virtualization VM VirtualBox + Oracle Enterprise Linux With Oracle 11GR2
 
Docker presentation for sharing
Docker presentation   for sharingDocker presentation   for sharing
Docker presentation for sharing
 
Undine: Turnkey Drupal Development Environments
Undine: Turnkey Drupal Development EnvironmentsUndine: Turnkey Drupal Development Environments
Undine: Turnkey Drupal Development Environments
 
Docker With Asp.net Core
Docker With Asp.net CoreDocker With Asp.net Core
Docker With Asp.net Core
 
Automated Infrastructure and Application Management
Automated Infrastructure and Application ManagementAutomated Infrastructure and Application Management
Automated Infrastructure and Application Management
 
Varying WordPress Development Environment WordCamp Cincinnati 2016
Varying WordPress Development Environment WordCamp Cincinnati 2016Varying WordPress Development Environment WordCamp Cincinnati 2016
Varying WordPress Development Environment WordCamp Cincinnati 2016
 
Containing the world with Docker
Containing the world with DockerContaining the world with Docker
Containing the world with Docker
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps Culture
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
 
Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016
 
Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016
 

More from Oscar Merida

Symfony console: build awesome command line scripts with ease
Symfony console: build awesome command line scripts with easeSymfony console: build awesome command line scripts with ease
Symfony console: build awesome command line scripts with easeOscar Merida
 
Integration Testing with Behat drupal
Integration Testing with Behat drupalIntegration Testing with Behat drupal
Integration Testing with Behat drupalOscar Merida
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Oscar Merida
 
How to Evaluate your Technical Partner
How to Evaluate your Technical PartnerHow to Evaluate your Technical Partner
How to Evaluate your Technical PartnerOscar Merida
 
Publishing alchemy with markdown and pandoc
Publishing alchemy with markdown and pandocPublishing alchemy with markdown and pandoc
Publishing alchemy with markdown and pandocOscar Merida
 
Migrate without migranes
Migrate without migranesMigrate without migranes
Migrate without migranesOscar Merida
 

More from Oscar Merida (10)

PHP OOP
PHP OOPPHP OOP
PHP OOP
 
Start using PHP 7
Start using PHP 7Start using PHP 7
Start using PHP 7
 
Symfony console: build awesome command line scripts with ease
Symfony console: build awesome command line scripts with easeSymfony console: build awesome command line scripts with ease
Symfony console: build awesome command line scripts with ease
 
Integration Testing with Behat drupal
Integration Testing with Behat drupalIntegration Testing with Behat drupal
Integration Testing with Behat drupal
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)
 
How to Evaluate your Technical Partner
How to Evaluate your Technical PartnerHow to Evaluate your Technical Partner
How to Evaluate your Technical Partner
 
Publishing alchemy with markdown and pandoc
Publishing alchemy with markdown and pandocPublishing alchemy with markdown and pandoc
Publishing alchemy with markdown and pandoc
 
Migrate without migranes
Migrate without migranesMigrate without migranes
Migrate without migranes
 
Hitch yourwagon
Hitch yourwagonHitch yourwagon
Hitch yourwagon
 

Recently uploaded

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Recently uploaded (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Building with Virtual Development Environments

  • 1. Oscar Merida January 21, 2014 Building with Virtual Development Environments
  • 2. Musketeers.me What will we look at? • Benefits of using a Virtual Machine • Setting up a virtual environment • Updating your workflow
  • 3. Musketeers.me Who uses… • XAMP, MAMP? • Acquia Dev Desktop? • Homebrew, Ports, etc? • Shared development environment? • Production?!
  • 4. Musketeers.me Early Tools were Crude • “One-size-fits-all” • Difficult to customize per site, or may not support multiple projects • Tricky to update • Inconsistent across individuals
  • 5. Musketeers.me Projects are special snowflakes • Different PHP versions / extensions • Different databases / versions • What about additional services • Redis? • Memcached?
  • 6. Musketeers.me Common pitfalls • Mismatches between development, staging, QA, & production environments • bugs that “only happen on live” • Setup can be tedious and fragile • Setup is poorly documented
  • 7. Musketeers.me Virtualization • Use a Virtual Machine (VM) identical to production environment. • Automate setting up the VM, aka “Provisioning” • Share setup more easily with collaborators.
  • 8. Musketeers.me Virtualization? • “Hardware virtualization or platform virtualization refers to the creation of a virtual machine that acts like a real computer with an operating system. Software executed on these virtual machines is separated from the underlying hardware resources. For example, a computer that is running Microsoft Windows may host a virtual machine that looks like a computer with the Ubuntu Linux operating system; Ubuntu-based software can be run on the virtual machine.” • http://en.wikipedia.org/wiki/Virtualization
  • 9. Musketeers.me Virtualbox • Free & Open Source Virtualization software • https://www.virtualbox.org • Runs on Windows, Linux, Mac (+more) • https://www.virtualbox.org/wiki/Downloads • There’s also VMWare, Parallels, and others…
  • 10. Musketeers.me Hardware • Memory helps — a lot • need enough to dedicate to the Guest OS • Disk space • use files to represent and persist virtual hard disk storage
  • 11. Musketeers.me Vagrant • “A tool for building complete development environments” • https://www.vagrantup.com/ • A Vagrantfile + provisioner automatically configures a VM Box for you. • … but someone has to make it
  • 12. Musketeers.me OK, let’s get to the good stuff already! • Assuming you’ve installed Vagrant & Virtualbox… • What’s the easiest way to get a VM working?
  • 13. Musketeers.me PuPHPet (puffet) • Online GUI to create Virtual Machines • Choose base OS, PHP, Mysql, and more • Download a zip file with Vagrantfile and supporting files
  • 15. Musketeers.me Using your Vagrantfile • Tip: extract the zip file to your project’s root directory • Basic vagrant commands: • vagrant up - start up the VM • vagrant ssh - SSH to the VM
  • 16. Musketeers.me Other Vagrant commands • vagrant suspend - put the VM to sleep, use this between work sessions. • vagrant stop - turn off the VM. • vagrant destroy - delete the VM, CAUTION!
  • 18. Musketeers.me Ooooh, A VM… • working with files • viewing your development site in a browser • running drush
  • 19. Musketeers.me Mapped folders • By default Vagrant maps your project’s folder on the Host OS to
 /vagrant on the Guest OS. • For example • If your project is /home/omerida/drupal8 • The same files are in /vagrant on your VM
  • 20. Musketeers.me File permissions gotcha • Need to insure web server can write to /sites/default/files • mount with “anyone can write” file permissions • run apache as the vagrant user • add apache to the vagrant group • https://www.drupal.org/node/2055947
  • 21. Musketeers.me This means… • Work on PHP, CSS, image, and other files locally with your favorite IDE, text editor, and other programs. • … and the changes are automatically reflected in your Virtual Environment • I’ve found default shared maps fine, some people recommend using NSF but that involves more setup
  • 22. Musketeers.me Browsing your site • Your Vagrantfile will setup networking so that the VM is accessible from the Guest OS, Usually a private address like 192.168.33.10 • Add this IP to your /etc/hosts file •192.168.33.10 project.dev • On windows Hosts file is trickier to find. • You’ll need admin privileges to edit • Go to “http://project.dev” in your browser
  • 23. Musketeers.me Running drush • vagrant ssh to login to the VM • > cd /web • > drush status • Can install drush from your Guest OS package repository
  • 24. Musketeers.me Vagrant Drupal Development • https://www.drupal.org/project/vdd • Fully configured Linux based VM • Ubuntu 12.04 LTS
  • 25. Musketeers.me Collaboration tips • One person responsible for initial setup and configuration • Commit your Vagrantfile + related files to your code repository • Standardize on Virtualbox & Vagrant versions
  • 26. Musketeers.me Provisioners • You might outgrow PuPHPet (or phansible.com) • Various options for automating • Puppet • Chef • Ansible • Shell Scripts
  • 27. Musketeers.me Other Use Cases • Will my code run with PHP 5.6? • What if I switch Mysql for Percona, MariaDB, etc • Redis or memcached for caching? • How do I setup Varnish for my site?
  • 28. Musketeers.me Testing Drupal 8 • Get Drupal 8 running: • https://github.com/omerida/drupal8- vm • https://github.com/SandyS1/d8ansible
  • 29. Musketeers.me Thank You! • Twitter: @omerida • Editor-in-Chief php[architect] magazine • plus Conferences, Training, and books • www.phparch.com • Any Questions?