aboutsummaryrefslogtreecommitdiffstats
path: root/heat/ONAP/cloud-config/dns_install.sh
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-08-03 07:56:14 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-08-06 08:20:47 -0700
commitb9a2a29a9e1e93cd04bfa46f9ed66a2117ef56e5 (patch)
treebcf2b80a434326360f3ce1ec0d64110d5b09e1e8 /heat/ONAP/cloud-config/dns_install.sh
parent16509432a21feb3f90bbf954ec4815c2bf7f0033 (diff)
Refactor ONAP HEAT template config, part 2
Change-Id: Ic4930654395ec9e9d57836733cd47e7a3b0bf972 Issue-ID: INT-605 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'heat/ONAP/cloud-config/dns_install.sh')
-rw-r--r--heat/ONAP/cloud-config/dns_install.sh34
1 files changed, 12 insertions, 22 deletions
diff --git a/heat/ONAP/cloud-config/dns_install.sh b/heat/ONAP/cloud-config/dns_install.sh
index 1f940ac3..b277e6dc 100644
--- a/heat/ONAP/cloud-config/dns_install.sh
+++ b/heat/ONAP/cloud-config/dns_install.sh
@@ -1,7 +1,6 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -15,33 +14,24 @@ fi
if [[ $CLOUD_ENV != "rackspace" ]]
then
- # Add host name to /etc/host to avoid warnings in openstack images
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-
- # Set the Bind configuration file name based on the deployment environment
- ZONE_FILE="bind_zones"
- ZONE_ONAP="bind_zones_onap"
- OPTIONS_FILE="bind_options"
+ # Set the Bind configuration file name based on the deployment environment
+ ZONE_FILE="bind_zones"
+ ZONE_ONAP="bind_zones_onap"
+ OPTIONS_FILE="bind_options"
else
- ZONE_FILE="db_simpledemo_openecomp_org"
- ZONE_ONAP="db_simpledemo_onap_org"
- OPTIONS_FILE="named.conf.options"
+ ZONE_FILE="db_simpledemo_openecomp_org"
+ ZONE_ONAP="db_simpledemo_onap_org"
+ OPTIONS_FILE="named.conf.options"
fi
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget bind9 bind9utils bind9-doc ntp ntpdate make
+apt-get install -y bind9 bind9utils bind9-doc
# Download script
mkdir /etc/bind/zones
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip $ZONE_FILE > /etc/bind/zones/db.simpledemo.openecomp.org
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip $ZONE_ONAP > /etc/bind/zones/db.simpledemo.onap.org
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip $OPTIONS_FILE > /etc/bind/named.conf.options
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip named.conf.local > /etc/bind/named.conf.local
+cp /opt/boot/$ZONE_FILE /etc/bind/zones/db.simpledemo.openecomp.org
+cp /opt/boot/$ZONE_ONAP /etc/bind/zones/db.simpledemo.onap.org
+cp /opt/boot/$OPTIONS_FILE /etc/bind/named.conf.options
+cp /opt/boot/named.conf.local /etc/bind/named.conf.local
# Set the private IP address of each ONAP VM in the Bind configuration in OpenStack deployments
if [[ $CLOUD_ENV != "rackspace" ]]