Vagrant to the rescue

Vagrant to the rescue

In this talk, an introduction to vagrant is given. The audience is made aware of current problems with local development environments and how vagrant solves them. The different parts of vagrant are described and some use cases are presented. The presentation closes with answering some common questions from users starting to use vagrant.

Db6218c1b56d64e775eb79ea4f2889dd?s=128

Sebastian

May 08, 2014
Tweet

Transcript

  1. Vagrant to the rescue Linuxwochen Wien 2014 @Sgoettschkes

  2. http://xkcd.com/303/

  3. http://community.openatria.com/sites/community.openatria.com/files/vagrant.png

  4. “It works on my machine”

  5. “It’s all in SETUP.md”

  6. None
  7. Enter vagrant

  8. Building blocks Configuration + Provider + Provisioner + Plugins =

    Vagrant http://pixabay.com/static/uploads/photo/2010/12/10/08/salad-1105_640.jpg
  9. Configuration Vagrant.configure(2) do |config| config.vm.box = "Sgoettschkes/debian7" config.vm.network "private_network", ip:

    "127.0.0.101" config.vm.synced_folder "../", "/srv/workspace" config.vm.provision "chef_solo" do |chef| chef.add_recipe "main" end end
  10. Providers

  11. Provisioners

  12. Plugins # AWS provider $ vagrant plugin install vagrant-aws #

    Boxen provisioner $ vagrant plugin install ventriloquist # Manage host files $ vagrant plugin install vagrant-hostmanager # Make screenshots of your VM $ vagrant plugin install vagrant-camera # … many more!
  13. Synced folders http://upload.wikimedia.org/wikipedia/commons/5/5d/BalticServers_data_center.jpg

  14. SSH http://pixabay.com/static/uploads/photo/2013/04/08/22/48/tunnel-101976_640.jpg $ vagrant ssh # or $ ssh -p

    2222 vagrant@localhost # with password “vagrant”
  15. Basic workflow $ git clone git@github.com:awesomecompany/awesomeVm.git $ cd awesomeVm &&

    vagrant up # Hack away $ git pull --rebase $ vagrant provision # Hack some more and change provision files $ vagrant provision $ git commit -am ‘Incredible changes’ && git push
  16. Use cases Development environment

  17. Use cases Development environment Testing environment

  18. Use cases Development environment Testing environment Local test box for

    PMs & Designer
  19. Use cases Development environment Testing environment Local test box for

    PMs & Designer Playing around
  20. Use cases Development environment Testing environment Local test box for

    PMs & Designer Playing around with clusters
  21. Use cases

  22. What about... chef vs puppet?

  23. What about... one vs many boxes?

  24. What about... base boxes?

  25. What about performance?

  26. Vagrant “Development Environments made easy”