aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDominic Lunanuova <dgl@research.att.com>2018-10-03 01:28:25 +0000
committerDominic Lunanuova <dgl@research.att.com>2018-10-03 01:29:25 +0000
commit32c0ee8541f38f003ad223037cfc15339e8955db (patch)
treef82417ca865dd397ce1608a703fb46fc08e6d09c /scripts
parented9df29ed6ea2ac0310cfb37318cdd5d126b85dd (diff)
Reset MR IP after docker-compose restart
Change-Id: Ibbca8bdc23928a36694da0dcbc59169df5cd3c5f Signed-off-by: Dominic Lunanuova <dgl@research.att.com> Issue-ID: DMAAP-827
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dmaap-message-router/dmaap-mr-launch.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/dmaap-message-router/dmaap-mr-launch.sh b/scripts/dmaap-message-router/dmaap-mr-launch.sh
index a4bd623a..e7ea9a97 100755
--- a/scripts/dmaap-message-router/dmaap-mr-launch.sh
+++ b/scripts/dmaap-message-router/dmaap-mr-launch.sh
@@ -84,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
@@ -104,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