aboutsummaryrefslogtreecommitdiffstats
path: root/csit/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'csit/scripts')
-rw-r--r--csit/scripts/dmaap-buscontroller/docker-compose/docker-compose-bc.yml6
-rw-r--r--csit/scripts/dmaap-datarouter/datarouter-launch.sh92
-rwxr-xr-xcsit/scripts/dmaap-message-router/dmaap-mr-launch.sh3
3 files changed, 50 insertions, 51 deletions
diff --git a/csit/scripts/dmaap-buscontroller/docker-compose/docker-compose-bc.yml b/csit/scripts/dmaap-buscontroller/docker-compose/docker-compose-bc.yml
index 458d06f..79cbde5 100644
--- a/csit/scripts/dmaap-buscontroller/docker-compose/docker-compose-bc.yml
+++ b/csit/scripts/dmaap-buscontroller/docker-compose/docker-compose-bc.yml
@@ -17,7 +17,7 @@ services:
- PG_ROOT_PASSWORD=secret
- PG_PRIMARY_PORT=5432
networks:
- docker-compose_net:
+ dockercompose_net:
aliases:
- dbc-pg
@@ -34,7 +34,7 @@ services:
- ./cadi_aaf:/opt/app/osaaf/local
- ./logback.xml:/opt/app/dmaapbc/etc/logback.xml
networks:
- docker-compose_net:
+ dockercompose_net:
aliases:
- dmaap-bc
extra_hosts:
@@ -42,5 +42,5 @@ services:
- message-router:$dmaap_prov_ip
networks:
- docker-compose_net:
+ dockercompose_net:
external: true
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
diff --git a/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh b/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh
index ae91f5b..86f7f9f 100755
--- a/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh
+++ b/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh
@@ -31,6 +31,9 @@
function dmaap_mr_launch() {
+ COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-dockercompose}
+ export COMPOSE_PROJECT_NAME=$COMPOSE_PREFIX
+
mkdir -p ${WORKSPACE}/archives/dmaap/last_run_logs
# start DMaaP MR containers with docker compose and configuration from docker-compose.yml