diff options
author | efiacor <fiachra.corcoran@est.tech> | 2022-12-07 10:56:27 +0000 |
---|---|---|
committer | efiacor <fiachra.corcoran@est.tech> | 2022-12-07 15:59:59 +0000 |
commit | bda6aeaa60607ab4fe5af508156019d7bd5c0ce4 (patch) | |
tree | 24bae3847c1139ba9aed95ce286277202aae9a93 /csit/scripts/dmaap-datarouter/datarouter-launch.sh | |
parent | b37d32a39c7096e39fc389f15d150e8c2b8c54c2 (diff) |
[DMAAP-DR] Remove AAF/TLS phase 1
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: Ifeae01dd8e7f0a737d8b74594a8061ae3d4ea647
Issue-ID: DMAAP-1642
Diffstat (limited to 'csit/scripts/dmaap-datarouter/datarouter-launch.sh')
-rw-r--r-- | csit/scripts/dmaap-datarouter/datarouter-launch.sh | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/csit/scripts/dmaap-datarouter/datarouter-launch.sh b/csit/scripts/dmaap-datarouter/datarouter-launch.sh index 6d38913d..d4a422d2 100644 --- a/csit/scripts/dmaap-datarouter/datarouter-launch.sh +++ b/csit/scripts/dmaap-datarouter/datarouter-launch.sh @@ -1,7 +1,7 @@ #!/bin/bash # # ============LICENSE_START======================================================= -# Copyright (C) 2021 Nordix Foundation. +# Copyright (C) 2021-2022 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,13 +22,14 @@ function dmaap_dr_launch() { subscribers_required=$1 - mkdir -p ${WORKSPACE}/archives/dmaap/dr/last_run_logs + mkdir -p "${WORKSPACE}"/archives/dmaap/dr/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 if [[ ${subscribers_required} == true ]]; then - docker-compose -f ${WORKSPACE}/scripts/dmaap-datarouter/docker-compose/docker-compose.yml up -d + docker-compose -f "${WORKSPACE}"/scripts/dmaap-datarouter/docker-compose/docker-compose.yml up -d else + # shellcheck disable=SC2086 docker-compose -f ${WORKSPACE}/scripts/dmaap-datarouter/docker-compose/docker-compose.yml up -d datarouter-prov datarouter-node mariadb fi @@ -50,10 +51,12 @@ function dmaap_dr_launch() { 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 + # shellcheck disable=SC2046 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 + # shellcheck disable=SC2046 echo datarouter-prov.State.Health.Status is $(docker inspect --format '{{ .State.Health.Status }}' datarouter-prov) echo sleep ${i} sleep ${i} @@ -66,27 +69,32 @@ function dmaap_dr_launch() { fi done + # shellcheck disable=SC2006 DR_PROV_IP=`get-instance-ip.sh datarouter-prov` + # shellcheck disable=SC2006 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} + echo DR_PROV_IP="${DR_PROV_IP}" + echo DR_NODE_IP="${DR_NODE_IP}" + echo DR_GATEWAY_IP="${DR_GATEWAY_IP}" if [[ ${subscribers_required} == true ]] then + # shellcheck disable=SC2006 DR_SUB_IP=`get-instance-ip.sh subscriber-node` + # shellcheck disable=SC2006 DR_SUB2_IP=`get-instance-ip.sh subscriber-node2` - echo DR_SUB_IP=${DR_SUB_IP} - echo DR_SUB2_IP=${DR_SUB2_IP} + echo DR_SUB_IP="${DR_SUB_IP}" + echo DR_SUB2_IP="${DR_SUB2_IP}" fi sudo sed -i "$ a $DR_PROV_IP dmaap-dr-prov" /etc/hosts sudo sed -i "$ a $DR_NODE_IP dmaap-dr-node" /etc/hosts - 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" + docker exec -i datarouter-prov sh -c "curl -k -X PUT http://$DR_PROV_IP/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP" + docker exec -i datarouter-prov sh -c "curl -k -X PUT http://$DR_PROV_IP/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP" #Pass any variables required by Robot test suites in ROBOT_VARIABLES + # shellcheck disable=SC2034 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 |