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 full-size slide

  2. Goals
    • What is Vagrant?

    View full-size slide

  3. Goals
    • What is Vagrant?

    • Why might I want to use it?

    View full-size slide

  4. Goals
    • What is Vagrant?

    • Why might I want to use it?

    • How does it work?

    View full-size slide

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

    View full-size slide

  6. PROBLEM
    “Works on my machine!”

    View full-size slide

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

    View full-size slide

  8. Pick a “box”

    View full-size slide

  9. Side note: disk space

    View full-size slide

  10. vagrant  init

    View full-size slide

  11. vagrant  up

    View full-size slide

  12. vagrant  ssh

    View full-size slide

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

    View full-size slide

  14. vagrant  suspend
    vagrant  halt

    View full-size slide

  15. vagrant  destroy

    View full-size slide

  16. How do I configure my
    VM?

    View full-size slide

  17. 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 full-size slide

  18. Ansible
    Streamlined shell scripts
    27

    View full-size slide

  19. playbook.yml

    View full-size slide

  20. 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 full-size slide

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

    View full-size slide

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

    View full-size slide

  23. Thank you!

    !
    joelclermont.com

    @jclermont

    View full-size slide