SlideShare une entreprise Scribd logo
1  sur  23
Getting Started
with Vagrant
Micah Wood
@wpscholar http://micahwood.me
What is
Vagrant?
A tool for creating
and sharing work
environments.
Create and destroy
virtual machines
Automatically provision
virtual machines
Network
virtual machines
Package and distribute
virtual machines
Why use
Vagrant?
Local
Development
Consistent
Environment
Portability
Easily Test
Scripts
How do I use Vagrant?
https://www.virtualbox.org/ http://www.vagrantup.com/
Create Vagrantfile
$ vagrant init <name> <url>
Start Virtual Machine
$ vagrant up
PuPHPet
https://puphpet.com
Varying Vagrant Vagrants
https://github.com/Varying-Vagrant-Vagrants/VVV
vvv-hosts
vvv-init.sh
vvv-nginx.conf
https://github.com/varying-vagrant-vagrants/vvv/wiki/Auto-site-Setup
VVV Site Wizard
https://github.com/aliso/vvv-site-wizard
Questions?

Contenu connexe

Tendances

Vagrant: Your Personal Cloud
Vagrant: Your Personal CloudVagrant: Your Personal Cloud
Vagrant: Your Personal Cloud
James Wickett
 
My first 3 months working with word press
My first 3 months working with word pressMy first 3 months working with word press
My first 3 months working with word press
Noe Lopez
 

Tendances (15)

Jakarta WordPress Meetup #9: Introducing VVV 2
Jakarta WordPress Meetup #9: Introducing VVV 2Jakarta WordPress Meetup #9: Introducing VVV 2
Jakarta WordPress Meetup #9: Introducing VVV 2
 
Vagrant: Your Personal Cloud
Vagrant: Your Personal CloudVagrant: Your Personal Cloud
Vagrant: Your Personal Cloud
 
My first 3 months working with word press
My first 3 months working with word pressMy first 3 months working with word press
My first 3 months working with word press
 
WordPress の可能性
WordPress の可能性WordPress の可能性
WordPress の可能性
 
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
 
Netpie.io Generate MQTT Credential
Netpie.io Generate MQTT CredentialNetpie.io Generate MQTT Credential
Netpie.io Generate MQTT Credential
 
JavaScript and Web Standards - The Subliminal Messaging edition
JavaScript and Web Standards - The Subliminal Messaging editionJavaScript and Web Standards - The Subliminal Messaging edition
JavaScript and Web Standards - The Subliminal Messaging edition
 
CasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated TestingCasperJS and PhantomJS for Automated Testing
CasperJS and PhantomJS for Automated Testing
 
Quick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with VagrantQuick & Easy Dev Environments with Vagrant
Quick & Easy Dev Environments with Vagrant
 
Service worker - Offline Web
Service worker - Offline WebService worker - Offline Web
Service worker - Offline Web
 
No more script tag soup!
No more script tag soup!No more script tag soup!
No more script tag soup!
 
5 best practices for (web/ software) development (2010)
5 best practices for (web/ software) development (2010)5 best practices for (web/ software) development (2010)
5 best practices for (web/ software) development (2010)
 
In the desert, without a camel
In the desert, without a camelIn the desert, without a camel
In the desert, without a camel
 
Webpack Tutorial, Uppsala JS
Webpack Tutorial, Uppsala JSWebpack Tutorial, Uppsala JS
Webpack Tutorial, Uppsala JS
 
javascript for backend developers
javascript for backend developersjavascript for backend developers
javascript for backend developers
 

Similaire à Getting Started with Vagrant

DevOps: Using Vagrant to Enhance Your Day to Day Development
DevOps: Using Vagrant to Enhance Your Day to Day DevelopmentDevOps: Using Vagrant to Enhance Your Day to Day Development
DevOps: Using Vagrant to Enhance Your Day to Day Development
Rob Reynolds
 
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Acquia
 

Similaire à Getting Started with Vagrant (20)

Vagrant for local and team WordPress Development
Vagrant for local and team WordPress DevelopmentVagrant for local and team WordPress Development
Vagrant for local and team WordPress Development
 
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony AlvarezDevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
 
Vagrant
VagrantVagrant
Vagrant
 
Unit tests with vagrant
Unit tests with vagrantUnit tests with vagrant
Unit tests with vagrant
 
Vagrant for Development
Vagrant for DevelopmentVagrant for Development
Vagrant for Development
 
WordPress Development with VVV, VV, and Vagrant
WordPress Development with VVV, VV, and VagrantWordPress Development with VVV, VV, and Vagrant
WordPress Development with VVV, VV, and Vagrant
 
Puppet Provisioning Vagrant Virtual Machine
Puppet Provisioning Vagrant Virtual MachinePuppet Provisioning Vagrant Virtual Machine
Puppet Provisioning Vagrant Virtual Machine
 
Development with Vagrant
Development with VagrantDevelopment with Vagrant
Development with Vagrant
 
Vagrant
VagrantVagrant
Vagrant
 
Vagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy StepsVagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy Steps
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreMulti-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and more
 
Vagrant - the essence of DevOps in a tool
Vagrant - the essence of DevOps in a toolVagrant - the essence of DevOps in a tool
Vagrant - the essence of DevOps in a tool
 
Local development with vvv jon trujillo
Local development with vvv   jon trujilloLocal development with vvv   jon trujillo
Local development with vvv jon trujillo
 
Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-Overview
 
DevOps: Using Vagrant to Enhance Your Day to Day Development
DevOps: Using Vagrant to Enhance Your Day to Day DevelopmentDevOps: Using Vagrant to Enhance Your Day to Day Development
DevOps: Using Vagrant to Enhance Your Day to Day Development
 
Local development environment through virtualisation
Local development environment through virtualisationLocal development environment through virtualisation
Local development environment through virtualisation
 
Vagrant and Configuration Management
Vagrant and Configuration ManagementVagrant and Configuration Management
Vagrant and Configuration Management
 
Using vagrant
Using vagrantUsing vagrant
Using vagrant
 
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
 
Vagrant & Reusable Code
Vagrant & Reusable CodeVagrant & Reusable Code
Vagrant & Reusable Code
 

Plus de Micah Wood

Plus de Micah Wood (17)

Introduction to JSX
Introduction to JSXIntroduction to JSX
Introduction to JSX
 
WP-CLI For The Win
WP-CLI For The WinWP-CLI For The Win
WP-CLI For The Win
 
Using Chrome Dev Tools
Using Chrome Dev ToolsUsing Chrome Dev Tools
Using Chrome Dev Tools
 
Shortcodes In-Depth
Shortcodes In-DepthShortcodes In-Depth
Shortcodes In-Depth
 
Becoming a WordPress Coding Master
Becoming a WordPress Coding MasterBecoming a WordPress Coding Master
Becoming a WordPress Coding Master
 
Debugging in PHP
Debugging in PHPDebugging in PHP
Debugging in PHP
 
WordPress Hooks
WordPress HooksWordPress Hooks
WordPress Hooks
 
The Modern JavaScript Developers Toolbox
The Modern JavaScript Developers ToolboxThe Modern JavaScript Developers Toolbox
The Modern JavaScript Developers Toolbox
 
Using Composer with WordPress
Using Composer with WordPressUsing Composer with WordPress
Using Composer with WordPress
 
An Introduction to PHP Classes
An Introduction to PHP ClassesAn Introduction to PHP Classes
An Introduction to PHP Classes
 
Backbone + React
Backbone + ReactBackbone + React
Backbone + React
 
Advanced Development Workflows
Advanced Development WorkflowsAdvanced Development Workflows
Advanced Development Workflows
 
Testing Made Easy
Testing Made EasyTesting Made Easy
Testing Made Easy
 
Troubleshooting WordPress Issues
Troubleshooting WordPress IssuesTroubleshooting WordPress Issues
Troubleshooting WordPress Issues
 
Using Composer with WordPress - 2.0
Using Composer with WordPress - 2.0Using Composer with WordPress - 2.0
Using Composer with WordPress - 2.0
 
Using composer with WordPress
Using composer with WordPressUsing composer with WordPress
Using composer with WordPress
 
Sanitizing, Validating and Escaping in WordPress Themes and Plugins
Sanitizing, Validating and Escaping in WordPress Themes and PluginsSanitizing, Validating and Escaping in WordPress Themes and Plugins
Sanitizing, Validating and Escaping in WordPress Themes and Plugins
 

Dernier

Dernier (20)

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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...
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 

Notes de l'éditeur

  1. Environment = Usually a local development environment Replacement for MAMP/WAMP/XAMPP
  2. Virtual machine = A software based emulation of a computer (server) Guest = virtual machine Host = physical machine
  3. Provision = Install the required software and configure the machine for use
  4. Basic - Allow guest and host to communicate Advanced - Multiple VM network
  5. Recap: Vagrant is a manager of virtual machines
  6. Speed - no waiting on files to upload, edit them locally Reliability - no server outages Security - search engines can’t index, mistakes are never seen
  7. Isolated - Guest and host are separate machines. Dependencies must be handled during provisioning. Control - You can mirror production without having to reconfigure your computer. Predictable - No odd configurations like MAMP/XAMPP
  8. Cross-platform - compatible with Mac, Windows and Linux Eliminate “Works on my machine” (it is the same machine) Faster onboarding
  9. Provisioning / Administrative scripts Inexpensive - Free local server Low Risk - Won’t mess up a staging or production server, or your computer Disposable - Problem? Just start over.
  10. Prerequisites - Install VirtualBox and Vagrant Common Misconception - Vagrant runs VM in a separate window
  11. Vagrantfile = the file used to manage creation of the Virtual Machine Box = disk image used for the Virtual Machine Directory of boxes - http://www.vagrantbox.es/, https://vagrantcloud.com/
  12. Commands: status, suspend/halt, ssh, provision, destroy Next step: provisioning
  13. Provisioner = A tool that automatically installs software and alters configurations.
  14. Provisioned by Puppet
  15. Provisioned by shell scripts Vagrant Hosts Updater - https://github.com/cogitatio/vagrant-hostsupdater Vagrant Triggers - https://github.com/emyl/vagrant-triggers
  16. What you get with Varying Vagrant Vagrants If you prefer Apache to Nginx: VagrantPress (http://vagrantpress.org/) VVV Apache (https://github.com/ericmann/vvv-apache)
  17. Add domain to hosts file - vvv-hosts Add database / install WP - vvv-init.sh Add site to nginx - vvv-nginx.conf
  18. A bash script that makes it easy to spin up a new WordPress site using Varying Vagrant Vagrants.