• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Vagrant
 

Vagrant

on

  • 2,515 views

 

Statistics

Views

Total Views
2,515
Views on SlideShare
2,514
Embed Views
1

Actions

Likes
5
Downloads
40
Comments
0

1 Embed 1

http://a0.twimg.com 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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/

Vagrant Vagrant Presentation Transcript

  • Vagrant http://www.flickr.com/photos/themacinator/
  • Credits
    • Creators of Vagrant
      • Mitchell Hashimotor
        • http://mitchellhashimoto.com/
      • John Bender
        • http://nickelcode.com/
    • Patrick Debois http://jedi.be/blog/ Much of this presentation is based off his
      • http://www.slideshare.net/jedi4ever/vagrant-devopsdays-mountain-view-2011
  • 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.
  • Vagrant   http://www.vagrantup.com/ a tool for creating and distributing virtualized development environments.
  • How ? http://www.flickr.com/photos/51029297@N00/
  • Requirements
      • Ruby (use RVM)
      • Virtualbox
  • Install Stuff
    • $ gem install vagrant
  • Your First Box
    • $ vagrant box add base http://files.vagrantup.com/lucid32.box
    • $ vagrant init
    • $ vagrant up
  • Coffee http://www.flickr.com/photos/rwp-roger/
  • Connect
    • $ vagrant ssh 
  • Had Enough
    • $ vagrant destroy
  • Features http://www.flickr.com/photos/sidereal/
  • Port Forwarding VM Workstation 80 3306 1080 13306 config.vm.forward_port "http", 80, 1080 config.vm.forward_port "mysql", 3306, 13306
  • Shared Filesystem VM Workstation /home/bob/project /project config.vm.share_folder "project", "/project", "/home/bob/project"
  • Provisioners
      • Puppet
      • Chef
      • Shell Scripts
  • Using Puppet
    •   config.vm.provision :puppet do |puppet|
    •     puppet.manifests_path = "manifests"
    •     puppet.manifest_file  = "node.pp"
    •     puppet.module_path    = "modules"
    •   end 
  • Using Puppet
    •   config.vm.provision :puppet do |puppet|
    •     puppet.manifests_path = "manifests"
    •     puppet.manifest_file  = "node.pp"
    •     puppet.module_path    = "modules"
    •   end 
  • node.pp include myserver class myserver {      package {         "apache2"     => "present",         "mysql-server => "present",         "vim"         => "present",     } }
  • Why Vagrant ?
      • Easier than using Virtualbox
      • Rebuild at will
      • Dedicated environment for project
      • Reproducible environments
      • Distribute environments
      • Automated setup using Puppet, Chef or Shell Scripts
      • Tear down when done
  • For Developers
      • Servers like live
      • Servers you control
      • Stop polluting your workstation
      • Still use the tools you love
  • For Operations
      • Testing Puppet Manifests
      • Trying out new software
  • For Test
      • Testing client applications
      • UI testing
  • Demonstration http://www.flickr.com/photos/strassenstriche/
  • Cool Stuff http://www.flickr.com/photos/wza/
  • Version Control Vagrantfile Puppet VCS
  • Stacks
    • Vagrant::Config.run do |config|
    • config.vm.define :tomcat do |tomcat_config|
    • web_config.vm.box = "tomcat"
    • web_config.vm.forward_port("tc", 8080, 8080)
    • end
    • config.vm.define :web do |web_config|
    • web_config.vm.box = "web"
    • web_config.vm.forward_port("http", 80, 1080)
    • end
    • config.vm.define :mysql do |mysql_config|
    • db_config.vm.box = "mysql"
    • db_config.vm.forward_port("db", 3306, 13306)
    • end
    • end
    Tomcat MySQL Apache
  • Distribute Box
    • $ vagrant package --base my_base_box
    Base Box Base Box VM Provision Package
  • Obtaining Base Boxes
    • http://vagrantbox.es/
  • Creating Base Boxes
      • VeeWee
      • https://github.com/jedi4ever/veewee
  • References http://www.flickr.com/photos/brokenthoughts/
  • References
      • Vagrant  http://vagrantup.com/
      • Vagrant  https://github.com/mitchellh/vagrant
      • Virtual Box  https://www.virtualbox.org/  
      • RVM  http://beginrescueend.com/
      • Base Boxes http://vagrantbox.es/
      • VeeWee  https://github.com/jedi4ever/veewee
  • Questions ? http://www.flickr.com/photos/dullhunk/