3 source ${SCRIPTS}/common_functions.sh
5 # Clone DMaaP Data Router repo
6 mkdir -p $WORKSPACE/archives/dmaapdr
7 cd $WORKSPACE/archives/dmaapdr
9 git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master
12 cd $WORKSPACE/archives/dmaapdr/datarouter/docker-compose/
14 sed -i 's/10003/10001/g' docker-compose.yml
15 # start DMaaP DR containers with docker compose and configuration from docker-compose.yml
16 docker login -u docker -p docker nexus3.onap.org:10001
19 # Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb
21 if [ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ] && \
22 [ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ] && \
23 [ $(docker inspect --format '{{ .State.Running }}' mariadb) ]
25 echo "DR Service Running"
33 DR_PROV_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-prov)
34 DR_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-node)
35 DR_GATEWAY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' datarouter-prov)
37 echo DR_PROV_IP=${DR_PROV_IP}
38 echo DR_NODE_IP=${DR_NODE_IP}
39 echo DR_GATEWAY_IP=${DR_GATEWAY_IP}
41 docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP"
43 #Pass any variables required by Robot test suites in ROBOT_VARIABLES
44 ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP}"