summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass/docker/dinstall.sh
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-05-11 06:30:40 -0500
committerInstrumental <jonathan.gathman@att.com>2018-05-11 06:30:59 -0500
commit2fe00d05bfd7b35413d8f744ca523906b2488827 (patch)
tree649eac94c648f3f1e4564a3c52f0867c86c408ef /auth/auth-cass/docker/dinstall.sh
parent4e11a5059e1e05c15332e93aeb8b107c3d2c5e34 (diff)
Add repair to try to kickstart Cassandra
Issue-ID: AAF-270 Change-Id: I45dd1c7e9aad11cb27cb8bc0cd03e116c118e89b Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-cass/docker/dinstall.sh')
-rw-r--r--auth/auth-cass/docker/dinstall.sh18
1 files changed, 8 insertions, 10 deletions
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;\