Vagrant for local and team WordPress Development

32
Using Virtual Machines (VM) To Build Automated Dev Environments Local WordPress Development

Transcript of Vagrant for local and team WordPress Development

Page 1: Vagrant for local and team WordPress Development

Using Virtual Machines (VM)To Build Automated Dev Environments

Local WordPress Development

Page 2: Vagrant for local and team WordPress Development

Anthony E. Alvarez

Also known as @AnthonyEalvarez

Page 3: Vagrant for local and team WordPress Development

I build siteshttp://AnthonyAlvarez.us

Page 4: Vagrant for local and team WordPress Development

Case Study: RailsBridge NYC

Page 5: Vagrant for local and team WordPress Development

Topics

Why Vagrant is so awesome How to get up and running fast WordPress-related Vagrant resources

Page 6: Vagrant for local and team WordPress Development

Your Computer is a Beautiful Lawn

Page 7: Vagrant for local and team WordPress Development

A Server is like a beach

Page 8: Vagrant for local and team WordPress Development

XAMPP/MAMP is a small sandbox

Page 9: Vagrant for local and team WordPress Development

Installation

Page 10: Vagrant for local and team WordPress Development

Vagrant Approach

Page 11: Vagrant for local and team WordPress Development
Page 12: Vagrant for local and team WordPress Development

Benefits Installing WordPress development environment in a reliable,

consistent and isolated way Run a vagrant box configured exactly like production machine Your machine is not tied to one project Can customize each VM environment to match production. Can have multiple VMs on a PC. Debugging an edge issue due specific version of PHP, MySQL

etc. Separates code and environment it runs in. A more elegant solution compared to LAMP

Page 13: Vagrant for local and team WordPress Development

Advantages Repeatable Verfiably correct Isolated Easy to understand Focus on Dev not Ops Cross Platform Major Hypervisor support Mature, stable, proven since 2010

Page 14: Vagrant for local and team WordPress Development

Developers

1) Check out any project

2) ‘vagrant up’

3) Done

Page 15: Vagrant for local and team WordPress Development

Developer

Continue to work in your own browsers, editors, and other tools.

The existence of Vagrant is

transparent and unimportant.

Vagrant is just the workhorse that creates

consistent and stable development environments.

Page 16: Vagrant for local and team WordPress Development

Systems Operators

1) “vagrant up”

2) Complete sandbox to test ops scripts

Automation developed used for both production and development.

With every vagrant up, developers get a fully provisioned environment using the same scripts as production.

Page 17: Vagrant for local and team WordPress Development

Clean up

Vagrant destroy

Vagrant suspend

Vagrant halt.

Page 18: Vagrant for local and team WordPress Development

Tao of Vagrant

Vagrant up will get you up and running at any moment.

Knowledge transfers to every project that uses Vagrant.

Vagrant is a general purpose Tool. Use it in a way that works best

for you.

May need to SSH into the machine to run some code.

No problem: vagrant ssh

Page 19: Vagrant for local and team WordPress Development

Why Vagrant

Powerful work-flow

Clean abstractions

Uncompromising Flexibility

Page 20: Vagrant for local and team WordPress Development

Get Up and Running Quickly

1. // Install Git and vagrant

2. // Install vagrant plugins

3. #vagrant plugin install vagrant-hostsupdater

4. // edits localhosts file and clean it when done

5. #vagrant plugin install vagrant-triggers

6. #git clone https://github.com/Varying-Vagrant-Vagrants/VVV dev

7. #git clone https://github.com/bradp/vv.git

8. //Variable VVV - the best VVV site wizard

9. #git clone https://github.com/leogopal/VVV-Dashboard

10. #mv VVV-Dashboard/dashboard* www/default/

11. #cd dev

12. #vagrant up

Page 21: Vagrant for local and team WordPress Development

Varying-Vagrant-Vagrants (VVV)

Page 22: Vagrant for local and team WordPress Development

Variable VVV

Page 23: Vagrant for local and team WordPress Development

VagrantPress

●Alternative to VVV for Testing plugins and themes before deploying them on a live site

●Creating a dev site for theme development● Running WordPress Betas to try new features

https://github.com/chad-thompson/vagrantpress

Page 24: Vagrant for local and team WordPress Development

WordPress Vagrant Resources

Ideas On Purpose Mercury Vagrant VIP Quickstart Salty WordPress Evolution WordPress VagrantPress Vagrant + Chef + WordPress Hashimoto Atlas Directory of Vagrant Boxes

Page 25: Vagrant for local and team WordPress Development

Ideas On Purpose

https://github.com/ideasonpurpose/basic-wordpress-vagrant

Page 26: Vagrant for local and team WordPress Development

Mercury Vagrant (HGV)

https://github.com/wpengine/hgv

Page 27: Vagrant for local and team WordPress Development

VIP Quickstart

https://github.com/Automattic/vip-quickstart/

Page 28: Vagrant for local and team WordPress Development

Vagrant + Chef + WordPress

vccw.cc

Page 29: Vagrant for local and team WordPress Development

Salty WordPress

Uses three great technologies: Salt, Vagrant, and WordPress.

https://github.com/humanmade/Salty-WordPress

Page 30: Vagrant for local and team WordPress Development

Evolution WordPress

Generate an entirely versioned, multi-environment Wordpress site in under a minute!

https://github.com/evolution/wordpress

Page 31: Vagrant for local and team WordPress Development

Atlas Directory of Boxes

https://atlas.hashicorp.com/boxes/search

Page 32: Vagrant for local and team WordPress Development

Thankyou

http://AnthonyAlvarez.us