Vagrant
1. Manage VM's like a pro
2. ???
3. PROFIT!
Obligatory introduction
Hi, I'm Paul Finn
I'm a web developer at Heartland Payment Systems.
(Fortune 1000; credit card processing & payroll)
Previously: Saltwater Creative, Newmarket, MeetingMatrix
Virtual Machines
![](http://cdn.meme.li/i/or608.jpg)
Why do devs love VMs?
Because...
Too many things on Github to try...
RAM is cheap!
...but most importantly...
You need to get Apache 2.0.5--prefork working with PHP 4.8.1 for a client you had 7 years ago and the ORM only works with MySQL 4 but not the 4.1 driver, that causes problems with CentOS 5.1 so be sure you "yum update gcc-config" because if you don't you'll never get PDO working without that crazy PERL extension that you found that one time on Sourceforge.
THAT'S JUST NUTS.
I mean, c'mon.
Sourceforge??
Better document this crazy setup...
I'll create a VM!
GREAT! GOOD THINKING!
I'll commit this 8GB VHD to the repo!
![](http://1.bp.blogspot.com/-ymNre4gQbT4/ULvjgL4AfOI/AAAAAAAADKo/9GJeCViq5Ww/s1600/Facepalm_9a08b9_59080.jpg)
VAGRANT
Open source software for creating and managing VMs.
For developers.
"A wrapper around VirtualBox"
Because you wish you could commit a VM to a repo.
Because you work on a team
(or you manage a team)
Because you KNOW your local machine LAMP/Rails/Django stack looks nothing like your production environment.
Vagrant Makes VM's TRULY
Disposable.
Consistent.
Scriptable.
Commit-able.
Dependable.
Getting Started
Download Vagrant
(prereq: VirtualBox/VMWare)
3 Easy Steps:
-
Initialize
-
Up
-
SSH
$ vagrant init precise32 http://files.vagrantup.com/precise32.box
^---[box name] [box url]--^$ vagrant up
$ vagrant ssh
DEMO
![](http://cdn.meme.li/i/or6t7.jpg)
AWESOMESAUCE
Synced Folders between host and guest
Easily configure networking & port forwarding
Provisioning. Provisioning. Provisioning.
How? Each VM has a Vagrantfile
VAGRANTFILE
Ruby, but you don't have to know Ruby
"What's my base box and how do I configure it?"
All the network and provisioning information tucked inside.
VAGRANT + PROVISIONING SCRIPTS == SO MUCH WIN
Automatically run your setup scripts (provisioning) when you fire up your VM.
Configure in your Vagrantfile
Ansible, Puppet, Chef, bash scripts, etc.
Demo! Apache on :4567 in four lines of shell script
(lets see what's in the Vagrantfile and bootstrap.sh first!)
Oh, the potential!
More Info
Thanks!
pvfinn@gmail.com
Vagrant
By paulfinn
Vagrant
- 3,396