Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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
Tweet

More Decks by Joel Clermont

Other Decks in Programming

Transcript

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

    View Slide

  2. Goals

    View Slide

  3. Goals
    • What is Vagrant?

    View Slide

  4. Goals
    • What is Vagrant?

    • Why might I want to use it?

    View Slide

  5. Goals
    • What is Vagrant?

    • Why might I want to use it?

    • How does it work?

    View Slide

  6. PROBLEM
    Wasting time setting up or
    maintaining a local dev
    environment

    View Slide

  7. PROBLEM
    “Works on my machine!”

    View Slide

  8. Solution

    View Slide

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

    View Slide

  10. FREE

    View Slide

  11. DEMO

    View Slide

  12. View Slide

  13. View Slide

  14. View Slide

  15. View Slide

  16. View Slide

  17. Pick a “box”

    View Slide

  18. Side note: disk space

    View Slide

  19. vagrant  init

    View Slide

  20. vagrant  up

    View Slide

  21. vagrant  ssh

    View Slide

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

    View Slide

  23. vagrant  suspend
    vagrant  halt

    View Slide

  24. vagrant  destroy

    View Slide

  25. How do I configure my
    VM?

    View Slide

  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

    View Slide

  27. Ansible
    Streamlined shell scripts
    27

    View Slide

  28. playbook.yml

    View Slide

  29. init.yml

    View Slide

  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

    View Slide

  31. Next Steps
    https://leanpub.com/vagrantcookbook

    View Slide

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

    View Slide

  33. Questions?

    View Slide

  34. Thank you!

    !
    joelclermont.com

    @jclermont

    View Slide