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?
Getting Started with Vagrant
Getting Started with Vagrant
Próximos SlideShares
Carregando em…5
×

Getting Started with Vagrant

2.214 visualizações

Publicada em

Learn how Vagrant, a tool for creating portable development environments, can help you:
- Easily setup a local development environment
- Match your local development environment to production and avoid surprises during deployment.
- Share development environments with team members and get new team members up and running in record time.
- Easily deploy code by using providers and provisioners.

Presentation given at WordCamp Asheville 2014:
http://2014.asheville.wordcamp.org/session/getting-started-with-vagrant/

NOTE: This slide deck isn't going to be extremely helpful on its own. Please view the associated blog post for more context:
http://wpscholar.com/presentations/getting-started-with-vagrant/

Publicada em: Tecnologia
0 comentários
3 gostaram
Estatísticas
Notas
  • Seja o primeiro a comentar

Sem downloads
Visualizações
Visualizações totais
2.214
No SlideShare
0
A partir de incorporações
0
Número de incorporações
877
Ações
Compartilhamentos
0
Downloads
25
Comentários
0
Gostaram
3
Incorporações 0
Nenhuma incorporação

Nenhuma nota no slide
  • Environment = Usually a local development environment
    Replacement for MAMP/WAMP/XAMPP
  • Virtual machine = A software based emulation of a computer (server)
    Guest = virtual machine
    Host = physical machine
  • Provision = Install the required software and configure the machine for use
  • Basic - Allow guest and host to communicate
    Advanced - Multiple VM network
  • Recap: Vagrant is a manager of virtual machines
  • Speed - no waiting on files to upload, edit them locally
    Reliability - no server outages
    Security - search engines can’t index, mistakes are never seen
  • 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
  • Cross-platform - compatible with Mac, Windows and Linux
    Eliminate “Works on my machine” (it is the same machine)
    Faster onboarding
  • 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.
  • Prerequisites - Install VirtualBox and Vagrant
    Common Misconception - Vagrant runs VM in a separate window
  • 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/
  • Commands: status, suspend/halt, ssh, provision, destroy
    Next step: provisioning
  • Provisioner = A tool that automatically installs software and alters configurations.
  • Provisioned by Puppet
  • Provisioned by shell scripts
    Vagrant Hosts Updater - https://github.com/cogitatio/vagrant-hostsupdater
    Vagrant Triggers - https://github.com/emyl/vagrant-triggers
  • 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)
  • Add domain to hosts file - vvv-hosts
    Add database / install WP - vvv-init.sh
    Add site to nginx - vvv-nginx.conf
  • A bash script that makes it easy to spin up a new WordPress site using Varying Vagrant Vagrants.
  • Getting Started with Vagrant

    1. 1. Getting Started with Vagrant Micah Wood @wpscholar http://micahwood.me
    2. 2. What is Vagrant?
    3. 3. A tool for creating and sharing work environments.
    4. 4. Create and destroy virtual machines
    5. 5. Automatically provision virtual machines
    6. 6. Network virtual machines
    7. 7. Package and distribute virtual machines
    8. 8. Why use Vagrant?
    9. 9. Local Development
    10. 10. Consistent Environment
    11. 11. Portability
    12. 12. Easily Test Scripts
    13. 13. How do I use Vagrant?
    14. 14. https://www.virtualbox.org/ http://www.vagrantup.com/
    15. 15. Create Vagrantfile $ vagrant init <name> <url>
    16. 16. Start Virtual Machine $ vagrant up
    17. 17. PuPHPet https://puphpet.com
    18. 18. Varying Vagrant Vagrants https://github.com/Varying-Vagrant-Vagrants/VVV
    19. 19. vvv-hosts vvv-init.sh vvv-nginx.conf https://github.com/varying-vagrant-vagrants/vvv/wiki/Auto-site-Setup
    20. 20. VVV Site Wizard https://github.com/aliso/vvv-site-wizard
    21. 21. Questions?

    ×