From 2fe00d05bfd7b35413d8f744ca523906b2488827 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Fri, 11 May 2018 06:30:40 -0500 Subject: Add repair to try to kickstart Cassandra Issue-ID: AAF-270 Change-Id: I45dd1c7e9aad11cb27cb8bc0cd03e116c118e89b Signed-off-by: Instrumental --- auth/auth-cass/docker/dinstall.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'auth/auth-cass') diff --git a/auth/auth-cass/docker/dinstall.sh b/auth/auth-cass/docker/dinstall.sh index c3e07d59..2ccb519e 100644 --- a/auth/auth-cass/docker/dinstall.sh +++ b/auth/auth-cass/docker/dinstall.sh @@ -1,13 +1,7 @@ #!/bin/bash -if [ "`docker ps -a | grep aaf_cass`" == "" ]; then - docker run --name aaf_cass -d cassandra:3.11 - echo "Check for running Docker Container aaf_cass, then run again." - exit -else - docker exec aaf_cass mkdir -p /opt/app/cass_init - docker cp "../src/main/cql/." aaf_cass:/opt/app/cass_init -fi +docker exec aaf_cass mkdir -p /opt/app/cass_init +docker cp "../src/main/cql/." aaf_cass:/opt/app/cass_init echo "Docker Installed Basic Cassandra on aaf_cass. Executing the following " echo "NOTE: This creator provided is only a Single Instance. For more complex Cassandra, create independently" @@ -19,8 +13,12 @@ echo " cqlsh -u root -p root -f osaaf.cql" echo "" echo "The following will give you a temporary identity with which to start working, or emergency" echo " cqlsh -u root -p root -f temp_identity.cql" -echo "Sleeping for 10 seconds" -sleep 10 +echo "Sleeping for 20 seconds" +sleep 20 +echo "Do a repair, to ensure Cassandra is actually running yet" +docker exec -it aaf_cass bash -c 'nodetool repair' + +echo "Create Keyspaces and Tables"" docker exec -it aaf_cass bash -c '\ cd /opt/app/cass_init; \ echo "Creating Keyspace";cqlsh -u root -p root -f keyspace.cql;\ -- cgit 1.2.3-korg