Your SlideShare is downloading. ×
0
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
Vagrant Intro
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 Intro

372

Published on

An introduction to Vagrant

An introduction to Vagrant

Published in: Technology, Design
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
372
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
28
Comments
0
Likes
2
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

Transcript

  • 1. CLOUD SAVVY Brown BaG: VAGRANT Hart Hoover @hhoover Thursday, September 26, 13
  • 2. CLOUD SAVVY History of vagrant Thursday, September 26, 13
  • 3. CLOUD SAVVY 3 Thursday, September 26, 13
  • 4. CLOUD SAVVY 4 Mitchell Hashimoto created Vagrant in 2009 John Bender Thursday, September 26, 13
  • 5. CLOUD SAVVY 5 Engine Yard sponsored Vagrant through their OSS Community Grant Program in 2010 Thursday, September 26, 13
  • 6. CLOUD SAVVY 6 INTEREST IN Vagrant Thursday, September 26, 13
  • 7. CLOUD SAVVY 7 Thursday, September 26, 13
  • 8. CLOUD SAVVY WHY vagrant? Thursday, September 26, 13
  • 9. CLOUD SAVVY 9 Thursday, September 26, 13
  • 10. CLOUD SAVVY 10 Why Vagrant? • Repeatable • Customizable • “It works on my machine.” Developers Thursday, September 26, 13
  • 11. CLOUD SAVVY 11 Why Vagrant? • Disposable Machines • Test your provisioning • Local → Production Operations Thursday, September 26, 13
  • 12. CLOUD SAVVY 12 Why Vagrant? = Thursday, September 26, 13
  • 13. CLOUD SAVVY Getting Started Thursday, September 26, 13
  • 14. CLOUD SAVVY 14 https://www.virtualbox.org/wiki/Downloads Thursday, September 26, 13
  • 15. CLOUD SAVVY 15 http://downloads.vagrantup.com/ Thursday, September 26, 13
  • 16. CLOUD SAVVY 16 $  vagrant  box  add   precise64   http://files.vagrantup.com/precise64.box GET STARTED $  mkdir  ~/project $  cd  ~/project Thursday, September 26, 13
  • 17. CLOUD SAVVY 17 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 18. CLOUD SAVVY 18 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 19. CLOUD SAVVY 19 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 20. CLOUD SAVVY 20 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 21. CLOUD SAVVY 21 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 22. CLOUD SAVVY 22 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 23. CLOUD SAVVY 23 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 24. CLOUD SAVVY 24 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 25. CLOUD SAVVY 25 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 26. CLOUD SAVVY 26 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 27. CLOUD SAVVY 27 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 28. CLOUD SAVVY 28 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 29. CLOUD SAVVY 29 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 30. CLOUD SAVVY 30 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 31. CLOUD SAVVY 31 vagrant box destroy halt init package plugin provision reload resume ssh ssh-­‐config status suspend up Thursday, September 26, 13
  • 32. CLOUD SAVVY 32 $  vagrant  init  precise64 $  vagrant  up Thursday, September 26, 13
  • 33. CLOUD SAVVY 33 Thursday, September 26, 13
  • 34. CLOUD SAVVY 34 $  vagrant  ssh Thursday, September 26, 13
  • 35. CLOUD SAVVY 35 Thursday, September 26, 13
  • 36. CLOUD SAVVY 36 $  vagrant  destroy Thursday, September 26, 13
  • 37. CLOUD SAVVY 37 Thursday, September 26, 13
  • 38. CLOUD SAVVY 38 What Just Happened? Thursday, September 26, 13
  • 39. CLOUD SAVVY 39 Vagrant.configure("2")  do  |config|    config.vm.box  =  'precise64'    config.vm.box_url  =  'http://files.vagrantup.com/precise64.box' end THE VAGRANTFILE Thursday, September 26, 13
  • 40. CLOUD SAVVY 40 Vagrant.configure("2")  do  |config|    config.vm.box  =  'precise64'    config.vm.box_url  =  'http://files.vagrantup.com/precise64.box' end THE VAGRANTFILE Thursday, September 26, 13
  • 41. CLOUD SAVVY 41 Vagrant.configure("2")  do  |config|    config.vm.box  =  'precise64'    config.vm.box_url  =  'http://files.vagrantup.com/precise64.box' end THE VAGRANTFILE Thursday, September 26, 13
  • 42. CLOUD SAVVY 42 Vagrant.configure("2")  do  |config|    config.vm.box  =  'precise64'    config.vm.box_url  =  'http://files.vagrantup.com/precise64.box' end THE VAGRANTFILE BORING Thursday, September 26, 13
  • 43. CLOUD SAVVY 43 Thursday, September 26, 13
  • 44. CLOUD SAVVY ExTending Vagrant Thursday, September 26, 13
  • 45. CLOUD SAVVY HOW TO INSTALL A PLUGIN 45 $  vagrant  plugin  install  $PLUGIN_NAME Thursday, September 26, 13
  • 46. CLOUD SAVVY What Plugins are Out There? 46 Thursday, September 26, 13
  • 47. CLOUD SAVVY What Plugins are Out There? 46 AND MORE Thursday, September 26, 13
  • 48. CLOUD SAVVY What Plugins are Out There? 47 https://github.com/mitchellh/vagrant/wiki/Available-Vagrant-Plugins Thursday, September 26, 13
  • 49. CLOUD SAVVY DEPLOYING TO RACKSPACE Thursday, September 26, 13
  • 50. CLOUD SAVVY 49 INSTALL THE PLUGIN $  vagrant  plugin  install  vagrant-­‐rackspace Thursday, September 26, 13
  • 51. CLOUD SAVVY 50 $  vagrant  box  add   rax   http://tinyurl.com/raxdummy GET THE BOX Thursday, September 26, 13
  • 52. CLOUD SAVVY 51 http://tinyurl.com/vagrantfiles COPY & PASTE! Thursday, September 26, 13
  • 53. CLOUD SAVVY 52 Vagrant.configure("2")  do  |config|    config.vm.box  =  "rax"      config.ssh.private_key_path  =  "~/.ssh/id_rsa_my_private_key"      config.vm.provider  :rackspace  do  |rs|        rs.username                =  "YOUR  USERNAME"        rs.api_key                  =  "YOUR  API  KEY"        rs.flavor                    =  /512MB/        rs.image                      =  /Ubuntu  12.04/        rs.public_key_path  =  "my_public_key.pub"    end end THE VAGRANTFILE Thursday, September 26, 13
  • 54. CLOUD SAVVY 53 Vagrant.configure("2")  do  |config|    config.vm.box  =  "rax"      config.ssh.private_key_path  =  "~/.ssh/id_rsa_my_private_key"      config.vm.provider  :rackspace  do  |rs|        rs.username                =  "YOUR  USERNAME"        rs.api_key                  =  "YOUR  API  KEY"        rs.flavor                    =  /512MB/        rs.image                      =  /Ubuntu  12.04/        rs.public_key_path  =  "my_public_key.pub"    end end THE VAGRANTFILE Thursday, September 26, 13
  • 55. CLOUD SAVVY 54 Vagrant.configure("2")  do  |config|    config.vm.box  =  "rax"      config.ssh.private_key_path  =  "~/.ssh/id_rsa_my_private_key"      config.vm.provider  :rackspace  do  |rs|        rs.username                =  "YOUR  USERNAME"        rs.api_key                  =  "YOUR  API  KEY"        rs.flavor                    =  /512MB/        rs.image                      =  /Ubuntu  12.04/        rs.public_key_path  =  "my_public_key.pub"    end end THE VAGRANTFILE Thursday, September 26, 13
  • 56. CLOUD SAVVY 55 Vagrant.configure("2")  do  |config|    config.vm.box  =  "rax"      config.ssh.private_key_path  =  "~/.ssh/id_rsa_my_private_key"      config.vm.provider  :rackspace  do  |rs|        rs.username                =  "YOUR  USERNAME"        rs.api_key                  =  "YOUR  API  KEY"        rs.flavor                    =  /512MB/        rs.image                      =  /Ubuntu  12.04/        rs.public_key_path  =  "my_public_key.pub"    end end THE VAGRANTFILE Thursday, September 26, 13
  • 57. CLOUD SAVVY 56 Vagrant.configure("2")  do  |config|    config.vm.box  =  "rax"      config.ssh.private_key_path  =  "~/.ssh/id_rsa_my_private_key"      config.vm.provider  :rackspace  do  |rs|        rs.username                =  "YOUR  USERNAME"        rs.api_key                  =  "YOUR  API  KEY"        rs.flavor                    =  /512MB/        rs.image                      =  /Ubuntu  12.04/        rs.public_key_path  =  "my_public_key.pub"    end end THE VAGRANTFILE Thursday, September 26, 13
  • 58. CLOUD SAVVY 57 START IT UP $  vagrant  up  -­‐-­‐provider=rackspace Thursday, September 26, 13
  • 59. CLOUD SAVVY 58 Thursday, September 26, 13
  • 60. CLOUD SAVVY 59 TURN IT OFF $  vagrant  ssh $  vagrant  destroy Thursday, September 26, 13
  • 61. CLOUD SAVVY VAGRANT AND CHEF Using Config Management with Vagrant Thursday, September 26, 13
  • 62. CLOUD SAVVY CHEF VAGRANT PLUGINS 61 Thursday, September 26, 13
  • 63. CLOUD SAVVY CHEF VAGRANT PLUGINS 61 • vagrant-omnibus: Installs a specific version of the Chef Omnibus Thursday, September 26, 13
  • 64. CLOUD SAVVY CHEF VAGRANT PLUGINS 61 • vagrant-omnibus: Installs a specific version of the Chef Omnibus • vagrant-berkshelf: Tells Vagrant to look for a Berksfile Thursday, September 26, 13
  • 65. CLOUD SAVVY 62 Vagrant.configure("2")  do  |config|    config.vm.box  =  'precise64'    config.vm.box_url  =  'http://files.vagrantup.com/precise64.box'   config.vm.provision  "chef_solo"  do  |chef|   chef.cookbooks_path  =  "chef-­‐repo/cookbooks" chef.roles_path  =  "chef-­‐repo/roles"        chef.add_role  "mysql_server"    chef.add_role  "web_server" end end VAGRANT AND CHEF Thursday, September 26, 13
  • 66. CLOUD SAVVY 63 VAGRANT AND CHEF Vagrant.configure("2")  do  |config|    config.vm.box  =  'precise64'    config.vm.box_url  =  'http://files.vagrantup.com/precise64.box'   config.vm.provision  "chef_solo"  do  |chef|          chef.cookbooks_path  =  "chef-­‐repo/cookbooks"        chef.roles_path  =  "chef-­‐repo/roles"        chef.add_role  "mysql_server"        chef.add_role  "web_server"    end end Thursday, September 26, 13
  • 67. CLOUD SAVVY 64 VAGRANT AND CHEF Vagrant.configure("2")  do  |config|    config.vm.box  =  'precise64'    config.vm.box_url  =  'http://files.vagrantup.com/precise64.box'   config.vm.provision  "chef_solo"  do  |chef|          chef.cookbooks_path  =  "chef-­‐repo/cookbooks"        chef.roles_path  =  "chef-­‐repo/roles"        chef.add_role  "mysql_server"        chef.add_role  "web_server"    end end Thursday, September 26, 13
  • 68. CLOUD SAVVY 65 VAGRANT AND CHEF Vagrant.configure("2")  do  |config|    config.vm.box  =  'precise64'    config.vm.box_url  =  'http://files.vagrantup.com/precise64.box'   config.vm.provision  "chef_solo"  do  |chef|          chef.cookbooks_path  =  "chef-­‐repo/cookbooks"        chef.roles_path  =  "chef-­‐repo/roles"        chef.add_role  "mysql_server"        chef.add_role  "web_server"    end end Thursday, September 26, 13
  • 69. CLOUD SAVVY 66 Thursday, September 26, 13
  • 70. CLOUD SAVVY 67 http://www.vagrantbox.es/ CUSTOM BOXES Thursday, September 26, 13
  • 71. CLOUD SAVVY 68 Multiple Machines Vagrant.configure("2")  do  |config|    config.vm.box  =  "precise64"    config.vm.box_url  =  "http://files.vagrantup.com/precise64.box"    config.vm.define  "web"  do  |web|        web.vm.network  :private_network,  ip:  "192.168.57.10"                config.vm.provision  :chef_solo  do  |chef|            chef.cookbooks_path  =  "cookbooks"            chef.add_recipe("apache2")        end    end    config.vm.define  "database"  do  |database|        database.vm.network  :private_network,  ip:  "192.168.57.11"                config.vm.provision  :chef_solo  do  |chef|            chef.cookbooks_path  =  "cookbooks"            chef.add_recipe("mysql")        end    end end Thursday, September 26, 13
  • 72. CLOUD SAVVY 69 Multiple Machines Vagrant.configure("2")  do  |config|    config.vm.box  =  "precise64"    config.vm.box_url  =  "http://files.vagrantup.com/precise64.box"    config.vm.define  "web"  do  |web|        web.vm.network  :private_network,  ip:  "192.168.57.10"                config.vm.provision  :chef_solo  do  |chef|            chef.cookbooks_path  =  "cookbooks"            chef.add_recipe("apache2")        end    end    config.vm.define  "database"  do  |database|        database.vm.network  :private_network,  ip:  "192.168.57.11"                config.vm.provision  :chef_solo  do  |chef|            chef.cookbooks_path  =  "cookbooks"            chef.add_recipe("mysql")        end    end end Thursday, September 26, 13
  • 73. CLOUD SAVVY 70 Multiple Machines Vagrant.configure("2")  do  |config|    config.vm.box  =  "precise64"    config.vm.box_url  =  "http://files.vagrantup.com/precise64.box"    config.vm.define  "web"  do  |web|        web.vm.network  :private_network,  ip:  "192.168.57.10"                config.vm.provision  :chef_solo  do  |chef|            chef.cookbooks_path  =  "cookbooks"            chef.add_recipe("apache2")        end    end    config.vm.define  "database"  do  |database|        database.vm.network  :private_network,  ip:  "192.168.57.11"                config.vm.provision  :chef_solo  do  |chef|            chef.cookbooks_path  =  "cookbooks"            chef.add_recipe("mysql")        end    end end Thursday, September 26, 13
  • 74. CLOUD SAVVY 71 SYNC FOLDERS Vagrant.configure("2")  do  |config| config.vm.box  =  'precise64' config.vm.box_url  =  'http://files.vagrantup.com/precise64.box' config.vm.synced_folder  “/home/user/project/”,  “/var/www/html” end Thursday, September 26, 13
  • 75. CLOUD SAVVY 72 SYNC FOLDERS Vagrant.configure("2")  do  |config| config.vm.box  =  'precise64' config.vm.box_url  =  'http://files.vagrantup.com/precise64.box' config.vm.synced_folder  “/home/user/project/”,  “/var/www/html” end Thursday, September 26, 13
  • 76. CLOUD SAVVY THANK YOU! Thursday, September 26, 13

×