Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team.

Vagrant stands on the shoulders of giants. Machines are provisioned on top of VirtualBox, VMware, AWS, etc.

I am using virtualbox as an example, you can fire up a ubuntu box with a few lines of code.

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config| = "ubuntu/trusty64"

config.vm.synced_folder "./data", "/home/vagrant/data"
config.vm.provision "shell", path: "./scripts/vagrant/" "forwarded_port", guest: 8983, host: 8984, auto_correct: true "private_network", ip: ""

config.vm.provider "virtualbox" do |vb|

# Customize the amount of memory on the VM:
vb.memory = "8024"


You can forward the port from virtual box to your host, if the port is used with other programs, it can auto fix the port and assign a new one. "forwarded_port", guest: 8983, host: 8984, auto_correct: true

You can set up a virtual ip for the box. "private_network", ip: ""

Setup a sync folder that can be access both in ssh and your host machine.

config.vm.synced_folder "./data", "/home/vagrant/data"

After you have created the VagrantFile, you can call

Vagrant Up

to fire up the box.

Once configuration VagrantFile has been changed, need to call

Vagrant Reload

to refresh the virtual box.

To destroy a virtual box, call

Vagrant Destroy

To access public built vagrant boxes,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s