diff options
-rw-r--r-- | plans/usecases/5G-bulkpm/setup.sh | 8 | ||||
-rw-r--r-- | plans/usecases/5G-bulkpm/teardown.sh | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh index f90e4569..8dfcfe40 100644 --- a/plans/usecases/5G-bulkpm/setup.sh +++ b/plans/usecases/5G-bulkpm/setup.sh @@ -18,7 +18,7 @@ KAFKA=$(docker ps -a -q --filter="name=kafka_1") DMAAP=$(docker ps -a -q --filter="name=dmaap_1") # Wait for initialization of Docker contaienr for DMaaP MR, Kafka and Zookeeper -for i in {1..50}; do +for i in {1..10}; do if [ $(docker inspect --format '{{ .State.Running }}' $KAFKA) ] && \ [ $(docker inspect --format '{{ .State.Running }}' $ZOOKEEPER) ] && \ [ $(docker inspect --format '{{ .State.Running }}' $DMAAP) ] @@ -65,11 +65,11 @@ docker kill vescollector HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') sed -i -e '/DMAAPHOST:/ s/:.*/: '$HOST_IP'/' docker-compose.yml MARIADB=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb ) -sed -i 's/172.100.0.2/'$MARIADB'/g' $WORKSPACE/archives/dmaapdr/datarouter/docker-compose/prov_data/provserver.properties +sed -i 's/datarouter-mariadb/'$MARIADB'/g' $WORKSPACE/archives/dmaapdr/datarouter/docker-compose/prov_data/provserver.properties docker-compose up -d # Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb -for i in {1..50}; do +for i in {1..10}; do if [ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ] && \ [ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ] && \ [ $(docker inspect --format '{{ .State.Running }}' mariadb) ] @@ -140,4 +140,4 @@ cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/addSubscriber.json /tmp/addSubscri sed -i 's/fileconsumer/'${DR_SUBSCIBER_IP}'/g' /tmp/addSubscriber.json curl -v -X POST -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1 sleep 10 -curl -k https://$DR_PROV_IP:8443/internal/prov
\ No newline at end of file +curl -k https://$DR_PROV_IP:8443/internal/prov diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh index 954c5dc0..0c86623b 100644 --- a/plans/usecases/5G-bulkpm/teardown.sh +++ b/plans/usecases/5G-bulkpm/teardown.sh @@ -1,6 +1,7 @@ #!/bin/bash echo "Starting teardown script" docker exec dfc /bin/sh -c "cat /opt/log/application.log" +sleep 5 kill-instance.sh $DMAAP kill-instance.sh $KAFKA kill-instance.sh $ZOOKEEPER @@ -10,4 +11,4 @@ kill-instance.sh datarouter-prov kill-instance.sh fileconsumer-node kill-instance.sh mariadb kill-instance.sh dfc -kill-instance.sh sftp
\ No newline at end of file +kill-instance.sh sftp |