diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/dmaap-message-router/dmaap-mr-launch.sh | 18 | ||||
-rwxr-xr-x | scripts/dmaap-message-router/dmaap-mr-teardown.sh | 13 | ||||
-rwxr-xr-x | scripts/policy/script1.sh | 2 |
3 files changed, 26 insertions, 7 deletions
diff --git a/scripts/dmaap-message-router/dmaap-mr-launch.sh b/scripts/dmaap-message-router/dmaap-mr-launch.sh index 36d31689..e7ea9a97 100755 --- a/scripts/dmaap-message-router/dmaap-mr-launch.sh +++ b/scripts/dmaap-message-router/dmaap-mr-launch.sh @@ -34,7 +34,8 @@ function dmaap_mr_launch() { # # the default prefix for docker containers is the directory name containing the docker-compose.yml file. # It can be over-written by an env variable COMPOSE_PROJECT_NAME. This env var seems to be set in the Jenkins CSIT environment - COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-docker-compose} + COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-dockercompose} + export COMPOSE_PROJECT_NAME=$COMPOSE_PREFIX echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME" echo "COMPOSE_PREFIX=$COMPOSE_PREFIX" @@ -83,12 +84,13 @@ function dmaap_mr_launch() { docker-compose down # Update kafkfa and zookeeper properties in MsgRtrApi.propeties which will be copied to DMaaP Container - sed -i -e 's/<zookeeper_host>/'$ZOOKEEPER_IP'/' /var/tmp/MsgRtrApi.properties - sed -i -e 's/<kafka_host>:<kafka_port>/'$KAFKA_IP':9092/' /var/tmp/MsgRtrApi.properties + sed -i -e 's/<zookeeper_host>/zookeeper/' /var/tmp/MsgRtrApi.properties + sed -i -e 's/<kafka_host>:<kafka_port>/kafka:9092/' /var/tmp/MsgRtrApi.properties docker-compose build docker login -u docker -p docker nexus3.onap.org:10001 docker-compose up -d + docker ps # Wait for initialization of Docker containers for i in {1..50}; do @@ -103,6 +105,16 @@ function dmaap_mr_launch() { sleep $i fi done + DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_dmaap_1) + IP=${DMAAP_MR_IP} + KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_kafka_1) + ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_zookeeper_1) + + echo "After restart of ZK and Kafka..." + echo DMAAP_MR_IP=${DMAAP_MR_IP} + echo IP=${IP} + echo KAFKA_IP=${KAFKA_IP} + echo ZOOKEEPER_IP=${ZOOKEEPER_IP} # Wait for initialization of docker services for i in {1..50}; do diff --git a/scripts/dmaap-message-router/dmaap-mr-teardown.sh b/scripts/dmaap-message-router/dmaap-mr-teardown.sh index ac6d798c..a8187d3a 100755 --- a/scripts/dmaap-message-router/dmaap-mr-teardown.sh +++ b/scripts/dmaap-message-router/dmaap-mr-teardown.sh @@ -18,7 +18,14 @@ # function dmaap_mr_teardown() { -kill-instance.sh docker-compose_dmaap_1 -kill-instance.sh docker-compose_kafka_1 -kill-instance.sh docker-compose_zookeeper_1 +# +# the default prefix for docker containers is the directory name containing the docker-compose.yml file. +# It can be over-written by an env variable COMPOSE_PROJECT_NAME. This env var seems to be set in the Jenkins CSIT environment +COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-dockercompose} +COMPOSE_PROJECT_NAME=$COMPOSE_PREFIX +echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME" +echo "COMPOSE_PREFIX=$COMPOSE_PREFIX" +kill-instance.sh ${COMPOSE_PREFIX}_dmaap_1 +kill-instance.sh ${COMPOSE_PREFIX}_kafka_1 +kill-instance.sh ${COMPOSE_PREFIX}_zookeeper_1 } diff --git a/scripts/policy/script1.sh b/scripts/policy/script1.sh index b38401e3..70706921 100755 --- a/scripts/policy/script1.sh +++ b/scripts/policy/script1.sh @@ -147,7 +147,7 @@ TIME_OUT=600 INTERVAL=20 TIME=0 while [ "$TIME" -lt "$TIME_OUT" ]; do - curl -k -i --user healthcheck:zb!XztG34 -H "ContentType: application/json" -H "Accept: application/json" https://${POLICY_IP}:6969/healthcheck && break + curl -k -i --user "demo@people.osaaf.org:demo123456!" -H "ContentType: application/json" -H "Accept: application/json" https://${POLICY_IP}:6969/healthcheck && break echo Sleep: $INTERVAL seconds before testing if Policy is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds sleep $INTERVAL |