SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler 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?

Mais conteúdo relacionado

Mais procurados

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.
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 

Mais de 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
 

Mais de 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
 

Último

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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 WorkerThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Último (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

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?