Avoid Deployment Surprises and Frustation with Vagrant and Ansible

Avoid Deployment Surprises and Frustation with Vagrant and Ansible

We’ve all had that “works on my machine” moment. We coded and coded, got it working the way we want, went to deploy and . . . . errors. This talk will help WP developers learn how to use Vagrant and Ansible to quickly provision a consistent, isolated development environment that moves seamlessly to production and makes deployment a pain-free and surprise-free experience.


Joel Clermont

July 26, 2014


  1. Avoid Deployment Surprises and Frustration with Vagrant Joel Clermont @jclermont

  2. Goals

  3. Goals • What is Vagrant?

  4. Goals • What is Vagrant? • Why might I want

    to use it?
  5. Goals • What is Vagrant? • Why might I want

    to use it? • How does it work?
  6. PROBLEM Wasting time setting up or maintaining a local dev

  7. PROBLEM “Works on my machine!”

  8. Solution

  9. Uses virtual machines portable, isolated, project-specific

  10. FREE

  11. DEMO

  12. None
  13. None
  14. None
  15. None
  16. None
  17. Pick a “box”

  18. Side note: disk space

  19. vagrant  init

  20. vagrant  up

  21. vagrant  ssh

  22. Oh no, do I have to use vim or emacs?

  23. vagrant  suspend vagrant  halt

  24. vagrant  destroy

  25. How do I configure my VM?

  26. References • Vagrant http://www.vagrantup.com • https://github.com/Varying-Vagrant-Vagrants/VVV • Vagrant cheat sheet:

    http://www.erikaheidi.com/blog/ quick-user-guide-for-vagrant
  27. Ansible Streamlined shell scripts 27

  28. playbook.yml

  29. init.yml

  30. References • Ansible http://docs.ansible.com • Ansible template https://github.com/joelclermont/ vagrant-ansible-template •

    Brad’s HHVM http://webdevstudios.com/2014/07/17/ setting-up-wordpress-nginx-hhvm-for-the-fastest- possible-load-times/ • Vagrant HHVM https://github.com/keichan34/wp- nginx-hhvm-mariadb
  31. Next Steps https://leanpub.com/vagrantcookbook

  32. Next Steps August 22 http://daycamp4developers.com

  33. Questions?

  34. Thank you! ! joelclermont.com @jclermont