Adaptations to docker-compose V2 07/7107/1
authorBjornMagnussonXA <bjorn.magnusson@est.tech>
Tue, 23 Nov 2021 08:22:35 +0000 (09:22 +0100)
committerBjornMagnussonXA <bjorn.magnusson@est.tech>
Tue, 23 Nov 2021 08:22:46 +0000 (09:22 +0100)
Test env now supports both docker-compose V1 and V2

Issue-ID: NONRTRIC-618

Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I6a5717b6dce64086123cc5575ef45f9e299cd7e3

22 files changed:
test/common/cr_api_functions.sh
test/common/genstat.sh
test/common/pa_api_functions.sh
test/common/ricsim_api_functions.sh
test/common/testcase_common.sh
test/simulator-group/consul_cbs/docker-compose.yml
test/simulator-group/control_panel/docker-compose.yml
test/simulator-group/cr/docker-compose.yml
test/simulator-group/dmaapadp/docker-compose.yml
test/simulator-group/dmaapmed/docker-compose.yml
test/simulator-group/dmaapmr/docker-compose.yml
test/simulator-group/ecs/docker-compose.yml
test/simulator-group/httpproxy/docker-compose.yml
test/simulator-group/kubeproxy/docker-compose.yml
test/simulator-group/mrstub/docker-compose.yml
test/simulator-group/ngw/docker-compose.yml
test/simulator-group/policy_agent/docker-compose.yml
test/simulator-group/prodstub/docker-compose.yml
test/simulator-group/rapp_catalogue/docker-compose.yml
test/simulator-group/ric/docker-compose.yml
test/simulator-group/sdnc/docker-compose-2.yml
test/simulator-group/sdnc/docker-compose.yml

index a9acd6e..1b82ea0 100644 (file)
@@ -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
index 2adce1f..e186f09 100755 (executable)
@@ -31,7 +31,6 @@ print_usage() {
   echo "or"
   echo "Usage: genstat.sh KUBE <start-time-seconds> <log-file> <app-short-name> <app-name> <namespace> [ <app-short-name> <app-name> <namespace> ]*"
 }
-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))
index 5367060..219aedb 100644 (file)
@@ -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\","
index 0a1a8e3..435c208 100644 (file)
@@ -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 <count> <interface-id>" $@
@@ -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 <ricsim-prefix>_<service-name>_<index>
+               # or
+               # <ricsim-prefix>-<service-name>-<index>
                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
 }
index b47413a..b171d9f 100755 (executable)
@@ -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 <proj-name>_<service-name>_<index>
+#V2 names replicated containers <proj-name>-<service-name>-<index>
+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
index 105c875..003dbfa 100644 (file)
@@ -19,9 +19,8 @@ version: '3.0'
 
 networks:
   default:
-    external:
-      name: ${DOCKER_SIM_NWNAME}
-
+    external: true
+    name: ${DOCKER_SIM_NWNAME}
 services:
 
   consul-server:
index 94628fa..b860a89 100644 (file)
@@ -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}
index 3b63451..047ec45 100644 (file)
@@ -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
index f9dee41..cea605a 100644 (file)
@@ -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}
index d0672df..e4c9a00 100644 (file)
@@ -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}
index 2060ce7..c2c1fba 100644 (file)
@@ -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
index b057753..588f8c3 100644 (file)
@@ -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}
index c27ba5e..2c8c61b 100644 (file)
@@ -18,8 +18,8 @@
 version: '3.0'
 networks:
   default:
-    external:
-      name: ${DOCKER_SIM_NWNAME}
+    external: true
+    name: ${DOCKER_SIM_NWNAME}
 services:
   httpproxy:
     networks:
index 7f0f349..2e644e0 100644 (file)
@@ -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}
index a1c96c0..608f5c8 100644 (file)
@@ -18,8 +18,8 @@
 version: '3.0'
 networks:
   default:
-    external:
-      name: ${DOCKER_SIM_NWNAME}
+    external: true
+    name: ${DOCKER_SIM_NWNAME}
 services:
   mr-stub:
     networks:
index c897ba7..7002eaf 100644 (file)
@@ -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}
index 2261151..4b42b42 100644 (file)
@@ -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}
index e46c546..e05d3ad 100644 (file)
@@ -18,8 +18,8 @@
 version: '3.0'
 networks:
   default:
-    external:
-      name: ${DOCKER_SIM_NWNAME}
+    external: true
+    name: ${DOCKER_SIM_NWNAME}
 services:
   producer-stub:
     networks:
index 3dbd45b..7c644b9 100644 (file)
@@ -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}
index a6358c7..3515973 100644 (file)
@@ -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
index 03483a0..37c99b6 100644 (file)
@@ -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}
index 0b6f357..505a54c 100644 (file)
@@ -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}