aboutsummaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-05-10 17:17:39 -0500
committerInstrumental <jonathan.gathman@att.com>2018-05-10 17:17:47 -0500
commit839750cacc71c878282e9bb2963221322d88e0bd (patch)
tree761d1f7b49ff060d9a235a695306be662294589d /boot
parenta6e03f39ed4488db51a183ad1cc605ba41f28cfa (diff)
ensure Cass Phase2 on starts
Issue-ID: AAF-270 Change-Id: I158973ecef715871fd6dc6aee2ab29688f5af3c2 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'boot')
-rw-r--r--boot/aaf_vm_init.sh26
1 files changed, 15 insertions, 11 deletions
diff --git a/boot/aaf_vm_init.sh b/boot/aaf_vm_init.sh
index ea64c3e5..7c91ade7 100644
--- a/boot/aaf_vm_init.sh
+++ b/boot/aaf_vm_init.sh
@@ -13,20 +13,24 @@ docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
cd /opt/authz
git pull
+
if [ "`docker container ls | grep aaf_cass`" = "" ]; then
# Cassandra Install
cd /opt/authz/auth/auth-cass/docker
- # Phase 1
+ echo Phase 1 Cassandra Install
./dinstall.sh
- echo "Waiting for Cassandra to startup"
- sleep 15
- # Phase 2
- if [ "`docker container ls | grep aaf_cass`" = "" ]; then
- echo "Error on Cassandra install"
- exit
- else
- ./dinstall.sh
- fi
+ for I in 1 2 3 4 5 6 7 8 9; do
+ echo "Waiting for Cassandra to startup"
+ sleep 20
+
+ if [ "`docker container ls | grep aaf_cass`" = "" ]; then
+ echo "Still waiting ..."
+ else
+ echo "Phase 2 Cassandra Instail"
+ ./dinstall.sh
+ break
+ fi
+ done
fi
CASS_IP=`docker inspect aaf_cass | grep '"IPAddress' | head -1 | cut -d '"' -f 4`
@@ -60,4 +64,4 @@ sed -i "s/cadi_trust_masks=.*/cadi_trust_masks="$CADI_TRUST_MASKS"/g" /opt/app/o
cd /opt/authz/auth/docker
./dbuild.sh
sleep 5
-./drun.sh \ No newline at end of file
+./drun.sh