From 10388fd277107c5a6ab0da2c23380a30dc392fb0 Mon Sep 17 00:00:00 2001 From: Lusheng Ji Date: Fri, 20 Oct 2017 16:14:38 -0400 Subject: Add hooks for ONAP healthcheck 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 --- bootstrap/installer-docker.sh-template | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bootstrap/installer-docker.sh-template b/bootstrap/installer-docker.sh-template index 34b30c8..867dc1a 100755 --- a/bootstrap/installer-docker.sh-template +++ b/bootstrap/installer-docker.sh-template @@ -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 ] -- cgit 1.2.3-korg