CORD-1729 Use corddev VM as build machine

Change-Id: I1cc70957bf37d61ed0350425ac96eaae7dfd13bd
diff --git a/podconfig/rcord-virtual-buildlocal.yml b/podconfig/rcord-virtual-buildlocal.yml
old mode 100644
new mode 100755
diff --git a/scenarios/cord/Vagrantfile b/scenarios/cord/Vagrantfile
index e93fc68..0ebab54 100644
--- a/scenarios/cord/Vagrantfile
+++ b/scenarios/cord/Vagrantfile
@@ -16,6 +16,12 @@
     d.vm.box = "ubuntu/trusty64"
     d.vm.hostname = "corddev"
     d.vm.network "private_network", ip: "10.100.198.200"
+    d.vm.synced_folder settings['host_cord_profile_dir'], settings['build_cord_profile_dir'], create: true
+    d.vm.provision :hosts do |provisioner|
+      provisioner.autoconfigure = true
+      provisioner.sync_hosts = true
+      provisioner.add_host '10.100.198.201', ['docker-registry']
+    end
     d.vm.synced_folder $cordpath, settings['build_cord_dir']
     d.vm.provider :virtualbox do |v|
       v.memory = settings['dev_vm_mem']
diff --git a/scenarios/cord/config.yml b/scenarios/cord/config.yml
index c1b9be3..75e2b53 100644
--- a/scenarios/cord/config.yml
+++ b/scenarios/cord/config.yml
@@ -26,8 +26,10 @@
 config_cord_profile_dir: "{{ ( playbook_dir ~ '/../../../cord_profile' ) | realpath }}"
 
 build_cord_dir: "/opt/cord"
+build_cord_profile_dir: "/opt/cord_profile"
+host_cord_profile_dir: "~/cord_profile"
 
-buildnode: head1
+buildnode: corddev
 headnode: head1
 
 # docker config
@@ -57,9 +59,12 @@
 management_include_names: eth1
 management_exclude_names: eth0,eth2
 
+docker_opts: "{{ ('--insecure-registry ' ~ deploy_docker_registry) }}"
+
 # make build config
 build_targets:
  - prereqs-check
+ - prep-buildnode
  - prep-headnode
  - setup-automation
  - compute1-up
@@ -74,7 +79,6 @@
   - cord-config
 
 prep_buildnode_prereqs:
-  - prep-headnode
   - copy-cord
   - copy-config
 
@@ -107,6 +111,7 @@
 
 # Vagrant VM configuration
 vagrant_vms:
+  - corddev
   - head1
 
 dev_vm_mem: 2048
@@ -178,7 +183,7 @@
       ansible_connection: local
 
   build:
-    head1:
+    corddev:
 
   head:
     head1:
diff --git a/scripts/cord-bootstrap.sh b/scripts/cord-bootstrap.sh
index 17809fe..675c7f5 100755
--- a/scripts/cord-bootstrap.sh
+++ b/scripts/cord-bootstrap.sh
@@ -123,6 +123,7 @@
       cd ~
     fi
     vagrant plugin list | grep vagrant-mutate || vagrant plugin install vagrant-mutate
+    vagrant plugin list | grep vagrant-hosts || vagrant plugin install vagrant-hosts
 
     add_box ubuntu/trusty64
   fi