blob: e89f1b0d851802a5ffd8956ad31eef8bf7d4ab32 [file] [log] [blame]
Hong Guanec175442017-11-20 16:46:51 -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"
15DMAAP_TOPIC="$12"
16OPENSTACK_USERNAME="$13"
17TENANT_ID="$14"
18OPENSTACK_API_KEY="$15"
19OPENSTACK_REGION="$16"
20KEYSTONE="$17"
21APPC_REPO="$18"
22DOCKER_VERSION="$19"
23DGBUILDER_DOCKER="$20"
24
25export HOSTNAME=`hostname`
26echo 127.0.1.1 $HOSTNAME >>/etc/hosts
27echo $PVTIP $HOSTNAME >>/etc/hosts
28echo $PUBIP $HOSTNAME >>/etc/hosts
29
30
31mkdir /opt/config
32chmod 777 /opt/config
33echo $PUBIP > /opt/config/public_ip.txt
34echo $NEXUS_REPO > /opt/config/nexus_repo.txt
35echo $DOCKER_REPO > /opt/config/nexus_docker_repo.txt
36echo $NEXUS_USERNAME > /opt/config/nexus_username.txt
37echo $NEXUS_PASSWORD > /opt/config/nexus_password.txt
38echo $DMAAP_TOPIC > /opt/config/dmaap_topic.txt
39echo $ARTIFACTS_VERSION > /opt/config/artifacts_version.txt
40echo $DNS_IP > /opt/config/dns_ip_addr.txt
41echo $DOCKER_VERSION > /opt/config/docker_version.txt
42echo $GERRIT_BRANCH > /opt/config/gerrit_branch.txt
43echo $DGBUILDER_DOCKER > /opt/config/dgbuilder_version.txt
44echo $CLOUD_ENV > /opt/config/cloud_env.txt
45echo $EXETERNAL_DNS > /opt/config/external_dns.txt
46echo $APPC_REPO > /opt/config/remote_repo.txt
47echo $OPENSTACK_USERNAME > /opt/config/openstack_username.txt
48echo $TENANT_ID > /opt/config/tenant_id.txt
49echo $OPENSTACK_API_KEY > /opt/config/openstack_api_key.txt
50echo $OPENSTACK_REGION > /opt/config/openstack_region.txt
51echo $KEYSTONE > /opt/config/keystone.txt
52
53touch /opt/appc_install.sh
54chmod 777 /opt/appc_install.sh
55curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/appc_install.sh -o /opt/appc_install.sh
56cd /opt
57chmod +x appc_install.sh
58/opt/appc_install.sh > appc_install.log 2>&1