From 51f04f0977f9be139489f05dcfc45b10c461cf9c Mon Sep 17 00:00:00 2001 From: BjornMagnussonXA Date: Tue, 23 Nov 2021 09:22:35 +0100 Subject: [PATCH] Adaptations to docker-compose V2 Test env now supports both docker-compose V1 and V2 Issue-ID: NONRTRIC-618 Signed-off-by: BjornMagnussonXA Change-Id: I6a5717b6dce64086123cc5575ef45f9e299cd7e3 --- test/common/cr_api_functions.sh | 24 +++++-- test/common/genstat.sh | 2 - test/common/pa_api_functions.sh | 6 +- test/common/ricsim_api_functions.sh | 66 +++++++++++------- test/common/testcase_common.sh | 41 ++++++++--- test/simulator-group/consul_cbs/docker-compose.yml | 5 +- .../control_panel/docker-compose.yml | 4 +- test/simulator-group/cr/docker-compose.yml | 4 +- test/simulator-group/dmaapadp/docker-compose.yml | 4 +- test/simulator-group/dmaapmed/docker-compose.yml | 4 +- test/simulator-group/dmaapmr/docker-compose.yml | 5 +- test/simulator-group/ecs/docker-compose.yml | 4 +- test/simulator-group/httpproxy/docker-compose.yml | 4 +- test/simulator-group/kubeproxy/docker-compose.yml | 4 +- test/simulator-group/mrstub/docker-compose.yml | 4 +- test/simulator-group/ngw/docker-compose.yml | 4 +- .../policy_agent/docker-compose.yml | 4 +- test/simulator-group/prodstub/docker-compose.yml | 4 +- .../rapp_catalogue/docker-compose.yml | 4 +- test/simulator-group/ric/docker-compose.yml | 80 ++-------------------- test/simulator-group/sdnc/docker-compose-2.yml | 5 +- test/simulator-group/sdnc/docker-compose.yml | 5 +- 22 files changed, 131 insertions(+), 156 deletions(-) diff --git a/test/common/cr_api_functions.sh b/test/common/cr_api_functions.sh index a9acd6e5..1b82ea02 100644 --- a/test/common/cr_api_functions.sh +++ b/test/common/cr_api_functions.sh @@ -122,7 +122,11 @@ __CR_statisics_setup() { CR_INSTANCE_KUBE=$(($CR_INSTANCE-1)) echo -n " CR-$CR_INSTANCE_KUBE $CR_APP_NAME-$CR_INSTANCE_KUBE $KUBE_SIM_NAMESPACE " else - echo -n " CR_$CR_INSTANCE ${CR_APP_NAME}_cr_$CR_INSTANCE " + if [ $DOCKER_COMPOSE_VERION == "V1" ]; then + echo -n " CR_$CR_INSTANCE ${CR_APP_NAME}_cr_$CR_INSTANCE " + else + echo -n " CR_$CR_INSTANCE ${CR_APP_NAME}-cr-$CR_INSTANCE " + fi fi done } @@ -161,7 +165,11 @@ __cr_set_protocoll() { for ((CR_INSTANCE=0; CR_INSTANCE<$MAX_CR_APP_COUNT; CR_INSTANCE++ )); do CR_DOCKER_INSTANCE=$(($CR_INSTANCE+1)) # CR_SERVICE_PATH is the base path to cr - __CR_SERVICE_PATH=$1"://"$CR_APP_NAME"_cr_"${CR_DOCKER_INSTANCE}":"$2 # docker access, container->container and script->container via proxy + if [ $DOCKER_COMPOSE_VERION == "V1" ]; then + __CR_SERVICE_PATH=$1"://"$CR_APP_NAME"_cr_"${CR_DOCKER_INSTANCE}":"$2 # docker access, container->container and script->container via proxy + else + __CR_SERVICE_PATH=$1"://"$CR_APP_NAME"-cr-"${CR_DOCKER_INSTANCE}":"$2 # docker access, container->container and script->container via proxy + fi if [ $RUNMODE == "KUBE" ]; then __CR_SERVICE_PATH=$1"://"$CR_APP_NAME"-"$CR_INSTANCE.$CR_APP_NAME"."$KUBE_SIM_NAMESPACE":"$3 # kube access, pod->svc and script->svc via proxy fi @@ -285,7 +293,11 @@ start_cr() { app_data="" cntr=1 while [ $cntr -le $CR_APP_COUNT ]; do - app=$CR_APP_NAME"_cr_"$cntr + if [ $DOCKER_COMPOSE_VERION == "V1" ]; then + app=$CR_APP_NAME"_cr_"$cntr + else + app=$CR_APP_NAME"-cr-"$cntr + fi app_data="$app_data $app" let cntr=cntr+1 done @@ -297,7 +309,11 @@ start_cr() { cntr=1 #Counter for docker instance, starts on 1 cntr2=0 #Couter for env var name, starts with 0 to be compablible with kube while [ $cntr -le $CR_APP_COUNT ]; do - app=$CR_APP_NAME"_cr_"$cntr + if [ $DOCKER_COMPOSE_VERION == "V1" ]; then + app=$CR_APP_NAME"_cr_"$cntr + else + app=$CR_APP_NAME"-cr-"$cntr + fi __dynvar="CR_SERVICE_PATH_"$cntr2 __check_service_start $app ${!__dynvar}$CR_ALIVE_URL let cntr=cntr+1 diff --git a/test/common/genstat.sh b/test/common/genstat.sh index 2adce1f2..e186f099 100755 --- a/test/common/genstat.sh +++ b/test/common/genstat.sh @@ -31,7 +31,6 @@ print_usage() { echo "or" echo "Usage: genstat.sh KUBE [ ]*" } -DD=$@ STARTTIME=-1 if [ $# -lt 4 ]; then @@ -67,7 +66,6 @@ fi echo "Name;Time;PIDS;CPU perc;Mem perc" > $LOGFILE -echo $DD >> $LOGFILE if [ "$STARTTIME" -ne -1 ]; then STARTTIME=$(($SECONDS-$STARTTIME)) diff --git a/test/common/pa_api_functions.sh b/test/common/pa_api_functions.sh index 53670605..219aedb3 100644 --- a/test/common/pa_api_functions.sh +++ b/test/common/pa_api_functions.sh @@ -533,7 +533,11 @@ prepare_consul_config() { ric_id=${ric%.*.*} #extract pod id from full hosthame ric_id=$(echo "$ric_id" | tr '-' '_') else - ric_id=$ric + if [ $DOCKER_COMPOSE_VERION == "V1" ]; then + ric_id=$ric + else + ric_id=$(echo "$ric" | tr '-' '_') #ric id still needs underscore as it is different from the container name + fi fi echo " Found a1 sim: "$ric_id config_json=$config_json"\n \"name\": \"$ric_id\"," diff --git a/test/common/ricsim_api_functions.sh b/test/common/ricsim_api_functions.sh index 0a1a8e36..435c208f 100644 --- a/test/common/ricsim_api_functions.sh +++ b/test/common/ricsim_api_functions.sh @@ -103,9 +103,15 @@ __RICSIM_statisics_setup() { echo -n " RICSIM_G2_$RICSIM_INSTANCE_KUBE ${RIC_SIM_PREFIX}-g2-$RICSIM_INSTANCE_KUBE $KUBE_A1SIM_NAMESPACE " echo -n " RICSIM_G3_$RICSIM_INSTANCE_KUBE ${RIC_SIM_PREFIX}-g3-$RICSIM_INSTANCE_KUBE $KUBE_A1SIM_NAMESPACE " else - echo -n " RICSIM_G1_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g1_$RICSIM_INSTANCE " - echo -n " RICSIM_G2_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g2_$RICSIM_INSTANCE " - echo -n " RICSIM_G3_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g3_$RICSIM_INSTANCE " + if [ $DOCKER_COMPOSE_VERION == "V1" ]; then + echo -n " RICSIM_G1_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g1_$RICSIM_INSTANCE " + echo -n " RICSIM_G2_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g2_$RICSIM_INSTANCE " + echo -n " RICSIM_G3_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}_g3_$RICSIM_INSTANCE " + else + echo -n " RICSIM_G1_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}-g1-$RICSIM_INSTANCE " + echo -n " RICSIM_G2_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}-g2-$RICSIM_INSTANCE " + echo -n " RICSIM_G3_$RICSIM_INSTANCE ${RIC_SIM_PREFIX}-g3-$RICSIM_INSTANCE " + fi fi done } @@ -114,16 +120,10 @@ __RICSIM_statisics_setup() { RIC_SIM_HTTPX="http" -RIC_SIM_HOST=$RIC_SIM_HTTPX"://"$LOCALHOST_NAME RIC_SIM_PORT=$RIC_SIM_INTERNAL_PORT -#Vars for A1 interface version and container count -G1_A1_VERSION="" -G2_A1_VERSION="" -G3_A1_VERSION="" -G4_A1_VERSION="" -G5_A1_VERSION="" +#Vars for container count G1_COUNT=0 G2_COUNT=0 G3_COUNT=0 @@ -139,7 +139,6 @@ use_simulator_http() { echo -e $BOLD"RICSIM protocol setting"$EBOLD echo -e " Using $BOLD http $EBOLD towards the simulators" RIC_SIM_HTTPX="http" - RIC_SIM_HOST=$RIC_SIM_HTTPX"://"$LOCALHOST_NAME RIC_SIM_PORT=$RIC_SIM_INTERNAL_PORT echo "" } @@ -148,7 +147,6 @@ use_simulator_https() { echo -e $BOLD"RICSIM protocol setting"$EBOLD echo -e " Using $BOLD https $EBOLD towards the simulators" RIC_SIM_HTTPX="https" - RIC_SIM_HOST=$RIC_SIM_HTTPX"://"$LOCALHOST_NAME RIC_SIM_PORT=$RIC_SIM_INTERNAL_SECURE_PORT echo "" } @@ -208,19 +206,14 @@ start_ric_simulators() { #Set env var for simulator count and A1 interface vesion for the given group if [ $1 == "$RIC1" ]; then G1_COUNT=$2 - G1_A1_VERSION=$3 elif [ $1 == "$RIC2" ]; then G2_COUNT=$2 - G2_A1_VERSION=$3 elif [ $1 == "$RIC3" ]; then G3_COUNT=$2 - G3_A1_VERSION=$3 elif [ $1 == "$RIC4" ]; then G4_COUNT=$2 - G4_A1_VERSION=$3 elif [ $1 == "$RIC5" ]; then G5_COUNT=$2 - G5_A1_VERSION=$3 else ((RES_CONF_FAIL++)) __print_err "need three args, $RIC1|$RIC2|$RIC3|$RIC4|$RIC5 " $@ @@ -275,22 +268,34 @@ start_ric_simulators() { # Create .env file to compose project, all ric container will get this prefix echo "COMPOSE_PROJECT_NAME="$RIC_SIM_PREFIX > $SIM_GROUP/$RIC_SIM_COMPOSE_DIR/.env - export G1_A1_VERSION - export G2_A1_VERSION - export G3_A1_VERSION - export G4_A1_VERSION - export G5_A1_VERSION + #extract service name (group), g1, g2, g3, g4 or g5 from var $1 + #E.g. ricsim_g1 -> g1 is the service name + TMP_GRP=$1 + RICSIM_COMPOSE_SERVICE_NAME=$(echo "${TMP_GRP##*_}") + + export RICSIM_COMPOSE_A1_VERSION=$3 + export RICSIM_COMPOSE_SERVICE_NAME export RIC_SIM_INTERNAL_PORT export RIC_SIM_INTERNAL_SECURE_PORT export RIC_SIM_CERT_MOUNT_DIR export DOCKER_SIM_NWNAME export RIC_SIM_DISPLAY_NAME - docker_args="--scale g1=$G1_COUNT --scale g2=$G2_COUNT --scale g3=$G3_COUNT --scale g4=$G4_COUNT --scale g5=$G5_COUNT" + docker_args="--no-recreate --scale $RICSIM_COMPOSE_SERVICE_NAME=$2" + + #Create a list of contsiner names + #Will be __ + # or + # -- app_data="" cntr=1 + if [ $DOCKER_COMPOSE_VERION == "V1" ]; then + app_name_prefix=$RIC_SIM_PREFIX"_"$RICSIM_COMPOSE_SERVICE_NAME"_" + else + app_name_prefix=$RIC_SIM_PREFIX"-"$RICSIM_COMPOSE_SERVICE_NAME"-" + fi while [ $cntr -le $2 ]; do - app=$1"_"$cntr + app=$app_name_prefix$cntr app_data="$app_data $app" let cntr=cntr+1 done @@ -299,7 +304,11 @@ start_ric_simulators() { cntr=1 while [ $cntr -le $2 ]; do - app=$1"_"$cntr + if [ $DOCKER_COMPOSE_VERION == "V1" ]; then + app=$RIC_SIM_PREFIX"_"$RICSIM_COMPOSE_SERVICE_NAME"_"$cntr + else + app=$RIC_SIM_PREFIX"-"$RICSIM_COMPOSE_SERVICE_NAME"-"$cntr + fi __check_service_start $app $RIC_SIM_HTTPX"://"$app:$RIC_SIM_PORT$RIC_SIM_ALIVE_URL let cntr=cntr+1 done @@ -329,7 +338,12 @@ __find_sim_host() { ric_setname="${ricname%-*}" #Extract the stateful set name echo $RIC_SIM_HTTPX"://"$ricname.$ric_setname.$KUBE_A1SIM_NAMESPACE":"$RIC_SIM_PORT else - echo $RIC_SIM_HTTPX"://"$1":"$RIC_SIM_PORT + if [ $DOCKER_COMPOSE_VERION == "V1" ]; then + echo $RIC_SIM_HTTPX"://"$1":"$RIC_SIM_PORT + else + ricname=$(echo "$1" | tr '_' '-') + echo $RIC_SIM_HTTPX"://"$ricname":"$RIC_SIM_PORT + fi fi } diff --git a/test/common/testcase_common.sh b/test/common/testcase_common.sh index b47413a6..b171d9fe 100755 --- a/test/common/testcase_common.sh +++ b/test/common/testcase_common.sh @@ -128,6 +128,11 @@ STOP_AT_ERROR=0 # Applies only to images defined in the test-env files with image names and tags defined as XXXX_RELEASE IMAGE_CATEGORY="DEV" +#Var to indicate docker-compose version, V1 or V2 +#V1 names replicated containers __ +#V2 names replicated containers -- +DOCKER_COMPOSE_VERION="V1" + # Function to indent cmd output with one space indent1() { sed 's/^/ /'; } @@ -783,34 +788,44 @@ echo -e $BOLD"Auto adding included apps"$EBOLD done echo "" +echo -e $BOLD"Test environment info"$EBOLD # Check needed installed sw + +tmp=$(which bash) +if [ $? -ne 0 ] || [ -z "$tmp" ]; then + echo -e $RED"bash is required to run the test environment, pls install"$ERED + exit 1 +fi +echo " bash is installed and using version:" +echo "$(bash --version)" | indent2 + tmp=$(which python3) -if [ $? -ne 0 ] || [ -z tmp ]; then +if [ $? -ne 0 ] || [ -z "$tmp" ]; then echo -e $RED"python3 is required to run the test environment, pls install"$ERED exit 1 fi +echo " python3 is installed and using version: $(python3 --version)" + tmp=$(which docker) -if [ $? -ne 0 ] || [ -z tmp ]; then +if [ $? -ne 0 ] || [ -z "$tmp" ]; then echo -e $RED"docker is required to run the test environment, pls install"$ERED exit 1 fi +echo " docker is installed and using versions:" +echo " $(docker version --format 'Client version {{.Client.Version}} Server version {{.Server.Version}}')" tmp=$(which docker-compose) -if [ $? -ne 0 ] || [ -z tmp ]; then +if [ $? -ne 0 ] || [ -z "$tmp" ]; then if [ $RUNMODE == "DOCKER" ]; then echo -e $RED"docker-compose is required to run the test environment, pls install"$ERED exit 1 fi fi -if [ $RUNMODE == "DOCKER" ]; then - tmp=$(docker-compose version | grep -i 'docker' | grep -i 'compose' | grep -i 'version') - if [[ "$tmp" == *'v2'* ]]; then - echo -e $RED"docker-compose is using docker-compose version 2"$ERED - echo -e $RED"The test environment only support version 1"$ERED - echo -e $RED"Disable version 2 by cmd 'docker-compose disable-v2' and re-run the script "$ERED - exit 1 - fi +tmp=$(docker-compose version --short) +echo " docker-compose installed and using version $tmp" +if [[ "$tmp" == *'v2'* ]]; then + DOCKER_COMPOSE_VERION="V2" fi tmp=$(which kubectl) @@ -821,6 +836,8 @@ if [ $? -ne 0 ] || [ -z tmp ]; then fi else if [ $RUNMODE == "KUBE" ]; then + echo " kubectl is installed and using versions:" + echo $(kubectl version --short=true) | indent2 res=$(kubectl cluster-info 2>&1) if [ $? -ne 0 ]; then echo -e "$BOLD$RED############################################# $ERED$EBOLD" @@ -852,6 +869,8 @@ else fi fi +echo "" + echo -e $BOLD"Checking configured image setting for this test case"$EBOLD #Temp var to check for image variable name errors diff --git a/test/simulator-group/consul_cbs/docker-compose.yml b/test/simulator-group/consul_cbs/docker-compose.yml index 105c8750..003dbfa6 100644 --- a/test/simulator-group/consul_cbs/docker-compose.yml +++ b/test/simulator-group/consul_cbs/docker-compose.yml @@ -19,9 +19,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} - + external: true + name: ${DOCKER_SIM_NWNAME} services: consul-server: diff --git a/test/simulator-group/control_panel/docker-compose.yml b/test/simulator-group/control_panel/docker-compose.yml index 94628fad..b860a89d 100644 --- a/test/simulator-group/control_panel/docker-compose.yml +++ b/test/simulator-group/control_panel/docker-compose.yml @@ -17,8 +17,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: control-panel: image: ${CONTROL_PANEL_IMAGE} diff --git a/test/simulator-group/cr/docker-compose.yml b/test/simulator-group/cr/docker-compose.yml index 3b63451b..047ec45c 100644 --- a/test/simulator-group/cr/docker-compose.yml +++ b/test/simulator-group/cr/docker-compose.yml @@ -18,8 +18,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: cr: scale: $CR_APP_COUNT diff --git a/test/simulator-group/dmaapadp/docker-compose.yml b/test/simulator-group/dmaapadp/docker-compose.yml index f9dee41c..cea605a9 100644 --- a/test/simulator-group/dmaapadp/docker-compose.yml +++ b/test/simulator-group/dmaapadp/docker-compose.yml @@ -17,8 +17,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: dmaap-adapter-service: image: ${DMAAP_ADP_IMAGE} diff --git a/test/simulator-group/dmaapmed/docker-compose.yml b/test/simulator-group/dmaapmed/docker-compose.yml index d0672dfe..e4c9a00f 100644 --- a/test/simulator-group/dmaapmed/docker-compose.yml +++ b/test/simulator-group/dmaapmed/docker-compose.yml @@ -17,8 +17,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: dmaap-mediator-service: image: ${DMAAP_MED_IMAGE} diff --git a/test/simulator-group/dmaapmr/docker-compose.yml b/test/simulator-group/dmaapmr/docker-compose.yml index 2060ce71..c2c1fba1 100644 --- a/test/simulator-group/dmaapmr/docker-compose.yml +++ b/test/simulator-group/dmaapmr/docker-compose.yml @@ -18,9 +18,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} - + external: true + name: ${DOCKER_SIM_NWNAME} services: zookeeper: image: $ONAP_ZOOKEEPER_IMAGE diff --git a/test/simulator-group/ecs/docker-compose.yml b/test/simulator-group/ecs/docker-compose.yml index b0577531..588f8c3e 100644 --- a/test/simulator-group/ecs/docker-compose.yml +++ b/test/simulator-group/ecs/docker-compose.yml @@ -16,8 +16,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: ecs: image: ${ECS_IMAGE} diff --git a/test/simulator-group/httpproxy/docker-compose.yml b/test/simulator-group/httpproxy/docker-compose.yml index c27ba5eb..2c8c61b6 100644 --- a/test/simulator-group/httpproxy/docker-compose.yml +++ b/test/simulator-group/httpproxy/docker-compose.yml @@ -18,8 +18,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: httpproxy: networks: diff --git a/test/simulator-group/kubeproxy/docker-compose.yml b/test/simulator-group/kubeproxy/docker-compose.yml index 7f0f3496..2e644e02 100644 --- a/test/simulator-group/kubeproxy/docker-compose.yml +++ b/test/simulator-group/kubeproxy/docker-compose.yml @@ -17,8 +17,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: kubeproxy: image: ${KUBE_PROXY_IMAGE} diff --git a/test/simulator-group/mrstub/docker-compose.yml b/test/simulator-group/mrstub/docker-compose.yml index a1c96c00..608f5c81 100644 --- a/test/simulator-group/mrstub/docker-compose.yml +++ b/test/simulator-group/mrstub/docker-compose.yml @@ -18,8 +18,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: mr-stub: networks: diff --git a/test/simulator-group/ngw/docker-compose.yml b/test/simulator-group/ngw/docker-compose.yml index c897ba7a..7002eaf7 100644 --- a/test/simulator-group/ngw/docker-compose.yml +++ b/test/simulator-group/ngw/docker-compose.yml @@ -18,8 +18,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: nonrtric-gateway: image: ${NRT_GATEWAY_IMAGE} diff --git a/test/simulator-group/policy_agent/docker-compose.yml b/test/simulator-group/policy_agent/docker-compose.yml index 22611516..4b42b42e 100644 --- a/test/simulator-group/policy_agent/docker-compose.yml +++ b/test/simulator-group/policy_agent/docker-compose.yml @@ -17,8 +17,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: policy-agent: image: ${POLICY_AGENT_IMAGE} diff --git a/test/simulator-group/prodstub/docker-compose.yml b/test/simulator-group/prodstub/docker-compose.yml index e46c5467..e05d3ad0 100644 --- a/test/simulator-group/prodstub/docker-compose.yml +++ b/test/simulator-group/prodstub/docker-compose.yml @@ -18,8 +18,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: producer-stub: networks: diff --git a/test/simulator-group/rapp_catalogue/docker-compose.yml b/test/simulator-group/rapp_catalogue/docker-compose.yml index 3dbd45b7..7c644b9f 100644 --- a/test/simulator-group/rapp_catalogue/docker-compose.yml +++ b/test/simulator-group/rapp_catalogue/docker-compose.yml @@ -17,8 +17,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: rapp-catalogue: image: ${RAPP_CAT_IMAGE} diff --git a/test/simulator-group/ric/docker-compose.yml b/test/simulator-group/ric/docker-compose.yml index a6358c7a..3515973d 100644 --- a/test/simulator-group/ric/docker-compose.yml +++ b/test/simulator-group/ric/docker-compose.yml @@ -21,11 +21,11 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} + external: true + name: ${DOCKER_SIM_NWNAME} services: - g1: + ${RICSIM_COMPOSE_SERVICE_NAME}: image: ${RIC_SIM_IMAGE} networks: - default @@ -33,7 +33,7 @@ services: - ${RIC_SIM_INTERNAL_PORT}/tcp - ${RIC_SIM_INTERNAL_SECURE_PORT}/tcp environment: - - A1_VERSION=${G1_A1_VERSION} + - A1_VERSION=${RICSIM_COMPOSE_A1_VERSION} - REMOTE_HOSTS_LOGGING=1 - ALLOW_HTTP=true - DUPLICATE_CHECK=1 @@ -42,75 +42,3 @@ services: labels: - "nrttest_app=RICSIM" - "nrttest_dp=${RIC_SIM_DISPLAY_NAME}" - - g2: - image: ${RIC_SIM_IMAGE} - networks: - - default - ports: - - ${RIC_SIM_INTERNAL_PORT}/tcp - - ${RIC_SIM_INTERNAL_SECURE_PORT}/tcp - environment: - - A1_VERSION=${G2_A1_VERSION} - - REMOTE_HOSTS_LOGGING=1 - - ALLOW_HTTP=true - - DUPLICATE_CHECK=1 - volumes: - - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro - labels: - - "nrttest_app=RICSIM" - - "nrttest_dp=${RIC_SIM_DISPLAY_NAME}" - - g3: - image: ${RIC_SIM_IMAGE} - networks: - - default - ports: - - ${RIC_SIM_INTERNAL_PORT}/tcp - - ${RIC_SIM_INTERNAL_SECURE_PORT}/tcp - environment: - - A1_VERSION=${G3_A1_VERSION} - - REMOTE_HOSTS_LOGGING=1 - - ALLOW_HTTP=true - - DUPLICATE_CHECK=1 - volumes: - - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro - labels: - - "nrttest_app=RICSIM" - - "nrttest_dp=${RIC_SIM_DISPLAY_NAME}" - - g4: - image: ${RIC_SIM_IMAGE} - networks: - - default - ports: - - ${RIC_SIM_INTERNAL_PORT}/tcp - - ${RIC_SIM_INTERNAL_SECURE_PORT}/tcp - environment: - - A1_VERSION=${G4_A1_VERSION} - - REMOTE_HOSTS_LOGGING=1 - - ALLOW_HTTP=true - - DUPLICATE_CHECK=1 - volumes: - - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro - labels: - - "nrttest_app=RICSIM" - - "nrttest_dp=${RIC_SIM_DISPLAY_NAME}" - - g5: - image: ${RIC_SIM_IMAGE} - networks: - - default - ports: - - ${RIC_SIM_INTERNAL_PORT}/tcp - - ${RIC_SIM_INTERNAL_SECURE_PORT}/tcp - environment: - - A1_VERSION=${G5_A1_VERSION} - - REMOTE_HOSTS_LOGGING=1 - - ALLOW_HTTP=true - - DUPLICATE_CHECK=1 - volumes: - - ${RIC_SIM_CERT_MOUNT_DIR}:/usr/src/app/cert:ro - labels: - - "nrttest_app=RICSIM" - - "nrttest_dp=${RIC_SIM_DISPLAY_NAME}" \ No newline at end of file diff --git a/test/simulator-group/sdnc/docker-compose-2.yml b/test/simulator-group/sdnc/docker-compose-2.yml index 03483a06..37c99b6a 100644 --- a/test/simulator-group/sdnc/docker-compose-2.yml +++ b/test/simulator-group/sdnc/docker-compose-2.yml @@ -17,9 +17,8 @@ version: '3.0' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} - + external: true + name: ${DOCKER_SIM_NWNAME} services: db: image: ${SDNC_DB_IMAGE} diff --git a/test/simulator-group/sdnc/docker-compose.yml b/test/simulator-group/sdnc/docker-compose.yml index 0b6f3577..505a54cc 100644 --- a/test/simulator-group/sdnc/docker-compose.yml +++ b/test/simulator-group/sdnc/docker-compose.yml @@ -17,9 +17,8 @@ version: '3' networks: default: - external: - name: ${DOCKER_SIM_NWNAME} - + external: true + name: ${DOCKER_SIM_NWNAME} services: db: image: ${SDNC_DB_IMAGE} -- 2.16.6