diff options
Diffstat (limited to 'test/csit/scripts/optf-has')
6 files changed, 41 insertions, 21 deletions
diff --git a/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap index d3e391cde..0f9e7494d 100644 --- a/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap +++ b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap @@ -247,9 +247,15 @@ timeout = 3600 # # From conductor # +music_new_version = True # Base URL for Music REST API without a trailing slash. (string value) server_url = http://localhost:8080/MUSIC/rest/v2 +version = v2 +music_version = "2.4.22" +aafuser = conductor +aafpass = c0nduct0r +aafns = conductor # DEPRECATED: List of hostnames (round-robin access) (list value) # This option is deprecated for removal. diff --git a/test/csit/scripts/optf-has/has/has_script.sh b/test/csit/scripts/optf-has/has/has_script.sh index 242f5f63e..ed0f48838 100755 --- a/test/csit/scripts/optf-has/has/has_script.sh +++ b/test/csit/scripts/optf-has/has/has_script.sh @@ -53,21 +53,26 @@ sed -i -e "s%localhost:8080/MUSIC%${MUSIC_IP}:8080/MUSIC%g" /tmp/conductor/prop AAISIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' aaisim` echo "AAISIM_IP=${AAISIM_IP}" -# change MUSIC reference to the local instance +# change AAI reference to the local instance sed -i -e "s%localhost:8081/%${AAISIM_IP}:8081/%g" /tmp/conductor/properties/conductor.conf +#onboard conductor into music +curl -vvvvv --noproxy "*" --request POST http://${MUSIC_IP}:8080/MUSIC/rest/v2/admin/onboardAppWithMusic -H "Content-Type: application/json" --data @${WORKSPACE}/test/csit/tests/optf-has/has/data/onboard.json + docker run -d --name cond-cont -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-controller --config-file=/usr/local/bin/conductor.conf +sleep 2 docker run -d --name cond-api -p "8091:8091" -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf +sleep 2 docker run -d --name cond-solv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-solver --config-file=/usr/local/bin/conductor.conf +sleep 2 docker run -d --name cond-resv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-reservation --config-file=/usr/local/bin/conductor.conf +sleep 2 docker run -d --name cond-data -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${CERT}:/usr/local/bin/cert.cer -v ${KEY}:/usr/local/bin/cert.key -v ${BUNDLE}:/usr/local/bin/cert.pem ${IMAGE_NAME}:latest python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf +sleep 2 COND_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' cond-api` ${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${COND_IP} 8091 -# wait a while before continuing -sleep 5 - echo "inspect docker things for tracing purpose" docker inspect cond-data docker inspect cond-cont @@ -75,6 +80,7 @@ docker inspect cond-api docker inspect cond-solv docker inspect cond-resv -docker exec -it music-db /usr/bin/nodetool status -docker exec -it music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM system_schema.keyspaces' -docker exec -it music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM admin.keyspace_master' +echo "dump music content just after conductor 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' diff --git a/test/csit/scripts/optf-has/has/has_teardown_script.sh b/test/csit/scripts/optf-has/has/has_teardown_script.sh index 40a536a87..bef28b435 100755 --- a/test/csit/scripts/optf-has/has/has_teardown_script.sh +++ b/test/csit/scripts/optf-has/has/has_teardown_script.sh @@ -14,6 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # +echo "print meaningful data before scratching everything" +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' +docker exec music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM conductor.plans' + echo "optf/has scripts docker containers killing"; docker stop cond-api docker stop cond-solv diff --git a/test/csit/scripts/optf-has/has/music_script.sh b/test/csit/scripts/optf-has/has/music_script.sh index be4eb8c63..fdd9a3e26 100755 --- a/test/csit/scripts/optf-has/has/music_script.sh +++ b/test/csit/scripts/optf-has/has/music_script.sh @@ -47,15 +47,22 @@ 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 --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-db` +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}; +#ZOO_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-zk` +ZOO_IP=`docker inspect -f '{{ $network := index .NetworkSettings.Networks "music-net" }}{{ $network.IPAddress}}' music-zk` +echo "ZOOKEEPER_IP=${ZOO_IP}" -# Delay for Cassandra -sleep 20; +# 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}; @@ -67,19 +74,13 @@ 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/optf-has/has/wait_for_port.sh ${CASSA_IP} 9042 - TOMCAT_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` echo "TOMCAT_IP=${TOMCAT_IP}" ${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${TOMCAT_IP} 8080 +# wait a while to make sure music is totally up and configured +sleep 10 echo "inspect docker things for tracing purpose" docker inspect music-db @@ -89,8 +90,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' diff --git a/test/csit/scripts/optf-has/has/music_teardown_script.sh b/test/csit/scripts/optf-has/has/music_teardown_script.sh index fa91f6e97..605ebd4e8 100755 --- a/test/csit/scripts/optf-has/has/music_teardown_script.sh +++ b/test/csit/scripts/optf-has/has/music_teardown_script.sh @@ -34,6 +34,6 @@ echo "dump music.log files" ls -alF /tmp/music ls -alF /tmp/music/properties cat /tmp/music/properties/music.properties -cat /tmp/music/logs/MUSIC/music.log +#cat /tmp/music/logs/MUSIC/music.log cat /tmp/music/logs/MUSIC/error.log diff --git a/test/csit/scripts/optf-has/has/simulator_script.sh b/test/csit/scripts/optf-has/has/simulator_script.sh index 524728270..e5bc43dbe 100755 --- a/test/csit/scripts/optf-has/has/simulator_script.sh +++ b/test/csit/scripts/optf-has/has/simulator_script.sh @@ -59,7 +59,7 @@ echo "AAISIM_IP=${AAISIM_IP}" ${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${AAISIM_IP} 8081 # wait a while before continuing -sleep 5 +sleep 2 echo "inspect docker things for tracing purpose" docker inspect aaisim |