CORD-1394 Unify build environment paths
Change-Id: I433d5ae95c9cc540d5586da5ca55b889d8fb1f81
diff --git a/Vagrantfile b/Vagrantfile
index 35b4f53..c401275 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -3,50 +3,23 @@
config.vm.box = "ubuntu/trusty64"
# share the folder
- config.vm.synced_folder "../../", "/home/vagrant/cord/", create: true
- config.vm.synced_folder "./cord_profile", "/home/vagrant/cord_profile/", create: true
+ config.vm.synced_folder "../../", "/opt/cord/", create: true
+ config.vm.synced_folder "./cord_profile", "/opt/cord_profile/", 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 = "4096"
+ 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
- # Setup CORD tools
- 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
-
- # Install apache
- sudo apt-get update
- sudo apt-get install -y apache2 libapache2-mod-fastcgi apache2-mpm-worker
- sudo a2enmod proxy_http
- sudo a2enmod headers
- sudo a2enmod rewrite
- sudo a2enmod proxy_wstunnel
-
- # Copy apache conf
- sudo cp /home/vagrant/cord/build/platform-install/roles/apache-proxy/files/cord-http.conf /etc/apache2/conf-enabled/cord-http.conf
-
- # Reload Apache
- sudo service apache2 reload
-
- # Add hosts
- echo "127.0.0.1 xos" | sudo tee --append /etc/hosts > /dev/null
- echo "127.0.0.1 xos-gui" | sudo tee --append /etc/hosts > /dev/null
- echo "127.0.0.1 xos-ws" | sudo tee --append /etc/hosts > /dev/null
- echo "127.0.0.1 xos-chameleon" | sudo tee --append /etc/hosts > /dev/null
- echo "127.0.0.1 xos-core" | sudo tee --append /etc/hosts > /dev/null
- echo "127.0.0.1 consul" | sudo tee --append /etc/hosts > /dev/null
- SHELL
-
- end
+ config.vm.provision :shell, privileged: false, path: "./scripts/cord-bootstrap.sh"
+ config.vm.provision "ansible_local" do |ansible|
+ ansible.provisioning_path = "/opt/cord/build/platform-install"
+ ansible.playbook = "bootstrap-dev-env.yml"
+ end
+end