aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-10-10 09:56:15 +0000
committerGerrit Code Review <gerrit@onap.org>2018-10-10 09:56:15 +0000
commit8bd9d8268d47bd445ae27cf91aac4075b661ba8d (patch)
tree6ad6585d50253927841f40a666e1b2cd61a11cc8
parentc5f1ee852ad1ec2f0e968efd4191c3c026b4fcc5 (diff)
parentf708f841adc18caef3738705011463e07dc5dd45 (diff)
Merge "Changes to mariadb start from DataRouter"
-rw-r--r--plans/usecases/5G-bulkpm/setup.sh8
-rw-r--r--plans/usecases/5G-bulkpm/teardown.sh3
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