Add hooks for ONAP healthcheck 35/19935/1
authorLusheng Ji <lji@research.att.com>
Fri, 20 Oct 2017 20:14:38 +0000 (16:14 -0400)
committerLusheng Ji <lji@research.att.com>
Fri, 20 Oct 2017 20:14:45 +0000 (16:14 -0400)
Writing out floating IP addresses of Consul and CloudifyManager
VMs to host files, used by Nginx proxy for redirecting
ONAP healthcheck call.

Issue-Id: DCAEGEN2-128
Change-Id: I502ca663fbb42009198acb14a8225bc9f1164730
Signed-off-by: Lusheng Ji <lji@research.att.com>
bootstrap/installer-docker.sh-template

index 34b30c8..867dc1a 100755 (executable)
@@ -52,6 +52,11 @@ LOCATIONID=$(printenv LOCATION)
 SSHOPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
 STARTDIR=$(pwd)
 
+# clear out files for writing out floating IP addresses
+rm -f "$STARTDIR"/config/runtime.ip.consul
+rm -f "$STARTDIR"/config/runtime.ip.cm
+
+
 SSHUSER=centos
 PVTKEY=./config/key
 INPUTS=./config/inputs.yaml
@@ -410,6 +415,11 @@ echo "CDAP cluster registered"
 cfy install -p ./blueprints/cdapbroker/${CDAPBROKERBP} -b cdapbroker -d cdapbroker -i "location_id=${LOCATION}"
 
 
+# write out IP addresses
+echo "$CONSULIP" > "$STARTDIR"/config/runtime.ip.consul
+echo "$PUBIP" > "$STARTDIR"/config/runtime.ip.cm
+
+
 # Keep the container up
 rm -f /tmp/ready_to_exit
 while [ ! -e /tmp/ready_to_exit ]