aboutsummaryrefslogtreecommitdiffstats
path: root/boot/dns_install.sh
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2017-11-01 13:49:33 -0400
committerLusheng Ji <lji@research.att.com>2017-11-01 13:53:03 -0400
commit74cb51c88f99f9128d43f4645c6f2aa86163d43b (patch)
tree4f2dd8aed9d854f832cf5a7df5435e75b8ec6300 /boot/dns_install.sh
parent5d9f3b5b32a107ec482f7192118891a000baf566 (diff)
Add support for DNS zone fusion
This submission address the "fusion" between DNS service zones between DCAE and rest of ONAP R1. In ONAP R1 each ONAP deployment runs its own private DNS server; DCAE use Designate DNS as a Service. The VMs on both sides need to be able to communicate with each other by hostnames. This submission modifies the ONAP private DNS server so it uses the DNS server behind the Designate as the forwarder. For ONAP->DCAE communication, host names will be resolved by Designate DNS server; for DCAE->ONAP communication, since DCAE VMs also use the ONAP private DNS server as first name server, it is not a problem. Issue-Id: DCAEGEN2-187 Change-Id: Ia54cd41f33b446d406a69868598ae1a8c0cdea8d Signed-off-by: Lusheng Ji <lji@research.att.com>
Diffstat (limited to 'boot/dns_install.sh')
-rw-r--r--boot/dns_install.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/boot/dns_install.sh b/boot/dns_install.sh
index 2985bb7d..5d3a9a3f 100644
--- a/boot/dns_install.sh
+++ b/boot/dns_install.sh
@@ -5,6 +5,7 @@ NEXUS_REPO=$(cat /opt/config/nexus_repo.txt)
ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
+
if [[ $CLOUD_ENV != "rackspace" ]]
then
# Add host name to /etc/host to avoid warnings in openstack images
@@ -64,9 +65,12 @@ curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/$ZONE_ONAP -o /etc/bin
curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/$OPTIONS_FILE -o /etc/bind/named.conf.options
curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/named.conf.local -o /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" ]]
then
+ sed -i "s/dns_forwarder/"$(cat /opt/config/dns_forwarder.txt)"/g" /etc/bind/named.conf.options
sed -i "s/dns_ip_addr/"$(cat /opt/config/dns_ip_addr.txt)"/g" /etc/bind/named.conf.options
sed -i "s/external_dns/"$(cat /opt/config/external_dns.txt)"/g" /etc/bind/named.conf.options
sed -i "s/aai1_ip_addr/"$(cat /opt/config/aai1_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org
@@ -107,4 +111,5 @@ fi
# Configure Bind
modprobe ip_gre
sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9
-service bind9 restart \ No newline at end of file
+service bind9 restart
+