The spreading of Vagrant application is rapidly increasing, especially owing to the rising number of available plug-ins, capable to extend the tool's native behaviour and to satisfy most users' needs.
Vagrant comes with a very user-friendly interface dedicated to plug-ins handling:
# List of installed plugin $. vagrant plugin list # Install plugin $. vagrant plugin install <name> # Uninstall plugin $. vagrant plugin uninstall <name> # Update plugin $. vagran plugin update <name>
The purpose of this article is trying to extend the default Provider set, comprising VirtualBox, by adding AWS. This will allow the deployment of a configuration, used for your local developments on top of Amazon services.
First, you have to install the vagrant-aws plug-in
$. vagrant plugin install vagrant-aws
In amazon, you can not load a local .box, as there is a different process for handling operating systems, but on the contrary vagrant requires a box. So you can start by loading a "placeholder" and adding to your Vagrantfile a basic configuration
$ vagrant box add aws https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
Now you are ready to deploy your machine in Cloud:
Vagrant.configure("2") do |config| config.vm.box = "aws" config.vm.provider :aws do |aws, override| aws.access_key_id = "KEY" aws.secret_access_key = "SECRET KEY" aws.keypair_name = "KEYPAIR NAME" aws.ami = "ami-7747d01e" override.ssh.username = "ubuntu" override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY" end end
in this case it is an Ubuntu machine in the default region us-east-1; this is the basic configuration, then the plug-in supports many other options to reach your target.
This is a very quick and centralized way for you to manage local developments and a potential deployment of a test phase for the customer.