With Vagrant 1.1, you can use the same configuration and workflow to spin up and provision machines in VirtualBox, VMware, AWS, RackSpace, and more. You get all the benefits of Vagrant with the power of working in whatever environment you need to.
In this talk, you’ll learn how to use the new multi-provider features of Vagrant to more effectively develop and test Chef cookbooks.
6. A tool for creating,
managing, and distributing
portable development
environments.
7. $ vagrant box add base
http://files.vagrantup.com/precise32.box
...
$ vagrant up
...
$ vagrant ssh
vagrant@precise64:~$ echo hello
hello
Zero to VM in Seconds
12. 2010: Vagrant 0.1
Vagrant 0.1 It worked, it
was okay, but it was pretty
bare.
- VirtualBox: create/destroy
- Provision with Chef solo
- Only worked on Mac OS X
and with Ubuntu VMs.
13. 2012: Vagrant 1.0
Vagrant 1.0.
Solid. Does its job well.
Dependable. Stable.
VirtualBox only, but supports
Chef, Puppet, and shell
scripts. Guest VMs can be
any Linux.
14. 2013: Vagrant 1.1+
Vagrant 1.1+: The Future
Works with any provider,
not just VirtualBox. Works
_really_ well on Windows.
Will work well with any
guest, not just Linux.
And... lots more TBA.
39. Best effort.
Not every provider can satisfy every Vagrant
abstraction, but it won’t fail if it can’t.
Example: AWS networking doesn’t
map well to Vagrant networking.
Vagrant + AWS will just ignore
networking configurations. Not
error. It’ll make a “best effort” to
work.
41. Template for a machine.
Base image for VirtualBox,
AMI/metadata for AWS, etc.
42. $ vagrant box list
centos (virtualbox)
precise64 (aws)
precise64 (virtualbox)
precise64 (vmware_fusion)
Tied to a Provider
43. You need a box for
each provider.
This process is manual, for now.
44. VirtualBox: OVF export
VMware: VMX export
LXC: rootfs tarball
AWS: Metadata (AMI info)
What’s in a box?
It varies by provider. Actually,
anything can be in a box. The
provider is responsible for
reading and verifying
structure.
45. Provider-Specific Config
The full power of the provider, if you need it.
Abstractions are nice, but sometimes
you want to take advantage of specific
properties of a provider. For example,
AWS can do things VMware can’t, and
vice versa.
Provider-specific config lets you do that.
46. Vagrant.configure(“2”) do |config|
config.vm.box = “precise64”
config.vm.provider “virtualbox” do |v|
v.customize [“modifyvm”, :id, “--memory”, “2048”]
end
config.vm.provider “vmware_fusion” do |v|
v.vmx[“memsize”] = “2048”
end
end
Example: Setting Memory
47. Vagrant.configure(“2”) do |config|
config.vm.box = “precise64”
config.vm.provider “virtualbox” do |v|
v.customize [“modifyvm”, :id, “--memory”, “2048”]
end
config.vm.provider “vmware_fusion” do |v|
v.vmx[“memsize”] = “2048”
end
end
Example: Setting Memory
48. Vagrant.configure(“2”) do |config|
config.vm.box = “precise64”
config.vm.provider “virtualbox” do |v|
v.customize [“modifyvm”, :id, “--memory”, “2048”]
end
config.vm.provider “vmware_fusion” do |v|
v.vmx[“memsize”] = “2048”
end
end
Example: Setting Memory
49. Portable
Even if the user doesn’t have that provider
installed, the Vagrantfile will still work.
50. Clear Purpose
It makes it clear that that configuration applies
ONLY to specific providers.
51. Power
A place to expose full capabilities
of underlying providers.
58. Eventually first-class.
Vagrant will ship with first class support, eventually.
They’re currently plugins to
allow bleeding edge providers
to mature.
At some point, Vagrant will
ship with built-in support for
various providers.
59. Google “x vagrant provider”
No single list yet, more providers all the time.
The best way to find providers
at the moment is Google. Don’t
underestimate how easy this
is.
No list because it changes to
quickly. Judge the quality
based on GitHub pulse.
65. $79 per user
It’s how I make my living. <3 Vagrant.
* In addition to VMware licensing cost.
66. VMware Fusion
Happy Mac users.
Used by thousands of
companies. Stable. Very very
happy users.
Not a single refund since
launch. Incredible feedback.
67. VMware Workstation
Linux and Windows.
Launched TODAY. Available
TODAY (when talk was given).
Same price, low compared to
Workstation. Can run the same
VMs as the Fusion provider.
68. vagrantup.com/vmware
Help me keep working on this full time.
Launched TODAY. Available
TODAY (when talk was given).
Same price, low compared to
Workstation. Can run the same
VMs as the Fusion provider.