Local dev environment

Change-Id: Ie1ce75ee219d9db4f8a62b204a1b7c9d88abd993
diff --git a/.gitignore b/.gitignore
index 864cb97..9a92bf7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 *.pyc
 *.retry
 credentials/*
+.vagrant
diff --git a/README.md b/README.md
index 704d697..a50de6a 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,18 @@
 All of the commands below assume you're in the `cord/build/platform-install`
 directory.
 
+### Creating a development environment on you machine
+
+If you are doing work that does not involve `openstack` you can create a development environment on your local machine. This environment is mostly designed to do `GUI`, `APIs` and `modeling` related work. It can also be useful to test a `synchronizer` whose job is sinchronizing data using REST APIs.
+
+To do that we provided a `Vagrant` vm.
+From this folder just execute `vagrant up head-node`. We'll create an Ubuntu based VM with all the `cord` code shared from your local machine, so that you can make your changes locally and quickly test the outcome.
+
+Once the `vm` is created you can connect to it with `vagrant ssh head-node` and then from the `~/cord/build/platform-install` execute the profile you are interested in.
+For instance you can spin up the `frontend` configuration with: `ansible-playbook -i inventory/frontend deploy-xos-playbook.yml`.
+
+_Note that the `cord-bootstrap.sh` script is automatically invoked by the provisioning script and the `vagrant` vm requires VirtualBox_
+
 ### Credentials
 
 Credentials will be autogenerated and placed in the `credentials/` directory
diff --git a/Vagrantfile b/Vagrantfile
new file mode 100644
index 0000000..29a0d6a
--- /dev/null
+++ b/Vagrantfile
@@ -0,0 +1,28 @@
+Vagrant.configure("2") do |config|
+  # base image
+  config.vm.box = "ubuntu/trusty64"
+
+  # share the folder
+  config.vm.synced_folder "../../", "/home/vagrant/cord/", create: true
+  config.vm.synced_folder ".", "/vagrant", disabled: true
+
+  # set the frontend vm
+  config.vm.define "head-node" do |d|
+    d.vm.network "forwarded_port", guest: 9999, host: 9999
+    d.vm.network "forwarded_port", guest: 6379, host: 6379
+    d.vm.network "private_network", ip: "192.168.46.100"
+    d.vm.provider "virtualbox" do |vb|
+      vb.memory = "2048"
+      vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
+      vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
+    end
+  end
+
+  config.vm.provision "shell", privileged: false, inline: <<-SHELL
+    curl -o ~/cord-bootstrap.sh https://raw.githubusercontent.com/opencord/platform-install/master/scripts/cord-bootstrap.sh
+    bash cord-bootstrap.sh
+    ssh-keygen -t rsa -N "" -f .ssh/id_rsa
+    cp ~/.ssh/id_rsa node_key
+  SHELL
+
+ end