Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # script to launch DMaaP buscontroller docker container |
| 4 | # sets global var IP with assigned IP address |
| 5 | |
| 6 | function dmaapbc_launch() { |
| 7 | TAG="nexus3.onap.org:10001/onap/dmaap/buscontroller" |
| 8 | CONTAINER_NAME=dmaapbc |
| 9 | IP="" |
| 10 | |
Gary Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 11 | cd ${WORKSPACE}/scripts/dmaap-buscontroller |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 12 | |
| 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 | |
pkaras | 4cb0ffb | 2019-04-02 08:45:29 +0200 | [diff] [blame^] | 27 | source ${SCRIPTS}/common_functions.sh |
| 28 | bypass_ip_adress ${IP} |
| 29 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 30 | # 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 | } |