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