Vagrant http://www.flickr.com/photos/themacinator/
Credits <ul><li>Creators of Vagrant </li></ul><ul><ul><li>Mitchell Hashimotor </li></ul></ul><ul><ul><ul><li>http://mitche...
va·grant /ˈvāgrənt/ Noun:A person without a settled home or regular work who wanders from place to place and lives by begg...
Vagrant   http://www.vagrantup.com/ a tool for creating and distributing virtualized development environments.
How ? http://www.flickr.com/photos/51029297@N00/
Requirements <ul><ul><li>Ruby (use RVM) </li></ul></ul><ul><ul><li>Virtualbox </li></ul></ul>
Install Stuff <ul><li>$ gem install vagrant </li></ul>
Your First Box <ul><li>$ vagrant box add base http://files.vagrantup.com/lucid32.box </li></ul><ul><li>$ vagrant init </li...
Coffee http://www.flickr.com/photos/rwp-roger/
Connect <ul><li>$ vagrant ssh  </li></ul>
Had Enough <ul><li>$ vagrant destroy </li></ul>
Features http://www.flickr.com/photos/sidereal/
Port Forwarding VM Workstation 80 3306 1080 13306 config.vm.forward_port &quot;http&quot;, 80,  1080 config.vm.forward_por...
Shared Filesystem VM Workstation /home/bob/project /project config.vm.share_folder &quot;project&quot;, &quot;/project&quo...
Provisioners <ul><ul><li>Puppet </li></ul></ul><ul><ul><li>Chef </li></ul></ul><ul><ul><li>Shell Scripts </li></ul></ul>
Using Puppet <ul><li>   config.vm.provision :puppet do |puppet| </li></ul><ul><li>     puppet.manifests_path = &quot;manif...
Using Puppet <ul><li>   config.vm.provision :puppet do |puppet| </li></ul><ul><li>     puppet.manifests_path = &quot;manif...
node.pp include myserver class myserver {      package {          &quot;apache2&quot;     => &quot;present&quot;,         ...
Why Vagrant ? <ul><ul><li>Easier than using Virtualbox </li></ul></ul><ul><ul><li>Rebuild at will </li></ul></ul><ul><ul><...
For Developers <ul><ul><li>Servers like live </li></ul></ul><ul><ul><li>Servers you control </li></ul></ul><ul><ul><li>Sto...
For Operations <ul><ul><li>Testing Puppet Manifests </li></ul></ul><ul><ul><li>Trying out new software </li></ul></ul>
For Test <ul><ul><li>Testing client applications </li></ul></ul><ul><ul><li>UI testing </li></ul></ul>
Demonstration http://www.flickr.com/photos/strassenstriche/
Cool Stuff http://www.flickr.com/photos/wza/
Version Control Vagrantfile Puppet VCS
Stacks <ul><li>Vagrant::Config.run do |config| </li></ul><ul><li>config.vm.define :tomcat do |tomcat_config| </li></ul><ul...
Distribute Box <ul><li>$ vagrant package --base my_base_box </li></ul>Base Box Base Box VM Provision Package
Obtaining Base Boxes <ul><li>http://vagrantbox.es/ </li></ul>
Creating Base Boxes <ul><ul><li>VeeWee </li></ul></ul><ul><ul><li>https://github.com/jedi4ever/veewee </li></ul></ul>
References http://www.flickr.com/photos/brokenthoughts/
References <ul><ul><li>Vagrant  http://vagrantup.com/ </li></ul></ul><ul><ul><li>Vagrant  https://github.com/mitchellh/vag...
Questions ? http://www.flickr.com/photos/dullhunk/
Upcoming SlideShare
Loading in...5
×

Vagrant

2,358

Published on

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

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

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 of "Vagrant"

    1. 1. Vagrant http://www.flickr.com/photos/themacinator/
    2. 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. 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. 4. Vagrant   http://www.vagrantup.com/ a tool for creating and distributing virtualized development environments.
    5. 5. How ? http://www.flickr.com/photos/51029297@N00/
    6. 6. Requirements <ul><ul><li>Ruby (use RVM) </li></ul></ul><ul><ul><li>Virtualbox </li></ul></ul>
    7. 7. Install Stuff <ul><li>$ gem install vagrant </li></ul>
    8. 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. 9. Coffee http://www.flickr.com/photos/rwp-roger/
    10. 10. Connect <ul><li>$ vagrant ssh  </li></ul>
    11. 11. Had Enough <ul><li>$ vagrant destroy </li></ul>
    12. 12. Features http://www.flickr.com/photos/sidereal/
    13. 13. Port Forwarding VM Workstation 80 3306 1080 13306 config.vm.forward_port &quot;http&quot;, 80, 1080 config.vm.forward_port &quot;mysql&quot;, 3306, 13306
    14. 14. Shared Filesystem VM Workstation /home/bob/project /project config.vm.share_folder &quot;project&quot;, &quot;/project&quot;, &quot;/home/bob/project&quot;
    15. 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. 16. Using Puppet <ul><li>  config.vm.provision :puppet do |puppet| </li></ul><ul><li>    puppet.manifests_path = &quot;manifests&quot; </li></ul><ul><li>    puppet.manifest_file  = &quot;node.pp&quot; </li></ul><ul><li>    puppet.module_path    = &quot;modules&quot; </li></ul><ul><li>  end  </li></ul>
    17. 17. Using Puppet <ul><li>  config.vm.provision :puppet do |puppet| </li></ul><ul><li>    puppet.manifests_path = &quot;manifests&quot; </li></ul><ul><li>    puppet.manifest_file  = &quot;node.pp&quot; </li></ul><ul><li>    puppet.module_path    = &quot;modules&quot; </li></ul><ul><li>  end  </li></ul>
    18. 18. node.pp include myserver class myserver {      package {         &quot;apache2&quot;     => &quot;present&quot;,         &quot;mysql-server => &quot;present&quot;,         &quot;vim&quot;         => &quot;present&quot;,     } }
    19. 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. 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. 21. For Operations <ul><ul><li>Testing Puppet Manifests </li></ul></ul><ul><ul><li>Trying out new software </li></ul></ul>
    22. 22. For Test <ul><ul><li>Testing client applications </li></ul></ul><ul><ul><li>UI testing </li></ul></ul>
    23. 23. Demonstration http://www.flickr.com/photos/strassenstriche/
    24. 24. Cool Stuff http://www.flickr.com/photos/wza/
    25. 25. Version Control Vagrantfile Puppet VCS
    26. 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 = &quot;tomcat&quot; </li></ul><ul><li>web_config.vm.forward_port(&quot;tc&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 = &quot;web&quot; </li></ul><ul><li>web_config.vm.forward_port(&quot;http&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 = &quot;mysql&quot; </li></ul><ul><li>db_config.vm.forward_port(&quot;db&quot;, 3306, 13306) </li></ul><ul><li>end </li></ul><ul><li>end </li></ul>Tomcat MySQL Apache
    27. 27. Distribute Box <ul><li>$ vagrant package --base my_base_box </li></ul>Base Box Base Box VM Provision Package
    28. 28. Obtaining Base Boxes <ul><li>http://vagrantbox.es/ </li></ul>
    29. 29. Creating Base Boxes <ul><ul><li>VeeWee </li></ul></ul><ul><ul><li>https://github.com/jedi4ever/veewee </li></ul></ul>
    30. 30. References http://www.flickr.com/photos/brokenthoughts/
    31. 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. 32. Questions ? http://www.flickr.com/photos/dullhunk/
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×