3 # ============LICENSE_START=======================================================
5 # ================================================================================
6 # Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
7 # Modification copyright (C) 2021 Nordix Foundation.
8 # ================================================================================
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
13 # http://www.apache.org/licenses/LICENSE-2.0
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 # ============LICENSE_END============================================
21 # ===================================================================
22 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
24 # function to launch DMaaP MR docker containers.
25 # sets global var DMAAP_MR_IP with assigned IP address of MR container.
26 # (kafka and zk containers are not called externally)
28 function dmaap_mr_launch() {
29 mkdir -p $WORKSPACE/archives/dmaap/mr/last_run_logs
31 # start DMaaP MR containers with docker compose and configuration from docker-compose.yml
32 docker login -u docker -p docker nexus3.onap.org:10001
33 docker-compose -f ${WORKSPACE}/scripts/dmaap-message-router/docker-compose/docker-compose.yml up -d
36 # Wait for initialization of Docker containers for DMaaP MR, Kafka and Zookeeper
38 if [[ $(docker inspect --format '{{ .State.Running }}' dmaap-mr) ]] && \
39 [[ $(docker inspect --format '{{ .State.Running }}' dmaap-kafka) ]] && \
40 [[ $(docker inspect --format '{{ .State.Running }}' dmaap-zookeeper) ]]
42 echo "DMaaP Service Running"
50 DMAAP_MR_IP=`get-instance-ip.sh dmaap-mr`
51 echo MR_IP=${DMAAP_MR_IP}
54 echo "Waiting for dmaap-message-router to come up ..."
56 dmaap_state=$(curl --write-out '%{http_code}' --silent --output /dev/null $DMAAP_MR_IP:3904/topics)
57 if [ ${dmaap_state} == "200" ]