Vagrant - Team Development made easy

2,341 views

Published on

Development environments with Vagrant. Presentation at Codebits 2012

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,341
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
40
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Vagrant - Team Development made easy

  1. 1. VagrantTeam development made easy
  2. 2. MeTechnical Leader @CentralwayBefore?Intraneia ● Open-Source, UbuntuDeloitte ● IT Audits, Security & Privacy
  3. 3. How do we develop..
  4. 4. Local development environment MySQL Apache2 Python PEAR RVM npm nginx PostgreSQL PHP Ruby RoR MongoDB .... ???
  5. 5. Local development environmentNo IsolationNot ShareableNot Repeatable
  6. 6. Alternative?Virtual Machines
  7. 7. VagrantFree and open sourceStarted on January 21, 2010 by MitchellHashimoto and John Bender.The first release, 0.1.0 released on March 7,2010.Linux, Mac OS X, and Windows
  8. 8. Vision The vision of the project is to create a tool totransparently manage all the complex parts of modern development within a virtual environment without affecting the everyday workflow of the developer too much.
  9. 9. Vagrant~12000 lines of Ruby~3500 : test code~5500 : "plugins"~3300 : core Thats a lot of code!!!
  10. 10. Script must...Import a virtual machinesetup host only networkingsetup shared foldersboots the machineprovision the machinesupport Mac, Linux, and Windowsguest additionsNFS
  11. 11. and how do we use it?
  12. 12. the basic way#Fetch the Box$ vagrant box add base http://files.vagrantup.com/precise32.box#Init Vagrant on your current folder$ vagrant init#Start it!!$ vagrant up
  13. 13. with various projects...
  14. 14. VagrantfileVagrant::Config.run do |config| config.vm.box = "debian" config.vm.box_url = "http://path/to/vagrantbox.box" config.vm.network :hostonly, "10.10.10.10", :adapter=>4 config.vm.customize ["modifyvm", :id, "--memory", "512"]end
  15. 15. VagrantfileVagrant::Config.run do |config| config.vm.box = "debian" config.vm.box_url = "http://path/to/vagrantbox.box" config.vm.network :hostonly, "10.10.10.10", :adapter=>4 config.vm.customize ["modifyvm", :id, "--memory", "512"] config.vm.provision :puppet do |puppet| puppet.manifests_path = "vagrant/puppet/manifests" puppet.manifest_file = "base.pp" end config.vm.provision :shell, :inline => "/bin/bash /vagrant/myscript.sh"end
  16. 16. VagrantfileVagrant::Config.run do |config| config.vm.box = "debian" config.vm.box_url = "http://path/to/vagrantbox.box" config.vm.network :hostonly, "10.10.10.10", :adapter=>4 config.vm.customize ["modifyvm", :id, "--memory", "512"] config.vm.provision :puppet do |puppet| puppet.manifests_path = "vagrant/puppet/manifests" puppet.manifest_file = "base.pp" end config.vm.provision :shell, :inline => "/bin/bash /vagrant/myscript.sh"end
  17. 17. Demo time....
  18. 18. important vagrant commandsvagrant upvagrant provisionvagrant suspendvagrant haltvagrant destroy
  19. 19. tipsshared folders vs NFSgolden box vs clean boxsimilar environments -> helps deploymentsMulti-VM Environments http://vagrantup.com/v1/docs/multivm.html
  20. 20. tipsveewee ● github.com/jedi4ever/veeweepuppet / chef
  21. 21. Thank Youvagrantup.comvagrantbox.esgithub.com/igama/wp-vagrant-demo

×