Your SlideShare is downloading. ×
0
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Vagrant
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Vagrant

2,321

Published on

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,321
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
46
Comments
0
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • http://www.flickr.com/photos/themacinator/
  • http://www.flickr.com/photos/sidereal/
  • http://www.flickr.com/photos/rwp-roger/
  • http://www.flickr.com/photos/strassenstriche/
  • http://www.flickr.com/photos/wza/
  • http://www.flickr.com/photos/brokenthoughts/
  • http://www.flickr.com/photos/dullhunk/
  • Transcript

    • 1. Vagrant http://www.flickr.com/photos/themacinator/
    • 2. Credits <ul><li>Creators of Vagrant </li></ul><ul><ul><li>Mitchell Hashimotor </li></ul></ul><ul><ul><ul><li>http://mitchellhashimoto.com/ </li></ul></ul></ul><ul><ul><li>John Bender </li></ul></ul><ul><ul><ul><li>http://nickelcode.com/ </li></ul></ul></ul><ul><li>Patrick Debois http://jedi.be/blog/ Much of this presentation is based off his </li></ul><ul><ul><li>http://www.slideshare.net/jedi4ever/vagrant-devopsdays-mountain-view-2011 </li></ul></ul>
    • 3. va·grant /ˈvāgrənt/ Noun:A person without a settled home or regular work who wanders from place to place and lives by begging.
    • 4. Vagrant   http://www.vagrantup.com/ a tool for creating and distributing virtualized development environments.
    • 5. How ? http://www.flickr.com/photos/51029297@N00/
    • 6. Requirements <ul><ul><li>Ruby (use RVM) </li></ul></ul><ul><ul><li>Virtualbox </li></ul></ul>
    • 7. Install Stuff <ul><li>$ gem install vagrant </li></ul>
    • 8. Your First Box <ul><li>$ vagrant box add base http://files.vagrantup.com/lucid32.box </li></ul><ul><li>$ vagrant init </li></ul><ul><li>$ vagrant up </li></ul>
    • 9. Coffee http://www.flickr.com/photos/rwp-roger/
    • 10. Connect <ul><li>$ vagrant ssh  </li></ul>
    • 11. Had Enough <ul><li>$ vagrant destroy </li></ul>
    • 12. Features http://www.flickr.com/photos/sidereal/
    • 13. Port Forwarding VM Workstation 80 3306 1080 13306 config.vm.forward_port &amp;quot;http&amp;quot;, 80, 1080 config.vm.forward_port &amp;quot;mysql&amp;quot;, 3306, 13306
    • 14. Shared Filesystem VM Workstation /home/bob/project /project config.vm.share_folder &amp;quot;project&amp;quot;, &amp;quot;/project&amp;quot;, &amp;quot;/home/bob/project&amp;quot;
    • 15. Provisioners <ul><ul><li>Puppet </li></ul></ul><ul><ul><li>Chef </li></ul></ul><ul><ul><li>Shell Scripts </li></ul></ul>
    • 16. Using Puppet <ul><li>  config.vm.provision :puppet do |puppet| </li></ul><ul><li>    puppet.manifests_path = &amp;quot;manifests&amp;quot; </li></ul><ul><li>    puppet.manifest_file  = &amp;quot;node.pp&amp;quot; </li></ul><ul><li>    puppet.module_path    = &amp;quot;modules&amp;quot; </li></ul><ul><li>  end  </li></ul>
    • 17. Using Puppet <ul><li>  config.vm.provision :puppet do |puppet| </li></ul><ul><li>    puppet.manifests_path = &amp;quot;manifests&amp;quot; </li></ul><ul><li>    puppet.manifest_file  = &amp;quot;node.pp&amp;quot; </li></ul><ul><li>    puppet.module_path    = &amp;quot;modules&amp;quot; </li></ul><ul><li>  end  </li></ul>
    • 18. node.pp include myserver class myserver {      package {         &amp;quot;apache2&amp;quot;     =&gt; &amp;quot;present&amp;quot;,         &amp;quot;mysql-server =&gt; &amp;quot;present&amp;quot;,         &amp;quot;vim&amp;quot;         =&gt; &amp;quot;present&amp;quot;,     } }
    • 19. Why Vagrant ? <ul><ul><li>Easier than using Virtualbox </li></ul></ul><ul><ul><li>Rebuild at will </li></ul></ul><ul><ul><li>Dedicated environment for project </li></ul></ul><ul><ul><li>Reproducible environments </li></ul></ul><ul><ul><li>Distribute environments </li></ul></ul><ul><ul><li>Automated setup using Puppet, Chef or Shell Scripts </li></ul></ul><ul><ul><li>Tear down when done </li></ul></ul>
    • 20. For Developers <ul><ul><li>Servers like live </li></ul></ul><ul><ul><li>Servers you control </li></ul></ul><ul><ul><li>Stop polluting your workstation </li></ul></ul><ul><ul><li>Still use the tools you love </li></ul></ul>
    • 21. For Operations <ul><ul><li>Testing Puppet Manifests </li></ul></ul><ul><ul><li>Trying out new software </li></ul></ul>
    • 22. For Test <ul><ul><li>Testing client applications </li></ul></ul><ul><ul><li>UI testing </li></ul></ul>
    • 23. Demonstration http://www.flickr.com/photos/strassenstriche/
    • 24. Cool Stuff http://www.flickr.com/photos/wza/
    • 25. Version Control Vagrantfile Puppet VCS
    • 26. Stacks <ul><li>Vagrant::Config.run do |config| </li></ul><ul><li>config.vm.define :tomcat do |tomcat_config| </li></ul><ul><li>web_config.vm.box = &amp;quot;tomcat&amp;quot; </li></ul><ul><li>web_config.vm.forward_port(&amp;quot;tc&amp;quot;, 8080, 8080) </li></ul><ul><li>end </li></ul><ul><li>config.vm.define :web do |web_config| </li></ul><ul><li>web_config.vm.box = &amp;quot;web&amp;quot; </li></ul><ul><li>web_config.vm.forward_port(&amp;quot;http&amp;quot;, 80, 1080) </li></ul><ul><li>end </li></ul><ul><li>config.vm.define :mysql do |mysql_config| </li></ul><ul><li>db_config.vm.box = &amp;quot;mysql&amp;quot; </li></ul><ul><li>db_config.vm.forward_port(&amp;quot;db&amp;quot;, 3306, 13306) </li></ul><ul><li>end </li></ul><ul><li>end </li></ul>Tomcat MySQL Apache
    • 27. Distribute Box <ul><li>$ vagrant package --base my_base_box </li></ul>Base Box Base Box VM Provision Package
    • 28. Obtaining Base Boxes <ul><li>http://vagrantbox.es/ </li></ul>
    • 29. Creating Base Boxes <ul><ul><li>VeeWee </li></ul></ul><ul><ul><li>https://github.com/jedi4ever/veewee </li></ul></ul>
    • 30. References http://www.flickr.com/photos/brokenthoughts/
    • 31. References <ul><ul><li>Vagrant  http://vagrantup.com/ </li></ul></ul><ul><ul><li>Vagrant  https://github.com/mitchellh/vagrant </li></ul></ul><ul><ul><li>Virtual Box  https://www.virtualbox.org/   </li></ul></ul><ul><ul><li>RVM  http://beginrescueend.com/ </li></ul></ul><ul><ul><li>Base Boxes http://vagrantbox.es/ </li></ul></ul><ul><ul><li>VeeWee  https://github.com/jedi4ever/veewee </li></ul></ul>
    • 32. Questions ? http://www.flickr.com/photos/dullhunk/

    ×