Enhanced the installer's test mode such that multiple development users
can create independent vagrant VM based clusters on the same bare metal
server. This reduces the number of servers required to do development
and testing of the voltha HA cluster.
Updated the production installer to start a 3 node docker swarm cluster
once installation is completed.
Added an option to the production installer to use a different QEMU/KVM
network to enable testing of the installer using vagrant based VMs on
the same server as the installer. The production installer will use the
default network otherwise.
Further provisioning of the installed environment will be submitted in
subsequent updates as the HA implementation progresses.

Change-Id: I62424e882d4a7f322acb9e26a9ee588c6fa91ca1
diff --git a/Vagrantfile b/Vagrantfile
index fc1e459..517ee29 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -21,9 +21,14 @@
       Provider = "virtualbox"
     else
       puts("Using the QEMU/KVM configuration");
-      config.vm.synced_folder "../..", "/cord", type: "nfs"
       Box = "ubuntu1604"
       Provider = "libvirt"
+      if settings['testMode'] == "true"
+          config.vm.synced_folder ".", "/vagrant", disabled: true
+          config.vm.synced_folder "../..", "/cord", type: "rsync", rsync__exclude: [".git", "venv-linux"]
+      else
+          config.vm.synced_folder "../..", "/cord", type: "nfs"
+      end
     end
   else
     puts("Configuring for other")
@@ -32,10 +37,10 @@
     Provider = "virtualbox"
   end
 
-  config.vm.define "voltha" do |d|
+  config.vm.define "#{settings['server_name']}" do |d|
     d.ssh.forward_agent = true
     d.vm.box = Box
-    d.vm.hostname = "voltha"
+    d.vm.hostname = "#{settings['server_name']}"
     d.vm.network "private_network", ip: "10.100.198.220"
     d.vm.provision :shell, path: "ansible/scripts/bootstrap_ansible.sh"
     d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/incubator/voltha/ansible/voltha.yml -c local"