diff options
author | Leonardo Bellini <leonardo.bellini@att.com> | 2018-04-03 09:48:43 -0500 |
---|---|---|
committer | Leonardo Bellini <leonardo.bellini@att.com> | 2018-04-03 09:49:03 -0500 |
commit | 6515d690ba20e2859b5bcb109a858f85dcb36a40 (patch) | |
tree | 314ac2efcdceafbaf709005407e8ab2594092b21 /test/csit/plans/music/music-test-plan/setup.sh | |
parent | 67bebbdb3e9819b6170d77b8c801411aa4da9d74 (diff) |
Increase timeout between cassandra and tomcat
Issue-ID: MUSIC-67
Change-Id: I737f082abdc2581ea852b30824b2dd6e435c8566
Signed-off-by: Leonardo Bellini <leonardo.bellini@att.com>
Diffstat (limited to 'test/csit/plans/music/music-test-plan/setup.sh')
-rwxr-xr-x | test/csit/plans/music/music-test-plan/setup.sh | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/test/csit/plans/music/music-test-plan/setup.sh b/test/csit/plans/music/music-test-plan/setup.sh index 63d2ef93f..ddfdfc023 100755 --- a/test/csit/plans/music/music-test-plan/setup.sh +++ b/test/csit/plans/music/music-test-plan/setup.sh @@ -50,14 +50,21 @@ docker network create music-net; # Start Cassandra docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001" -p "7199:7199" -p "9042:9042" -p "9160:9160" -e CASSUSER=${CASS_USERNAME} -e CASSPASS=${CASS_PASSWORD} ${CASS_IMG}; +CASSA_IP=`docker inspect -f '{{ $network := index .NetworkSettings.Networks "music-net" }}{{ $network.IPAddress}}' music-db` +echo "CASSANDRA_IP=${CASSA_IP}" +${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${CASSA_IP} 9042 + # Start Music war docker run -d --name music-war -v music-vol:/app ${MUSIC_IMG}; # Start Zookeeper docker run -d --name music-zk --network music-net -p "2181:2181" -p "2888:2888" -p "3888:3888" ${ZK_IMG}; -# Delay for Cassandra -sleep 20; +ZOO_IP=`docker inspect -f '{{ $network := index .NetworkSettings.Networks "music-net" }}{{ $network.IPAddress}}' music-zk` +echo "ZOOKEEPER_IP=${ZOO_IP}" + +# Delay between Cassandra/Zookeeper and Tomcat +sleep 60; # Start Up tomcat - Needs to have properties,logs dir and war file volume mapped. docker run -d --name music-tomcat --network music-net -p "8080:8080" -v music-vol:/usr/local/tomcat/webapps -v ${WORK_DIR}/properties:/opt/app/music/etc:ro -v ${WORK_DIR}/logs:/opt/app/music/logs ${TOMCAT_IMG}; @@ -65,20 +72,6 @@ docker run -d --name music-tomcat --network music-net -p "8080:8080" -v music-vo # Connect tomcat to host bridge network so that its port can be seen. docker network connect bridge music-tomcat; -################################## - -# -# add here below the start of all docker containers needed for music CSIT testing -# - -CASSA_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-db` -echo "CASSANDRA_IP=${CASSA_IP}" - -ZOO_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-zk` -echo "ZOOKEEPER_IP=${ZOO_IP}" - -${WORKSPACE}/test/csit/scripts/music/music-scripts/wait_for_port.sh ${CASSA_IP} 9042 - TOMCAT_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` echo "TOMCAT_IP=${TOMCAT_IP}" @@ -93,7 +86,10 @@ docker inspect music-war docker volume inspect music-vol docker network inspect music-net - +echo "dump music content just after music is started" +docker exec music-db /usr/bin/nodetool status +docker exec music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM system_schema.keyspaces' +docker exec music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM admin.keyspace_master' # |