- Why virtualization?
- What’s Vagrant?
- Why use it? What does it require?
- The Vagrantfile
Why virtualize environments?
- Hard configuration of servers in Desktop
- Keep different configurations
- Everyone run the code in the same OS
- Avoid software conflicts
- Remove differences between environments
- Test your code in different environments
- Cheaper than hardware
What is vagrant?
- Build portable VMs
- On top of VirtualBox, VMWare, etc…
- Headless mode
- Automation (Chef, Puppet, ….)
- Easy configuration
- Automatic SSH access and shared folders
- Build on Ruby by M. Hashimoto & J. Bender
Ok, but why Vagrant?
- Easy to use
- Multi-platform tool
- Configuration versioning
- Open source tool (MIT License)
- Share a VM with a few KBs file
- Developers can test your app using Vagrant
I'm not sure it can be useful
- vagrant up
- Run multiple VMs
- Can be extended via plugins
- Complete command-line
- GUI mode
- Box (precise64.box, ….)
- Provider (VirtualBox, VMWare, ….)
- Provisioner (Puppet, Chef, …)
Useful Vagrant commands
- $ vagrant init
- $ vagrant up/halt
- $ vagrant reload
- $ vagrant suspend/resume
- $ vagrant provision
- $ vagrant destroy
- $ vagrant ssh
- Shared folders
- Choose a virtual machine as base from vagrantcloud.com or create yours
- $ vagrant init (name of selected virtual machine)
- $ vagrant up