Refactor ONAP HEAT template config, part 2
[demo.git] / heat / ONAP / cloud-config / mr_install.sh
1 #!/bin/bash
2
3 # Read configuration files
4 GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
5 CODE_REPO=$(cat /opt/config/remote_repo.txt)
6 HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
7 HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
8
9 if [ $HTTP_PROXY != "no_proxy" ]
10 then
11     export http_proxy=$HTTP_PROXY
12     export https_proxy=$HTTPS_PROXY
13 fi
14
15
16 # Download scripts from Nexus
17 # a) scripts for message router (mr)
18 update-rc.d mr_serv.sh defaults
19
20 # b) scripts for bus controller (dbcl)
21
22
23 # Clone Gerrit repository and run docker containers
24 cd /opt
25 git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO /opt/startup-vm-message-router
26 ./mr_vm_init.sh