summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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