Vagrant
for dev environments

Rob Martin / @version2beta

http://twitter.com/version2beta

http://version2beta.com

https://github.com/Version2beta

"The only time to eat diet food is while you're waiting for the steak to cook."

Get Vagrant at http://vagrantup.com. Get a Vagrant + Wordpress repository at https://github.com/Version2beta/vagrant-chef-wordpress. Get more Vagrant dev environments from my Github too. https://github.com/Version2beta.

Charles Miles Brindley. Screwup. Geek. Grandpa.

ENIAC:

  • The world's first electronic computer.
  • A very complicated development environment.
  • Hard to virtualize.
  • Pretty good at Tic Tac Toe.

My specialty was photographing attractive women without their clothing. And sometimes flowers.

Windows NT 4.0 Server:

  • A very complicated development environment.
  • Somewhat difficult to virtualize.
  • Pretty good at solitaire.

Experience is what you get when you don't get what you want.

I totally just made this up, but I'm sure I've done worse in real life.

I didn't make this one up. It really happened.

My bio used to say, "I think I'm free for lunch." That is still often true.

 1 # -*- mode: ruby -*-
 2 # vi: set ft=ruby :
 3 
 4 Vagrant.configure("2") do |config|
 5   config.vm.box = "precise64"
 6   config.vm.box_url = "http://files.vagrantup.com/precise64.box"
 7 
 8   # Uncomment the next line if you like to watch.
 9   # config.vm.boot_mode = :gui
10 
11   # Port 8000 on the host will go to port 80 on the Vagrant box
12   config.vm.network :forwarded_port, guest: 80, host: 8000, auto_correct: true
13 
14   # Here's a folder for passing stuff back and forth
15   config.vm.synced_folder "./shared", "/home/vagrant/host_shared"
16 
17   config.vm.provision :chef_solo do |chef|
18     chef.json = {
19       :mysql => {
20         :server_root_password   => "six pasta obsessed wreck",
21         :server_repl_password   => "six pasta obsessed wreck",
22         :server_debian_password => "six pasta obsessed wreck"
23       }
24     }
25     chef.cookbooks_path = "cookbooks"
26     chef.add_recipe "apt"
27     chef.add_recipe "ohai"
28     chef.add_recipe "configure"
29   end
30 end

I don't actually remember kindergarten very well.

The Vagrant file structure.

JSON in a databag

Chef's cookbook organization

Python was actually named after Monty Python.

@version2beta

http://twitter.com/version2beta | http://version2beta.com

https://github.com/Version2beta/vagrant-chef-wordpress
https://github.com/Version2beta/vagrant-chef-drupal7
https://github.com/Version2beta/vagrant-chef-composer

Tech support is always free!*

* Free as in beer. Means you buy me a beer and I give you tech support.