clamphealth check
[oom.git] / TOSCA / VM / MessageRouter / scripts / messagerouter.sh
1 #!/bin/sh
2
3 #
4 PUBIP="$1"
5 PVTIP="$2"
6 NEXUS_REPO="$3"
7 DOCKER_REPO="$4"
8 NEXUS_USERNAME="$5"
9 NEXUS_PASSWORD="$6"
10 ARTIFACTS_VERSION="$7"
11 DNS_IP="$8"
12 GERRIT_BRANCH="$9"
13 CLOUD_ENV="$10"
14 EXETERNAL_DNS="$11"
15 MR_REPO="$12"
16
17 export HOSTNAME=`hostname`
18 echo 127.0.1.1 $HOSTNAME >>/etc/hosts
19 echo $PVTIP $HOSTNAME >>/etc/hosts
20 echo $PUBIP $HOSTNAME >>/etc/hosts
21
22
23 mkdir /opt/config
24 chmod 777 /opt/config
25 echo $PUBIP                                     > /opt/config/public_ip.txt
26 echo $NEXUS_REPO                                > /opt/config/nexus_repo.txt
27 echo $DOCKER_REPO                               > /opt/config/nexus_docker_repo.txt
28 echo $NEXUS_USERNAME                            > /opt/config/nexus_username.txt
29 echo $NEXUS_PASSWORD                            > /opt/config/nexus_password.txt
30 echo $ARTIFACTS_VERSION                         > /opt/config/artifacts_version.txt
31 echo $DNS_IP                                    > /opt/config/dns_ip_addr.txt
32 echo $GERRIT_BRANCH                             > /opt/config/gerrit_branch.txt
33 echo $CLOUD_ENV                                 > /opt/config/cloud_env.txt
34 echo $EXETERNAL_DNS                             > /opt/config/external_dns.txt
35 echo $MR_REPO                                   > /opt/config/remote_repo.txt
36
37 touch /opt/mr_install.sh
38 chmod 777 /opt/mr_install.sh
39 curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/mr_install.sh -o /opt/mr_install.sh;
40 cd /opt
41 chmod +x mr_install.sh
42 /opt/mr_install.sh > mr_install.log 2>&1