summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDileep Ranganathan <dileep.ranganathan@intel.com>2018-10-24 05:26:24 -0700
committerDileep Ranganathan <dileep.ranganathan@intel.com>2018-10-24 05:26:24 -0700
commitbc842470fba30371c0b07afa679388cc6139b5c9 (patch)
tree1c50141dac36c30b7a41eb62ae7875749b88162e
parent7d12994714a3f3563abf00337e1af076315e193c (diff)
Fix MUSIC timing issues on OOF
More logging Longer Delay for TOMCAT More Delays Change-Id: Id110687723364586abc354d4fbb1f696589f5e05 Issue-ID: MUSIC-138 Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
-rwxr-xr-xscripts/optf-has/has/music_script.sh25
1 files changed, 19 insertions, 6 deletions
diff --git a/scripts/optf-has/has/music_script.sh b/scripts/optf-has/has/music_script.sh
index 2a4f178d..ba37d901 100755
--- a/scripts/optf-has/has/music_script.sh
+++ b/scripts/optf-has/has/music_script.sh
@@ -23,12 +23,12 @@ echo "### This is ${WORKSPACE}/scripts/optf-has/has/music_script.sh"
# add here all the configuration steps eventually needed to be carried out for music CSIT testing
#
echo "########## music configuration step ##########";
-CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_3_11:latest
-CASS_IMG_JOB=nexus3.onap.org:10001/onap/music/cassandra_job:latest
+CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_3_11:3.0.23
+CASS_IMG_JOB=nexus3.onap.org:10001/onap/music/cassandra_job:3.0.23
TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.5
ZK_IMG=nexus3.onap.org:10001/library/zookeeper:3.4
BUSYBOX_IMG=nexus3.onap.org:10001/library/busybox:latest
-MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:latest
+MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:3.0.23
TT=10
WORK_DIR=/tmp/music
CASS_USERNAME=nelson24
@@ -75,11 +75,11 @@ echo "########## Running Test to see if Cassandra is up ##########"
docker run --name music-casstest --network music-net \
$BUSYBOX_IMG sh -c "until nc -z music-db 9042 && echo "success"; do echo 'No connection .. Sleeping for $TT seconds';sleep $TT; done;"
+# Sleep 60 seconds to ensure Cassandra is up and running.
+sleep 60;
# Check to see if Keyspaces are there.
docker exec music-db cqlsh -u cassandra -p cassandra -e "DESCRIBE keyspaces;"
-sleep 10;
-
# Load data into Cassandra via Cassandra Job
echo "########## Running Cassandra Job (music-job) to load cql files ##########"
docker run -d --name music-job --network music-net \
@@ -91,9 +91,22 @@ docker run -d --name music-job --network music-net \
-e USERNAME=$CASS_USERNAME \
-e PASSWORD=$CASS_PASSWORD \
$CASS_IMG_JOB
+
+sleep 70;
+
# Logs
echo "########## Cassandra Job logs ##########"
docker logs music-job
+# Check to see if Keyspaces are there.
+# "############## Check if new username and password work ##########"
+docker exec music-db cqlsh -u $CASS_USERNAME -p $CASS_PASSWORD -e "DESCRIBE keyspaces;"
+# Check to see if Keyspaces are there.
+# "############## Check if original username and password work ##########"
+docker exec music-db cqlsh -u cassandra -p cassandra -e "DESCRIBE keyspaces;"
+# Check to see if Keyspaces are there.
+# "############## Check if new cassandra username and password work ##########"
+docker exec music-db cqlsh -u cassandra -p SomeLongRandomStringNoonewillthinkof -e "DESCRIBE keyspaces;"
+
# Start Music war
echo "########## Start music-war ##########"
@@ -107,7 +120,7 @@ ZOO_IP=`docker inspect -f '{{ $network := index .NetworkSettings.Networks "music
echo "ZOOKEEPER_IP=${ZOO_IP}"
# Delay between Cassandra/Zookeeper and Tomcat
-sleep 10;
+sleep 120;
# Start Up tomcat - Needs to have properties,logs dir and war file volume mapped.
echo "########## Start Tomcat (music-tomcat) ##########"