aboutsummaryrefslogtreecommitdiffstats
path: root/csit/scripts/dmaap-datarouter
diff options
context:
space:
mode:
authordavid.mcweeney <david.mcweeney@est.tech>2021-04-22 10:08:59 +0100
committerFiachra Corcoran <fiachra.corcoran@est.tech>2021-04-23 10:05:44 +0000
commitabd692f080ec83cb18b61a55fd276caea393a7f9 (patch)
treec97fcb168867e311aa404d82ba5680bb1871ad16 /csit/scripts/dmaap-datarouter
parent71d3d0925874247de5e657821638b1c08360f571 (diff)
DMAAP-1544 - Amend versions of buscontroller merge
Signed-off-by: david.mcweeney <david.mcweeney@est.tech> Issue-ID: DMAAP-1544 Change-Id: I24474eff39f30a78bf95faf4a29565992a91a529
Diffstat (limited to 'csit/scripts/dmaap-datarouter')
-rw-r--r--csit/scripts/dmaap-datarouter/datarouter-launch.sh92
1 files changed, 44 insertions, 48 deletions
diff --git a/csit/scripts/dmaap-datarouter/datarouter-launch.sh b/csit/scripts/dmaap-datarouter/datarouter-launch.sh
index 94a4595..37d1829 100644
--- a/csit/scripts/dmaap-datarouter/datarouter-launch.sh
+++ b/csit/scripts/dmaap-datarouter/datarouter-launch.sh
@@ -20,57 +20,53 @@
#
function dmaap_dr_launch() {
+ COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-dockercompose}
+ export COMPOSE_PROJECT_NAME=$COMPOSE_PREFIX
- mkdir -p ${WORKSPACE}/archives/dmaap/last_run_logs
+ mkdir -p ${WORKSPACE}/archives/dmaap/last_run_logs
- # start DMaaP DR containers with docker compose and configuration from docker-compose.yml
- docker login -u docker -p docker nexus3.onap.org:10001
- docker-compose -f ${WORKSPACE}/scripts/dmaap-datarouter/docker-compose/docker-compose.yml up -d
+ # start DMaaP DR containers with docker compose and configuration from docker-compose.yml
+ docker login -u docker -p docker nexus3.onap.org:10001
+ docker-compose -f ${WORKSPACE}/scripts/dmaap-datarouter/docker-compose/docker-compose.yml up -d
- # Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb
- for i in 1 2 3 4 5 6 7 8 9 10; do
- if [[ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ]] && \
- [[ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ]] && \
- [[ $(docker inspect --format '{{ .State.Running }}' mariadb) ]]
- then
- echo "DR Service Running"
- break
- else
- echo sleep ${i}
- sleep ${i}
- fi
- done
+ # Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb
+ for i in 1 2 3 4 5 6 7 8 9 10; do
+ if [[ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ]] && \
+ [[ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ]] && \
+ [[ $(docker inspect --format '{{ .State.Running }}' mariadb) ]]
+ then
+ echo "DR Service Running"
+ break
+ else
+ echo sleep ${i}
+ sleep ${i}
+ fi
+ done
- # Wait for healthy container datarouter-prov
- for i in 1 2 3 4 5 6 7 8 9 10; do
- if [[ "$(docker inspect --format '{{ .State.Health.Status }}' datarouter-prov)" = 'healthy' ]]
- then
- echo datarouter-prov.State.Health.Status is $(docker inspect --format '{{ .State.Health.Status }}' datarouter-prov)
- echo "DR Service Running, datarouter-prov container is healthy"
- break
- else
- echo datarouter-prov.State.Health.Status is $(docker inspect --format '{{ .State.Health.Status }}' datarouter-prov)
- echo sleep ${i}
- sleep ${i}
- if [[ ${i} = 10 ]]
- then
- echo datarouter-prov container is not in healthy state - the test is not made, teardown...
- docker-compose rm -sf
- exit 1
- fi
- fi
- done
+ # Wait for healthy container datarouter-prov
+ for i in 1 2 3 4 5 6 7 8 9 10; do
+ if [[ "$(docker inspect --format '{{ .State.Health.Status }}' datarouter-prov)" = 'healthy' ]]
+ then
+ echo datarouter-prov.State.Health.Status is $(docker inspect --format '{{ .State.Health.Status }}' datarouter-prov)
+ echo "DR Service Running, datarouter-prov container is healthy"
+ break
+ else
+ echo datarouter-prov.State.Health.Status is $(docker inspect --format '{{ .State.Health.Status }}' datarouter-prov)
+ echo sleep ${i}
+ sleep ${i}
+ if [[ ${i} = 10 ]]
+ then
+ echo datarouter-prov container is not in healthy state - the test is not made, teardown...
+ docker-compose rm -sf
+ exit 1
+ fi
+ fi
+ done
- DR_PROV_IP=`get-instance-ip.sh datarouter-prov`
- DR_NODE_IP=`get-instance-ip.sh datarouter-node`
- #DR_GATEWAY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' datarouter-prov)
- echo DR_PROV_IP=${DR_PROV_IP}
- echo DR_NODE_IP=${DR_NODE_IP}
- #echo DR_GATEWAY_IP=${DR_GATEWAY_IP}
-
-# docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP"
-# 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"
-
- #Pass any variables required by Robot test suites in ROBOT_VARIABLES
- ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DR_SUB_IP:${DR_SUB_IP} -v DR_SUB2_IP:${DR_SUB2_IP}"
+ DR_PROV_IP=`get-instance-ip.sh datarouter-prov`
+ DR_NODE_IP=`get-instance-ip.sh datarouter-node`
+ echo DR_PROV_IP=${DR_PROV_IP}
+ echo DR_NODE_IP=${DR_NODE_IP}
+ #Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DR_SUB_IP:${DR_SUB_IP} -v DR_SUB2_IP:${DR_SUB2_IP}"
} \ No newline at end of file