blob: 1ceebae12b138c89ec82b7ad98ae7e45d7862989 [file] [log] [blame]
Hong Guanec175442017-11-20 16:46:51 -05001#!/bin/sh
2
Hong Guan9000c852018-05-02 13:25:14 -04003# ============LICENSE_START==========================================
4# ===================================================================
5# Copyright (c) 2017 AT&T
6#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#============LICENSE_END============================================
19
Hong Guanec175442017-11-20 16:46:51 -050020#
21PUBIP="$1"
22PVTIP="$2"
23NEXUS_REPO="$3"
24DOCKER_REPO="$4"
25NEXUS_USERNAME="$5"
26NEXUS_PASSWORD="$6"
27ARTIFACTS_VERSION="$7"
28DNS_IP="$8"
29GERRIT_BRANCH="$9"
30CLOUD_ENV="$10"
31EXETERNAL_DNS="$11"
32DMAAP_TOPIC="$12"
33OPENSTACK_USERNAME="$13"
34TENANT_ID="$14"
35OPENSTACK_API_KEY="$15"
36OPENSTACK_REGION="$16"
37KEYSTONE="$17"
38APPC_REPO="$18"
39DOCKER_VERSION="$19"
40DGBUILDER_DOCKER="$20"
41
42export HOSTNAME=`hostname`
43echo 127.0.1.1 $HOSTNAME >>/etc/hosts
44echo $PVTIP $HOSTNAME >>/etc/hosts
45echo $PUBIP $HOSTNAME >>/etc/hosts
46
47
48mkdir /opt/config
49chmod 777 /opt/config
50echo $PUBIP > /opt/config/public_ip.txt
51echo $NEXUS_REPO > /opt/config/nexus_repo.txt
52echo $DOCKER_REPO > /opt/config/nexus_docker_repo.txt
53echo $NEXUS_USERNAME > /opt/config/nexus_username.txt
54echo $NEXUS_PASSWORD > /opt/config/nexus_password.txt
55echo $DMAAP_TOPIC > /opt/config/dmaap_topic.txt
56echo $ARTIFACTS_VERSION > /opt/config/artifacts_version.txt
57echo $DNS_IP > /opt/config/dns_ip_addr.txt
58echo $DOCKER_VERSION > /opt/config/docker_version.txt
59echo $GERRIT_BRANCH > /opt/config/gerrit_branch.txt
60echo $DGBUILDER_DOCKER > /opt/config/dgbuilder_version.txt
61echo $CLOUD_ENV > /opt/config/cloud_env.txt
62echo $EXETERNAL_DNS > /opt/config/external_dns.txt
63echo $APPC_REPO > /opt/config/remote_repo.txt
64echo $OPENSTACK_USERNAME > /opt/config/openstack_username.txt
65echo $TENANT_ID > /opt/config/tenant_id.txt
66echo $OPENSTACK_API_KEY > /opt/config/openstack_api_key.txt
67echo $OPENSTACK_REGION > /opt/config/openstack_region.txt
68echo $KEYSTONE > /opt/config/keystone.txt
69
70touch /opt/appc_install.sh
71chmod 777 /opt/appc_install.sh
72curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/appc_install.sh -o /opt/appc_install.sh
73cd /opt
74chmod +x appc_install.sh
75/opt/appc_install.sh > appc_install.log 2>&1