3 # ============LICENSE_START==========================================
4 # ===================================================================
5 # Copyright (c) 2017 AT&T
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
11 # http://www.apache.org/licenses/LICENSE-2.0
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============================================
27 ARTIFACTS_VERSION="$7"
33 OPENSTACK_USERNAME="$13"
35 OPENSTACK_API_KEY="$15"
36 OPENSTACK_REGION="$16"
40 DGBUILDER_DOCKER="$20"
42 export HOSTNAME=`hostname`
43 echo 127.0.1.1 $HOSTNAME >>/etc/hosts
44 echo $PVTIP $HOSTNAME >>/etc/hosts
45 echo $PUBIP $HOSTNAME >>/etc/hosts
50 echo $PUBIP > /opt/config/public_ip.txt
51 echo $NEXUS_REPO > /opt/config/nexus_repo.txt
52 echo $DOCKER_REPO > /opt/config/nexus_docker_repo.txt
53 echo $NEXUS_USERNAME > /opt/config/nexus_username.txt
54 echo $NEXUS_PASSWORD > /opt/config/nexus_password.txt
55 echo $DMAAP_TOPIC > /opt/config/dmaap_topic.txt
56 echo $ARTIFACTS_VERSION > /opt/config/artifacts_version.txt
57 echo $DNS_IP > /opt/config/dns_ip_addr.txt
58 echo $DOCKER_VERSION > /opt/config/docker_version.txt
59 echo $GERRIT_BRANCH > /opt/config/gerrit_branch.txt
60 echo $DGBUILDER_DOCKER > /opt/config/dgbuilder_version.txt
61 echo $CLOUD_ENV > /opt/config/cloud_env.txt
62 echo $EXETERNAL_DNS > /opt/config/external_dns.txt
63 echo $APPC_REPO > /opt/config/remote_repo.txt
64 echo $OPENSTACK_USERNAME > /opt/config/openstack_username.txt
65 echo $TENANT_ID > /opt/config/tenant_id.txt
66 echo $OPENSTACK_API_KEY > /opt/config/openstack_api_key.txt
67 echo $OPENSTACK_REGION > /opt/config/openstack_region.txt
68 echo $KEYSTONE > /opt/config/keystone.txt
70 touch /opt/appc_install.sh
71 chmod 777 /opt/appc_install.sh
72 curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/appc_install.sh -o /opt/appc_install.sh
74 chmod +x appc_install.sh
75 /opt/appc_install.sh > appc_install.log 2>&1