blob: 0a653fa12e5bb5a3ed669ad03c4137e707e3dd41 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001#!/bin/bash
2
3# script to launch DMaaP buscontroller docker container
4# sets global var IP with assigned IP address
5
6function dmaapbc_launch() {
7 TAG="nexus3.onap.org:10001/onap/dmaap/buscontroller"
8 CONTAINER_NAME=dmaapbc
9 IP=""
10
Gary Wu13111e92018-09-27 11:31:33 -070011 cd ${WORKSPACE}/scripts/dmaap-buscontroller
Gary Wu9abb61c2018-09-27 10:38:50 -070012
13 TMP_CFG=/tmp/docker-databus-controller.conf
14 . ./onapCSIT.env > $TMP_CFG
15 ADDHOSTS=""
16 if [ ! -z "$2" ]
17 then
18 ADDHOSTS="$ADDHOSTS --add-host=message-router:$2"
19 fi
20 if [ ! -z "$3" ]
21 then
22 ADDHOSTS="$ADDHOSTS --add-host=dmaap-dr-prov:$3"
23 fi
24 docker run -d $ADDHOSTS --name $CONTAINER_NAME -v $TMP_CFG:/opt/app/config/conf $TAG
25 IP=`get-instance-ip.sh ${CONTAINER_NAME}`
26
pkaras4cb0ffb2019-04-02 08:45:29 +020027 source ${SCRIPTS}/common_functions.sh
28 bypass_ip_adress ${IP}
29
Gary Wu9abb61c2018-09-27 10:38:50 -070030 # Wait for initialization
31 for i in {1..10}; do
32 curl -sS ${IP}:8080 && break
33 echo sleep $i
34 sleep $i
35 done
36
37}