summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiamBurke <Liam.Burke@ericsson.com>2018-10-10 09:26:26 +0000
committerLiamBurke <liam.burke@ericsson.com>2018-10-10 09:42:20 +0000
commitf708f841adc18caef3738705011463e07dc5dd45 (patch)
tree546949667765421d10dd9efe5d88f0d285091dcb
parentce54a0434ded2f149266d9cdf082af4ae8665cec (diff)
Changes to mariadb start from DataRouter
Change-Id: Icdfb4692de48e0e81fd5e961a85422e8900a73fc Issue-ID: INT-649 Signed-off-by: LiamBurke <liam.burke@ericsson.com>
-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