"Multi-Provider Vagrant: AWS, VMware & More" by Mitchell Hashimoto, Founder, HashiCorp.
Presentation Overview: VirtualBox, VMware, AWS, RackSpace, and more. You get all the benefits of Vagrant with the power of working in whatever environment you need to. This capability unlocks entirely new use cases for Vagrant that can help better optimize the entire process of developing and testing Puppet code. In this talk, you'll learn how about the new multi-provider features, why they exist, and how they can be used. Your life will never be the same again.
Speaker Bio: Mitchell is best known as the creator of Vagrant and founder of HashiCorp. He is also an O'Reilly author and professional speaker. He is one of the top GitHub users by followers, activity, and contributions. "Automation obsessed," Mitchell strives to build elegant, powerful DevOps tools at HashiCorp that automate anything and everything. Mitchell is probably the only person in the world with deep knowledge of most virtualization hypervisors.
21. Create and Manage Virtualized Development Environments
Mitchell Hashimoto
Vagrant
Up and Running
http://hashi.co/vagrant-book
Friday, August 23, 13
41. But 1.2.x is quite good
The core is much stronger, many subtle issues
fixed, latest support for various host/guest
combos, NFS is way better, etc.
Friday, August 23, 13
72. 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.
Friday, August 23, 13
74. $ vagrant box list
centos (virtualbox)
precise64 (aws)
precise64 (virtualbox)
precise64 (vmware_fusion)
Tied to a Provider
Friday, August 23, 13
75. You need a box for
each provider.
Packer to the rescue!
Friday, August 23, 13
76. 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.
Friday, August 23, 13
77. 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.
Friday, August 23, 13
78. 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
Friday, August 23, 13
79. 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
Friday, August 23, 13
80. 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
Friday, August 23, 13
81. Powerful
A place to expose full capabilities
of underlying providers.
Friday, August 23, 13
82. Portable
Even if the user doesn’t have that provider
installed, the Vagrantfile will still work.
Friday, August 23, 13
83. Clear Purpose
It makes it clear that that configuration applies
ONLY to specific providers.
Friday, August 23, 13
84. Totally Optional
Just use a normal Vagrantfile if you don’t care.
This is for power users.
Friday, August 23, 13
85. That’s it for providers.
Same powerful workflow, clean abstractions,
uncompromised flexibility.
Friday, August 23, 13
86. Real world: People usually
choose one provider and stick
with it. The important part is
you now have choice.
Friday, August 23, 13