[CORD-988] Adding GUI and REST config files
Updating apache cord config and using it in local vagrant
Change-Id: I634ccc75a119c7e0cdb9549c488dda95e36bd840
diff --git a/Vagrantfile b/Vagrantfile
index 29a0d6a..2202799 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -19,10 +19,32 @@
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/head-prologue/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-spa-gui" | sudo tee --append /etc/hosts > /dev/null
+ echo "127.0.0.1 xos-rest-gw" | 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
SHELL
end