From 63124fc4873029d3eebd6e3b165b5ab2779cf4b5 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 27 Jan 2023 13:49:42 +0100 Subject: [PATCH 01/12] chore(ci): updating simulators docker-compose for CN5G release v1.5 Signed-off-by: Raphael Defosseux --- .../5g_f1_rfsimulator/docker-compose.yaml | 112 ++++------------- .../5g_fdd_rfsimulator/docker-compose.yaml | 112 ++++------------- ci-scripts/yaml_files/5g_l2sim_tdd/README.md | 16 +-- .../5g_l2sim_tdd/docker-compose.yaml | 113 ++++------------- .../yaml_files/5g_rfsimulator/README.md | 22 ++-- .../5g_rfsimulator/amf-healthcheck.sh | 57 --------- .../5g_rfsimulator/docker-compose.yaml | 114 ++++------------- .../5g_rfsimulator/nrf-healthcheck.sh | 20 --- .../5g_rfsimulator/smf-healthcheck.sh | 21 ---- .../5g_rfsimulator/spgwu-healthcheck.sh | 28 ----- .../5g_rfsimulator_24prb/docker-compose.yaml | 119 ++++-------------- .../5g_rfsimulator_2x2/docker-compose.yaml | 118 ++++------------- .../docker-compose.yaml | 118 ++++------------- 13 files changed, 171 insertions(+), 799 deletions(-) delete mode 100755 ci-scripts/yaml_files/5g_rfsimulator/amf-healthcheck.sh delete mode 100755 ci-scripts/yaml_files/5g_rfsimulator/nrf-healthcheck.sh delete mode 100755 ci-scripts/yaml_files/5g_rfsimulator/smf-healthcheck.sh delete mode 100755 ci-scripts/yaml_files/5g_rfsimulator/spgwu-healthcheck.sh diff --git a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml index 5765a33351..d9d97670d3 100644 --- a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml @@ -2,27 +2,16 @@ version: '3.8' services: oai-nrf: container_name: "rfsim5g-oai-nrf" - image: oai-nrf:august-dev + image: oaisoftwarealliance/oai-nrf:v1.5.0 environment: - NRF_INTERFACE_NAME_FOR_SBI=eth0 - - NRF_INTERFACE_PORT_FOR_SBI=80 - - NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - NRF_API_VERSION=v1 - - INSTANCE=0 - - PID_DIRECTORY=/var/run + - TZ=Europe/Paris networks: public_net: ipv4_address: 192.168.71.130 - volumes: - - ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 mysql: container_name: "rfsim5g-mysql" - image: mysql:5.7 + image: mysql:8.0 volumes: - ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh @@ -36,17 +25,15 @@ services: test: /bin/bash -c "/tmp/mysql-healthcheck.sh" interval: 10s timeout: 5s - retries: 5 + retries: 30 networks: public_net: ipv4_address: 192.168.71.131 oai-amf: container_name: "rfsim5g-oai-amf" - image: oai-amf:august-dev + image: oaisoftwarealliance/oai-amf:v1.5.0 environment: - TZ=Europe/paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - MCC=208 - MNC=99 - REGION_ID=128 @@ -62,132 +49,85 @@ services: - PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_TAC=0x0001 + # Only one slice is defined (1, 0xFFFFFF). - SST_0=1 - - SD_0=0xffffff - - SST_1=1 - - SD_1=1 - AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0 + # One single SMF instance - SMF_INSTANCE_ID_0=1 - SMF_FQDN_0=oai-smf - - SMF_IPV4_ADDR_0=0.0.0.0 - - SMF_HTTP_VERSION_0=v1 + - SMF_IPV4_ADDR_0=192.168.71.133 - SELECTED_0=true - - SMF_INSTANCE_ID_1=2 - - SMF_FQDN_1=oai-smf - - SMF_IPV4_ADDR_1=0.0.0.0 - - SMF_HTTP_VERSION_1=v1 - - SELECTED_1=false + # mysql definition in AMF is mandatory in mini deployment. - MYSQL_SERVER=192.168.71.131 - MYSQL_USER=root - MYSQL_PASS=linux - MYSQL_DB=oai_db - - OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 + # NF registration - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 + - NRF_FQDN=oai-nrf - NF_REGISTRATION=yes - SMF_SELECTION=yes - USE_FQDN_DNS=yes - - NRF_API_VERSION=v1 - - NRF_FQDN=oai-nrf - - EXTERNAL_AUSF=no - - AUSF_IPV4_ADDRESS=0.0.0.0 - - AUSF_PORT=80 - - AUSF_API_VERSION=v1 - - AUSF_FQDN=localhost + - USE_HTTP2=no depends_on: - oai-nrf - mysql - volumes: - - ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh" - interval: 10s - timeout: 15s - retries: 5 networks: public_net: ipv4_address: 192.168.71.132 oai-smf: container_name: "rfsim5g-oai-smf" - image: oai-smf:august-dev + image: oaisoftwarealliance/oai-smf:v1.5.0 environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0 - - SMF_INTERFACE_PORT_FOR_SBI=80 - - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - SMF_API_VERSION=v1 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - - AMF_IPV4_ADDRESS=0.0.0.0 - - AMF_PORT=80 - - AMF_API_VERSION=v1 + - AMF_IPV4_ADDRESS=192.168.71.132 - AMF_FQDN=oai-amf - - UDM_IPV4_ADDRESS=127.0.0.1 - - UDM_PORT=80 - - UDM_API_VERSION=v1 - - UDM_FQDN=localhost - UPF_IPV4_ADDRESS=192.168.71.134 - UPF_FQDN_0=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf - REGISTER_NRF=yes - DISCOVER_UPF=yes - USE_FQDN_DNS=yes + - USE_LOCAL_SUBSCRIPTION_INFO=yes + - UE_MTU=1500 + # Only one slice is defined (1, 0xFFFFFF) - DNN_NI0=oai - TYPE0=IPv4 - DNN_RANGE0=12.1.1.2 - 12.1.1.127 - NSSAI_SST0=1 - - NSSAI_SD0=0xFFFFFF - SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_DL0=400Mbps - - DNN_NI2=oai.ipv4 + - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 + - ENABLE_USAGE_REPORTING=no depends_on: - oai-nrf - oai-amf - volumes: - - ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.133 oai-spgwu: container_name: "rfsim5g-oai-spgwu" - image: oai-spgwu-tiny:august-dev + image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 environment: - TZ=Europe/Paris - - PID_DIRECTORY=/var/run - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0 - NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_IP=12.1.1.0/24 - - SPGWC0_IP_ADDRESS=192.168.71.133 - - BYPASS_UL_PFCP_RULES=no - - MCC=208 - - MNC=99 - - MNC03=099 - - TAC=1 - - GTP_EXTENSION_HEADER_PRESENT=yes - - GW_ID=1 - - REALM=openairinterface.org - ENABLE_5G_FEATURES=yes - REGISTER_NRF=yes - USE_FQDN_NRF=yes - UPF_FQDN_5G=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf + # Only one slice is defined (1, 0xFFFFFF) - NSSAI_SST_0=1 - NSSAI_SD_0=0xffffff - DNN_0=oai @@ -200,24 +140,16 @@ services: cap_drop: - ALL privileged: true - volumes: - - ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.134 traffic_net: ipv4_address: 192.168.72.134 oai-ext-dn: - image: ubuntu:bionic privileged: true container_name: rfsim5g-oai-ext-dn + image: oaisoftwarealliance/trf-gen-cn5g:latest entrypoint: /bin/bash -c \ - "apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" depends_on: diff --git a/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml index 695a05f2b0..c3c3797125 100644 --- a/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml @@ -2,27 +2,16 @@ version: '3.8' services: oai-nrf: container_name: "rfsim5g-oai-nrf" - image: oai-nrf:august-dev + image: oaisoftwarealliance/oai-nrf:v1.5.0 environment: - NRF_INTERFACE_NAME_FOR_SBI=eth0 - - NRF_INTERFACE_PORT_FOR_SBI=80 - - NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - NRF_API_VERSION=v1 - - INSTANCE=0 - - PID_DIRECTORY=/var/run + - TZ=Europe/Paris networks: public_net: ipv4_address: 192.168.71.130 - volumes: - - ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 mysql: container_name: "rfsim5g-mysql" - image: mysql:5.7 + image: mysql:8.0 volumes: - ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh @@ -36,17 +25,15 @@ services: test: /bin/bash -c "/tmp/mysql-healthcheck.sh" interval: 10s timeout: 5s - retries: 5 + retries: 30 networks: public_net: ipv4_address: 192.168.71.131 oai-amf: container_name: "rfsim5g-oai-amf" - image: oai-amf:august-dev + image: oaisoftwarealliance/oai-amf:v1.5.0 environment: - TZ=Europe/paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - MCC=208 - MNC=99 - REGION_ID=128 @@ -62,132 +49,85 @@ services: - PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_TAC=0x0001 + # Only one slice is defined (1, 0xFFFFFF). - SST_0=1 - - SD_0=0xffffff - - SST_1=1 - - SD_1=1 - AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0 + # One single SMF instance - SMF_INSTANCE_ID_0=1 - SMF_FQDN_0=oai-smf - - SMF_IPV4_ADDR_0=0.0.0.0 - - SMF_HTTP_VERSION_0=v1 + - SMF_IPV4_ADDR_0=192.168.71.133 - SELECTED_0=true - - SMF_INSTANCE_ID_1=2 - - SMF_FQDN_1=oai-smf - - SMF_IPV4_ADDR_1=0.0.0.0 - - SMF_HTTP_VERSION_1=v1 - - SELECTED_1=false + # mysql definition in AMF is mandatory in mini deployment. - MYSQL_SERVER=192.168.71.131 - MYSQL_USER=root - MYSQL_PASS=linux - MYSQL_DB=oai_db - - OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 + # NF registration - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 + - NRF_FQDN=oai-nrf - NF_REGISTRATION=yes - SMF_SELECTION=yes - USE_FQDN_DNS=yes - - NRF_API_VERSION=v1 - - NRF_FQDN=oai-nrf - - EXTERNAL_AUSF=no - - AUSF_IPV4_ADDRESS=0.0.0.0 - - AUSF_PORT=80 - - AUSF_API_VERSION=v1 - - AUSF_FQDN=localhost + - USE_HTTP2=no depends_on: - oai-nrf - mysql - volumes: - - ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh" - interval: 10s - timeout: 15s - retries: 5 networks: public_net: ipv4_address: 192.168.71.132 oai-smf: container_name: "rfsim5g-oai-smf" - image: oai-smf:august-dev + image: oaisoftwarealliance/oai-smf:v1.5.0 environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0 - - SMF_INTERFACE_PORT_FOR_SBI=80 - - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - SMF_API_VERSION=v1 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - - AMF_IPV4_ADDRESS=0.0.0.0 - - AMF_PORT=80 - - AMF_API_VERSION=v1 + - AMF_IPV4_ADDRESS=192.168.71.132 - AMF_FQDN=oai-amf - - UDM_IPV4_ADDRESS=127.0.0.1 - - UDM_PORT=80 - - UDM_API_VERSION=v1 - - UDM_FQDN=localhost - UPF_IPV4_ADDRESS=192.168.71.134 - UPF_FQDN_0=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf - REGISTER_NRF=yes - DISCOVER_UPF=yes - USE_FQDN_DNS=yes + - USE_LOCAL_SUBSCRIPTION_INFO=yes + - UE_MTU=1500 + # Only one slice is defined (1, 0xFFFFFF) - DNN_NI0=oai - TYPE0=IPv4 - DNN_RANGE0=12.1.1.2 - 12.1.1.127 - NSSAI_SST0=1 - - NSSAI_SD0=0xFFFFFF - SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_DL0=400Mbps - - DNN_NI2=oai.ipv4 + - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 + - ENABLE_USAGE_REPORTING=no depends_on: - oai-nrf - oai-amf - volumes: - - ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.133 oai-spgwu: container_name: "rfsim5g-oai-spgwu" - image: oai-spgwu-tiny:august-dev + image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 environment: - TZ=Europe/Paris - - PID_DIRECTORY=/var/run - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0 - NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_IP=12.1.1.0/24 - - SPGWC0_IP_ADDRESS=192.168.71.133 - - BYPASS_UL_PFCP_RULES=no - - MCC=208 - - MNC=99 - - MNC03=099 - - TAC=1 - - GTP_EXTENSION_HEADER_PRESENT=yes - - GW_ID=1 - - REALM=openairinterface.org - ENABLE_5G_FEATURES=yes - REGISTER_NRF=yes - USE_FQDN_NRF=yes - UPF_FQDN_5G=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf + # Only one slice is defined (1, 0xFFFFFF) - NSSAI_SST_0=1 - NSSAI_SD_0=0xffffff - DNN_0=oai @@ -200,24 +140,16 @@ services: cap_drop: - ALL privileged: true - volumes: - - ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.134 traffic_net: ipv4_address: 192.168.72.134 oai-ext-dn: - image: ubuntu:bionic privileged: true container_name: rfsim5g-oai-ext-dn + image: oaisoftwarealliance/trf-gen-cn5g:latest entrypoint: /bin/bash -c \ - "apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" depends_on: diff --git a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md index 9578d037ca..adbb6edd44 100644 --- a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md +++ b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md @@ -32,11 +32,12 @@ Password: Now pull images. ```bash -$ docker pull mysql:5.7 -$ docker pull oaisoftwarealliance/oai-amf:develop -$ docker pull oaisoftwarealliance/oai-nrf:develop -$ docker pull oaisoftwarealliance/oai-smf:develop -$ docker pull oaisoftwarealliance/oai-spgwu-tiny:develop +$ docker pull mysql:8.0 +$ docker pull oaisoftwarealliance/oai-amf:v1.5.0 +$ docker pull oaisoftwarealliance/oai-nrf:v1.5.0 +$ docker pull oaisoftwarealliance/oai-smf:v1.5.0 +$ docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 +$ docker pull oaisoftwarealliance/trf-gen-cn5g:latest $ docker pull oaisoftwarealliance/oai-gnb:develop $ docker pull oaisoftwarealliance/oai-nr-ue:develop @@ -46,11 +47,6 @@ $ docker pull oaisoftwarealliance/proxy:latest And **re-tag** them for tutorials' docker-compose file to work. ```bash -$ docker image tag oaisoftwarealliance/oai-amf:latest oai-amf:august-dev -$ docker image tag oaisoftwarealliance/oai-nrf:latest oai-nrf:august-dev -$ docker image tag oaisoftwarealliance/oai-smf:latest oai-smf:august-dev -$ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:august-dev - $ docker image tag oaisoftwarealliance/oai-gnb:develop oai-gnb:develop $ docker image tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue:develop $ docker image tag oaisoftwarealliance/proxy:latest oai-lte-multi-ue-proxy:latest diff --git a/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml b/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml index 83b6ce50ae..265f130c08 100644 --- a/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml @@ -2,27 +2,16 @@ version: '3.8' services: oai-nrf: container_name: "l2sim-oai-nrf" - image: oai-nrf:august-dev + image: oaisoftwarealliance/oai-nrf:v1.5.0 environment: - NRF_INTERFACE_NAME_FOR_SBI=eth0 - - NRF_INTERFACE_PORT_FOR_SBI=80 - - NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - NRF_API_VERSION=v1 - - INSTANCE=0 - - PID_DIRECTORY=/var/run + - TZ=Europe/Paris networks: public_net: ipv4_address: 192.168.71.130 - volumes: - - ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 mysql: container_name: "l2sim-mysql" - image: mysql:5.7 + image: mysql:8.0 volumes: - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh @@ -36,17 +25,15 @@ services: test: /bin/bash -c "/tmp/mysql-healthcheck.sh" interval: 10s timeout: 5s - retries: 5 + retries: 30 networks: public_net: ipv4_address: 192.168.71.131 oai-amf: container_name: "l2sim-oai-amf" - image: oai-amf:august-dev + image: oaisoftwarealliance/oai-amf:v1.5.0 environment: - TZ=Europe/paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - MCC=208 - MNC=99 - REGION_ID=128 @@ -62,132 +49,85 @@ services: - PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_TAC=0x0001 + # Only one slice is defined (1, 0xFFFFFF). - SST_0=1 - - SD_0=0xffffff - - SST_1=1 - - SD_1=1 - AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0 + # One single SMF instance - SMF_INSTANCE_ID_0=1 - SMF_FQDN_0=oai-smf - - SMF_IPV4_ADDR_0=0.0.0.0 - - SMF_HTTP_VERSION_0=v1 + - SMF_IPV4_ADDR_0=192.168.71.133 - SELECTED_0=true - - SMF_INSTANCE_ID_1=2 - - SMF_FQDN_1=oai-smf - - SMF_IPV4_ADDR_1=0.0.0.0 - - SMF_HTTP_VERSION_1=v1 - - SELECTED_1=false + # mysql definition in AMF is mandatory in mini deployment. - MYSQL_SERVER=192.168.71.131 - MYSQL_USER=root - MYSQL_PASS=linux - MYSQL_DB=oai_db - - OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 + # NF registration - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 + - NRF_FQDN=oai-nrf - NF_REGISTRATION=yes - SMF_SELECTION=yes - USE_FQDN_DNS=yes - - NRF_API_VERSION=v1 - - NRF_FQDN=oai-nrf - - EXTERNAL_AUSF=no - - AUSF_IPV4_ADDRESS=0.0.0.0 - - AUSF_PORT=80 - - AUSF_API_VERSION=v1 - - AUSF_FQDN=localhost + - USE_HTTP2=no depends_on: - oai-nrf - mysql - volumes: - - ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh" - interval: 10s - timeout: 15s - retries: 5 networks: public_net: ipv4_address: 192.168.71.132 oai-smf: container_name: "l2sim-oai-smf" - image: oai-smf:august-dev + image: oaisoftwarealliance/oai-smf:v1.5.0 environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0 - - SMF_INTERFACE_PORT_FOR_SBI=80 - - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - SMF_API_VERSION=v1 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - - AMF_IPV4_ADDRESS=0.0.0.0 - - AMF_PORT=80 - - AMF_API_VERSION=v1 + - AMF_IPV4_ADDRESS=192.168.71.132 - AMF_FQDN=oai-amf - - UDM_IPV4_ADDRESS=127.0.0.1 - - UDM_PORT=80 - - UDM_API_VERSION=v1 - - UDM_FQDN=localhost - UPF_IPV4_ADDRESS=192.168.71.134 - UPF_FQDN_0=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf - REGISTER_NRF=yes - DISCOVER_UPF=yes - USE_FQDN_DNS=yes + - USE_LOCAL_SUBSCRIPTION_INFO=yes + - UE_MTU=1500 + # Only one slice is defined (1, 0xFFFFFF) - DNN_NI0=oai - TYPE0=IPv4 - DNN_RANGE0=12.1.1.2 - 12.1.1.127 - NSSAI_SST0=1 - - NSSAI_SD0=0xFFFFFF - SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_DL0=400Mbps - - DNN_NI2=oai.ipv4 + - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 + - ENABLE_USAGE_REPORTING=no depends_on: - oai-nrf - oai-amf - volumes: - - ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.133 oai-spgwu: container_name: "l2sim-oai-spgwu" - image: oai-spgwu-tiny:august-dev + image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 environment: - TZ=Europe/Paris - - PID_DIRECTORY=/var/run - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0 - NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_IP=12.1.1.0/24 - - SPGWC0_IP_ADDRESS=192.168.71.133 - - BYPASS_UL_PFCP_RULES=no - - MCC=208 - - MNC=99 - - MNC03=099 - - TAC=1 - - GTP_EXTENSION_HEADER_PRESENT=yes - - GW_ID=1 - - REALM=openairinterface.org - ENABLE_5G_FEATURES=yes - REGISTER_NRF=yes - USE_FQDN_NRF=yes - UPF_FQDN_5G=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf + # Only one slice is defined (1, 0xFFFFFF) - NSSAI_SST_0=1 - NSSAI_SD_0=0xffffff - DNN_0=oai @@ -200,24 +140,17 @@ services: cap_drop: - ALL privileged: true - volumes: - - ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.134 traffic_net: ipv4_address: 192.168.72.134 oai-ext-dn: - image: ubuntu:bionic privileged: true container_name: "l2sim-oai-ext-dn" + image: oaisoftwarealliance/trf-gen-cn5g:latest entrypoint: /bin/bash -c \ - "apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\ + "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" depends_on: - oai-spgwu diff --git a/ci-scripts/yaml_files/5g_rfsimulator/README.md b/ci-scripts/yaml_files/5g_rfsimulator/README.md index f75d3721da..901aa37f78 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator/README.md +++ b/ci-scripts/yaml_files/5g_rfsimulator/README.md @@ -14,7 +14,7 @@ This page is only valid for an `Ubuntu18` host. -**NOTE: this version (2022-01-27) has been updated for the `v1.3.0` version of the `OAI 5G CN`.** +**NOTE: this version (2023-01-27) has been updated for the `v1.5.0` version of the `OAI 5G CN`.** **Table of Contents** @@ -36,11 +36,12 @@ Password: Now pull images. ```bash -$ docker pull mysql:5.7 -$ docker pull oaisoftwarealliance/oai-amf:develop -$ docker pull oaisoftwarealliance/oai-nrf:develop -$ docker pull oaisoftwarealliance/oai-smf:develop -$ docker pull oaisoftwarealliance/oai-spgwu-tiny:develop +$ docker pull mysql:8.0 +$ docker pull oaisoftwarealliance/oai-amf:v1.5.0 +$ docker pull oaisoftwarealliance/oai-nrf:v1.5.0 +$ docker pull oaisoftwarealliance/oai-smf:v1.5.0 +$ docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 +$ docker pull oaisoftwarealliance/trf-gen-cn5g:latest $ docker pull oaisoftwarealliance/oai-gnb:develop $ docker pull oaisoftwarealliance/oai-nr-ue:develop @@ -49,11 +50,6 @@ $ docker pull oaisoftwarealliance/oai-nr-ue:develop And **re-tag** them for tutorials' docker-compose file to work. ```bash -$ docker image tag oaisoftwarealliance/oai-amf:latest oai-amf:august-dev -$ docker image tag oaisoftwarealliance/oai-nrf:latest oai-nrf:august-dev -$ docker image tag oaisoftwarealliance/oai-smf:latest oai-smf:august-dev -$ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:august-dev - $ docker image tag oaisoftwarealliance/oai-gnb:develop oai-gnb:develop $ docker image tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue:develop ``` @@ -62,9 +58,9 @@ $ docker image tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue:develop $ docker logout ``` -**CAUTION: 2022/01/27 with the release `v1.3.0` of the `CN5G`, the previous version was not compatible any-more.** +**CAUTION: 2023/01/27 with the release `v1.5.0` of the `CN5G`, the previous version was not compatible any-more.** -**This new version is working only with the `v1.3.0` of the `CN5G`.** +**This new version is working only with the `v1.5.0` of the `CN5G`.** # 2. Deploy containers # diff --git a/ci-scripts/yaml_files/5g_rfsimulator/amf-healthcheck.sh b/ci-scripts/yaml_files/5g_rfsimulator/amf-healthcheck.sh deleted file mode 100755 index 8bfdee2aac..0000000000 --- a/ci-scripts/yaml_files/5g_rfsimulator/amf-healthcheck.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -set -eo pipefail - -STATUS=0 -AMF_PORT_FOR_NGAP=38412 -AMF_PORT_FOR_N11_HTTP=80 -AMF_IP_NGAP_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_NGAP | grep inet | awk {'print $2'}) -AMF_IP_N11_INTERFACE=$(ifconfig $AMF_INTERFACE_NAME_FOR_N11 | grep inet | awk {'print $2'}) -N2_PORT_STATUS=$(netstat -Snpl | grep -o "$AMF_IP_NGAP_INTERFACE:$AMF_PORT_FOR_NGAP") -N11_PORT_STATUS=$(netstat -tnpl | grep -o "$AMF_IP_N11_INTERFACE:$AMF_PORT_FOR_N11_HTTP") -#Check if entrypoint properly configured the conf file and no parameter is unset (optional) -NB_UNREPLACED_AT=`cat /openair-amf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true` - -if [ $NB_UNREPLACED_AT -ne 0 ]; then - STATUS=1 - echo "Healthcheck error: configuration file is not configured properly" -fi - -if [[ -z $N2_PORT_STATUS ]]; then - STATUS=1 - echo "Healthcheck error: N2 SCTP port $AMF_PORT_FOR_NGAP is not listening" -fi - -if [[ -z $N11_PORT_STATUS ]]; then - STATUS=1 - echo "Healthcheck error: N11/SBI TCP/HTTP port $AMF_PORT_FOR_N11_HTTP is not listening" -fi - -#host="${MYSQL_SERVER}" -#user="${MYSQL_USER:-root}" -#export MYSQL_PWD="${MYSQL_PASS}" - -#args=( -# -h"$host" -# -u"$user" -# --silent -#) - -#if ! command -v mysql &> /dev/null; then -# echo "Installing mysql command" -# apt update -# apt-get -y install mysql-client -#else -# if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then -# database_check=$(mysql -h$host -u$user -D oai_db --silent -e "SELECT * FROM users;") -# if [[ -z $database_check ]]; then -# echo "Healthcheck error: oai_db not populated" -# STATUS=1 -# fi -# STATUS=0 -# else -# echo "Healthcheck error: Mysql port inactive" -# STATUS=1 -# fi -#fi - -exit $STATUS diff --git a/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml index 107ec626e2..ab78b35ab5 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml @@ -2,27 +2,16 @@ version: '3.8' services: oai-nrf: container_name: "rfsim5g-oai-nrf" - image: oai-nrf:august-dev + image: oaisoftwarealliance/oai-nrf:v1.5.0 environment: - NRF_INTERFACE_NAME_FOR_SBI=eth0 - - NRF_INTERFACE_PORT_FOR_SBI=80 - - NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - NRF_API_VERSION=v1 - - INSTANCE=0 - - PID_DIRECTORY=/var/run + - TZ=Europe/Paris networks: public_net: ipv4_address: 192.168.71.130 - volumes: - - ./nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 mysql: container_name: "rfsim5g-mysql" - image: mysql:5.7 + image: mysql:8.0 volumes: - ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh @@ -36,17 +25,15 @@ services: test: /bin/bash -c "/tmp/mysql-healthcheck.sh" interval: 10s timeout: 5s - retries: 5 + retries: 30 networks: public_net: ipv4_address: 192.168.71.131 oai-amf: container_name: "rfsim5g-oai-amf" - image: oai-amf:august-dev + image: oaisoftwarealliance/oai-amf:v1.5.0 environment: - TZ=Europe/paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - MCC=208 - MNC=99 - REGION_ID=128 @@ -62,132 +49,85 @@ services: - PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_TAC=0x0001 + # Only one slice is defined (1, 0xFFFFFF). - SST_0=1 - - SD_0=0xffffff - - SST_1=1 - - SD_1=1 - AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0 + # One single SMF instance - SMF_INSTANCE_ID_0=1 - SMF_FQDN_0=oai-smf - - SMF_IPV4_ADDR_0=0.0.0.0 - - SMF_HTTP_VERSION_0=v1 + - SMF_IPV4_ADDR_0=192.168.71.133 - SELECTED_0=true - - SMF_INSTANCE_ID_1=2 - - SMF_FQDN_1=oai-smf - - SMF_IPV4_ADDR_1=0.0.0.0 - - SMF_HTTP_VERSION_1=v1 - - SELECTED_1=false + # mysql definition in AMF is mandatory in mini deployment. - MYSQL_SERVER=192.168.71.131 - MYSQL_USER=root - MYSQL_PASS=linux - MYSQL_DB=oai_db - - OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 + # NF registration - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 + - NRF_FQDN=oai-nrf - NF_REGISTRATION=yes - SMF_SELECTION=yes - USE_FQDN_DNS=yes - - NRF_API_VERSION=v1 - - NRF_FQDN=oai-nrf - - EXTERNAL_AUSF=no - - AUSF_IPV4_ADDRESS=0.0.0.0 - - AUSF_PORT=80 - - AUSF_API_VERSION=v1 - - AUSF_FQDN=localhost + - USE_HTTP2=no depends_on: - oai-nrf - mysql - volumes: - - ./amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh" - interval: 10s - timeout: 15s - retries: 5 networks: public_net: ipv4_address: 192.168.71.132 oai-smf: container_name: "rfsim5g-oai-smf" - image: oai-smf:august-dev + image: oaisoftwarealliance/oai-smf:v1.5.0 environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0 - - SMF_INTERFACE_PORT_FOR_SBI=80 - - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - SMF_API_VERSION=v1 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - - AMF_IPV4_ADDRESS=0.0.0.0 - - AMF_PORT=80 - - AMF_API_VERSION=v1 + - AMF_IPV4_ADDRESS=192.168.71.132 - AMF_FQDN=oai-amf - - UDM_IPV4_ADDRESS=127.0.0.1 - - UDM_PORT=80 - - UDM_API_VERSION=v1 - - UDM_FQDN=localhost - UPF_IPV4_ADDRESS=192.168.71.134 - UPF_FQDN_0=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf - REGISTER_NRF=yes - DISCOVER_UPF=yes - USE_FQDN_DNS=yes + - USE_LOCAL_SUBSCRIPTION_INFO=yes + - UE_MTU=1500 + # Only one slice is defined (1, 0xFFFFFF) - DNN_NI0=oai - TYPE0=IPv4 - DNN_RANGE0=12.1.1.2 - 12.1.1.127 - NSSAI_SST0=1 - - NSSAI_SD0=0xFFFFFF - SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_DL0=400Mbps - - DNN_NI2=oai.ipv4 + - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 + - ENABLE_USAGE_REPORTING=no depends_on: - oai-nrf - oai-amf - volumes: - - ./smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.133 oai-spgwu: container_name: "rfsim5g-oai-spgwu" - image: oai-spgwu-tiny:august-dev + image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 environment: - TZ=Europe/Paris - - PID_DIRECTORY=/var/run - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0 - NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_IP=12.1.1.0/24 - - SPGWC0_IP_ADDRESS=192.168.71.133 - - BYPASS_UL_PFCP_RULES=no - - MCC=208 - - MNC=99 - - MNC03=099 - - TAC=1 - - GTP_EXTENSION_HEADER_PRESENT=yes - - GW_ID=1 - - REALM=openairinterface.org - ENABLE_5G_FEATURES=yes - REGISTER_NRF=yes - USE_FQDN_NRF=yes - UPF_FQDN_5G=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf + # Only one slice is defined (1, 0xFFFFFF) - NSSAI_SST_0=1 - NSSAI_SD_0=0xffffff - DNN_0=oai @@ -200,24 +140,16 @@ services: cap_drop: - ALL privileged: true - volumes: - - ./spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.134 traffic_net: ipv4_address: 192.168.72.134 oai-ext-dn: - image: ubuntu:bionic privileged: true container_name: rfsim5g-oai-ext-dn + image: oaisoftwarealliance/trf-gen-cn5g:latest entrypoint: /bin/bash -c \ - "apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" depends_on: @@ -234,7 +166,7 @@ services: image: oai-gnb:develop privileged: true container_name: rfsim5g-oai-gnb - environment: + environment: RFSIMULATOR: server USE_SA_TDD_MONO: 'yes' GNB_NAME: gnb-rfsim diff --git a/ci-scripts/yaml_files/5g_rfsimulator/nrf-healthcheck.sh b/ci-scripts/yaml_files/5g_rfsimulator/nrf-healthcheck.sh deleted file mode 100755 index 3479c092e8..0000000000 --- a/ci-scripts/yaml_files/5g_rfsimulator/nrf-healthcheck.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -eo pipefail - -STATUS=0 -NRF_IP_SBI_INTERFACE=$(ifconfig $NRF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'}) -NRF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$NRF_IP_SBI_INTERFACE:$NRF_INTERFACE_PORT_FOR_SBI") -#Check if entrypoint properly configured the conf file and no parameter is unset(optional) -NB_UNREPLACED_AT=`cat /openair-nrf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true` - -if [ $NB_UNREPLACED_AT -ne 0 ]; then - STATUS=1 - echo "Healthcheck error: UNHEALTHY configuration file is not configured properly" -fi - -if [[ -z $NRF_SBI_PORT_STATUS ]]; then - STATUS=1 - echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $NRF_INTERFACE_PORT_FOR_SBI is not listening." -fi - -exit $STATUS \ No newline at end of file diff --git a/ci-scripts/yaml_files/5g_rfsimulator/smf-healthcheck.sh b/ci-scripts/yaml_files/5g_rfsimulator/smf-healthcheck.sh deleted file mode 100755 index d9ff7608e8..0000000000 --- a/ci-scripts/yaml_files/5g_rfsimulator/smf-healthcheck.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -eo pipefail - -STATUS=0 -SMF_IP_SBI_INTERFACE=$(ifconfig $SMF_INTERFACE_NAME_FOR_SBI | grep inet | awk {'print $2'}) -SMF_SBI_PORT_STATUS=$(netstat -tnpl | grep -o "$SMF_IP_SBI_INTERFACE:$SMF_INTERFACE_PORT_FOR_SBI") - -#Check if entrypoint properly configured the conf file and no parameter is unset(optional) -#NB_UNREPLACED_AT=`cat /openair-smf/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true` - -#if [ $NB_UNREPLACED_AT -ne 0 ]; then -# STATUS=-1 -# echo "Healthcheck error: UNHEALTHY configuration file is not configured properly" -#fi -# -if [[ -z $SMF_SBI_PORT_STATUS ]]; then - STATUS=-1 - echo "Healthcheck error: UNHEALTHY SBI TCP/HTTP port $SMF_INTERFACE_PORT_FOR_SBI is not listening." -fi - -exit $STATUS diff --git a/ci-scripts/yaml_files/5g_rfsimulator/spgwu-healthcheck.sh b/ci-scripts/yaml_files/5g_rfsimulator/spgwu-healthcheck.sh deleted file mode 100755 index 0e3b67ee7e..0000000000 --- a/ci-scripts/yaml_files/5g_rfsimulator/spgwu-healthcheck.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -set -eo pipefail - -STATUS=0 -SGW_PORT_FOR_S1U_S12_S4_UP=2152 -SGW_PORT_FOR_SX=8805 -SGW_IP_S1U_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP | grep inet | awk {'print $2'}) -SGW_IP_SX_INTERFACE=$(ifconfig $SGW_INTERFACE_NAME_FOR_SX | grep inet | awk {'print $2'}) -S1U_S12_S4_UP_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_S1U_INTERFACE:$SGW_PORT_FOR_S1U_S12_S4_UP") -SX_PORT_STATUS=$(netstat -unpl | grep -o "$SGW_IP_SX_INTERFACE:$SGW_PORT_FOR_SX") -#Check if entrypoint properly configured the conf file and no parameter is unset (optional) -NB_UNREPLACED_AT=`cat /openair-spgwu/etc/*.conf | grep -v contact@openairinterface.org | grep -c @ || true` -if [ $NB_UNREPLACED_AT -ne 0 ]; then - STATUS=1 - echo "Healthcheck error: UNHEALTHY configuration file is not configured properly" -fi - -if [[ -z $S1U_S12_S4_UP_PORT_STATUS ]]; then - STATUS=1 - echo "Healthcheck error: UNHEALTHY S1U port $SGW_PORT_FOR_S1U_S12_S4_UP is not listening." -fi - -if [[ -z $SX_PORT_STATUS ]]; then - STATUS=1 - echo "Healthcheck error: UNHEALTHY SX port $SGW_PORT_FOR_SX is not listening." -fi - -exit $STATUS \ No newline at end of file diff --git a/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml index 683c6bd9e6..64a507e4f6 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml @@ -2,28 +2,16 @@ version: '3.8' services: oai-nrf: container_name: "rfsim5g-oai-nrf" - image: oai-nrf:august-dev + image: oaisoftwarealliance/oai-nrf:v1.5.0 environment: - NRF_INTERFACE_NAME_FOR_SBI=eth0 - - NRF_INTERFACE_PORT_FOR_SBI=80 - - NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - NRF_API_VERSION=v1 - - INSTANCE=0 - - PID_DIRECTORY=/var/run + - TZ=Europe/Paris networks: public_net: ipv4_address: 192.168.71.130 - volumes: - - ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 - mysql: container_name: "rfsim5g-mysql" - image: mysql:5.7 + image: mysql:8.0 volumes: - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh @@ -37,18 +25,15 @@ services: test: /bin/bash -c "/tmp/mysql-healthcheck.sh" interval: 10s timeout: 5s - retries: 5 + retries: 30 networks: public_net: ipv4_address: 192.168.71.131 - oai-amf: container_name: "rfsim5g-oai-amf" - image: oai-amf:august-dev + image: oaisoftwarealliance/oai-amf:v1.5.0 environment: - TZ=Europe/paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - MCC=208 - MNC=99 - REGION_ID=128 @@ -64,134 +49,85 @@ services: - PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_TAC=0x0001 + # Only one slice is defined (1, 0xFFFFFF). - SST_0=1 - - SD_0=0xffffff - - SST_1=1 - - SD_1=1 - AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0 + # One single SMF instance - SMF_INSTANCE_ID_0=1 - SMF_FQDN_0=oai-smf - - SMF_IPV4_ADDR_0=0.0.0.0 - - SMF_HTTP_VERSION_0=v1 + - SMF_IPV4_ADDR_0=192.168.71.133 - SELECTED_0=true - - SMF_INSTANCE_ID_1=2 - - SMF_FQDN_1=oai-smf - - SMF_IPV4_ADDR_1=0.0.0.0 - - SMF_HTTP_VERSION_1=v1 - - SELECTED_1=false + # mysql definition in AMF is mandatory in mini deployment. - MYSQL_SERVER=192.168.71.131 - MYSQL_USER=root - MYSQL_PASS=linux - MYSQL_DB=oai_db - - OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 + # NF registration - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 + - NRF_FQDN=oai-nrf - NF_REGISTRATION=yes - SMF_SELECTION=yes - USE_FQDN_DNS=yes - - NRF_API_VERSION=v1 - - NRF_FQDN=oai-nrf - - EXTERNAL_AUSF=no - - AUSF_IPV4_ADDRESS=0.0.0.0 - - AUSF_PORT=80 - - AUSF_API_VERSION=v1 - - AUSF_FQDN=localhost + - USE_HTTP2=no depends_on: - oai-nrf - mysql - volumes: - - ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh" - interval: 10s - timeout: 15s - retries: 5 networks: public_net: ipv4_address: 192.168.71.132 - oai-smf: container_name: "rfsim5g-oai-smf" - image: oai-smf:august-dev + image: oaisoftwarealliance/oai-smf:v1.5.0 environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0 - - SMF_INTERFACE_PORT_FOR_SBI=80 - - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - SMF_API_VERSION=v1 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - - AMF_IPV4_ADDRESS=0.0.0.0 - - AMF_PORT=80 - - AMF_API_VERSION=v1 + - AMF_IPV4_ADDRESS=192.168.71.132 - AMF_FQDN=oai-amf - - UDM_IPV4_ADDRESS=127.0.0.1 - - UDM_PORT=80 - - UDM_API_VERSION=v1 - - UDM_FQDN=localhost - UPF_IPV4_ADDRESS=192.168.71.134 - UPF_FQDN_0=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf - REGISTER_NRF=yes - DISCOVER_UPF=yes - USE_FQDN_DNS=yes + - USE_LOCAL_SUBSCRIPTION_INFO=yes + - UE_MTU=1500 + # Only one slice is defined (1, 0xFFFFFF) - DNN_NI0=oai - TYPE0=IPv4 - DNN_RANGE0=12.1.1.2 - 12.1.1.127 - NSSAI_SST0=1 - - NSSAI_SD0=0xFFFFFF - SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_DL0=400Mbps - - DNN_NI2=oai.ipv4 + - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 + - ENABLE_USAGE_REPORTING=no depends_on: - oai-nrf - oai-amf - volumes: - - ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.133 - oai-spgwu: container_name: "rfsim5g-oai-spgwu" - image: oai-spgwu-tiny:august-dev + image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 environment: - TZ=Europe/Paris - - PID_DIRECTORY=/var/run - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0 - NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_IP=12.1.1.0/24 - - SPGWC0_IP_ADDRESS=192.168.71.133 - - BYPASS_UL_PFCP_RULES=no - - MCC=208 - - MNC=99 - - MNC03=099 - - TAC=1 - - GTP_EXTENSION_HEADER_PRESENT=yes - - GW_ID=1 - - REALM=openairinterface.org - ENABLE_5G_FEATURES=yes - REGISTER_NRF=yes - USE_FQDN_NRF=yes - UPF_FQDN_5G=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf + # Only one slice is defined (1, 0xFFFFFF) - NSSAI_SST_0=1 - NSSAI_SD_0=0xffffff - DNN_0=oai @@ -204,25 +140,16 @@ services: cap_drop: - ALL privileged: true - volumes: - - ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.134 traffic_net: ipv4_address: 192.168.72.134 - oai-ext-dn: - image: ubuntu:bionic privileged: true container_name: rfsim5g-oai-ext-dn + image: oaisoftwarealliance/trf-gen-cn5g:latest entrypoint: /bin/bash -c \ - "apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" depends_on: @@ -235,7 +162,6 @@ services: interval: 10s timeout: 5s retries: 5 - oai-gnb: image: oai-gnb:develop privileged: true @@ -256,7 +182,6 @@ services: interval: 10s timeout: 5s retries: 5 - oai-nr-ue: image: oai-nr-ue:develop privileged: true diff --git a/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml index 6161f223f8..06f1dcc80e 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml @@ -2,28 +2,16 @@ version: '3.8' services: oai-nrf: container_name: "rfsim5g-oai-nrf" - image: oai-nrf:august-dev + image: oaisoftwarealliance/oai-nrf:v1.5.0 environment: - NRF_INTERFACE_NAME_FOR_SBI=eth0 - - NRF_INTERFACE_PORT_FOR_SBI=80 - - NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - NRF_API_VERSION=v1 - - INSTANCE=0 - - PID_DIRECTORY=/var/run + - TZ=Europe/Paris networks: public_net: ipv4_address: 192.168.71.130 - volumes: - - ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 - mysql: container_name: "rfsim5g-mysql" - image: mysql:5.7 + image: mysql:8.0 volumes: - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh @@ -37,18 +25,15 @@ services: test: /bin/bash -c "/tmp/mysql-healthcheck.sh" interval: 10s timeout: 5s - retries: 5 + retries: 30 networks: public_net: ipv4_address: 192.168.71.131 - oai-amf: container_name: "rfsim5g-oai-amf" - image: oai-amf:august-dev + image: oaisoftwarealliance/oai-amf:v1.5.0 environment: - TZ=Europe/paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - MCC=208 - MNC=99 - REGION_ID=128 @@ -64,134 +49,85 @@ services: - PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_TAC=0x0001 + # Only one slice is defined (1, 0xFFFFFF). - SST_0=1 - - SD_0=0xffffff - - SST_1=1 - - SD_1=1 - AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0 + # One single SMF instance - SMF_INSTANCE_ID_0=1 - SMF_FQDN_0=oai-smf - - SMF_IPV4_ADDR_0=0.0.0.0 - - SMF_HTTP_VERSION_0=v1 + - SMF_IPV4_ADDR_0=192.168.71.133 - SELECTED_0=true - - SMF_INSTANCE_ID_1=2 - - SMF_FQDN_1=oai-smf - - SMF_IPV4_ADDR_1=0.0.0.0 - - SMF_HTTP_VERSION_1=v1 - - SELECTED_1=false + # mysql definition in AMF is mandatory in mini deployment. - MYSQL_SERVER=192.168.71.131 - MYSQL_USER=root - MYSQL_PASS=linux - MYSQL_DB=oai_db - - OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 + # NF registration - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 + - NRF_FQDN=oai-nrf - NF_REGISTRATION=yes - SMF_SELECTION=yes - USE_FQDN_DNS=yes - - NRF_API_VERSION=v1 - - NRF_FQDN=oai-nrf - - EXTERNAL_AUSF=no - - AUSF_IPV4_ADDRESS=0.0.0.0 - - AUSF_PORT=80 - - AUSF_API_VERSION=v1 - - AUSF_FQDN=localhost + - USE_HTTP2=no depends_on: - oai-nrf - mysql - volumes: - - ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh" - interval: 10s - timeout: 15s - retries: 5 networks: public_net: ipv4_address: 192.168.71.132 - oai-smf: container_name: "rfsim5g-oai-smf" - image: oai-smf:august-dev + image: oaisoftwarealliance/oai-smf:v1.5.0 environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0 - - SMF_INTERFACE_PORT_FOR_SBI=80 - - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - SMF_API_VERSION=v1 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - - AMF_IPV4_ADDRESS=0.0.0.0 - - AMF_PORT=80 - - AMF_API_VERSION=v1 + - AMF_IPV4_ADDRESS=192.168.71.132 - AMF_FQDN=oai-amf - - UDM_IPV4_ADDRESS=127.0.0.1 - - UDM_PORT=80 - - UDM_API_VERSION=v1 - - UDM_FQDN=localhost - UPF_IPV4_ADDRESS=192.168.71.134 - UPF_FQDN_0=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf - REGISTER_NRF=yes - DISCOVER_UPF=yes - USE_FQDN_DNS=yes + - USE_LOCAL_SUBSCRIPTION_INFO=yes + - UE_MTU=1500 + # Only one slice is defined (1, 0xFFFFFF) - DNN_NI0=oai - TYPE0=IPv4 - DNN_RANGE0=12.1.1.2 - 12.1.1.127 - NSSAI_SST0=1 - - NSSAI_SD0=0xFFFFFF - SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_DL0=400Mbps - - DNN_NI2=oai.ipv4 + - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 + - ENABLE_USAGE_REPORTING=no depends_on: - oai-nrf - oai-amf - volumes: - - ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.133 - oai-spgwu: container_name: "rfsim5g-oai-spgwu" - image: oai-spgwu-tiny:august-dev + image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 environment: - TZ=Europe/Paris - - PID_DIRECTORY=/var/run - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0 - NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_IP=12.1.1.0/24 - - SPGWC0_IP_ADDRESS=192.168.71.133 - - BYPASS_UL_PFCP_RULES=no - - MCC=208 - - MNC=99 - - MNC03=099 - - TAC=1 - - GTP_EXTENSION_HEADER_PRESENT=yes - - GW_ID=1 - - REALM=openairinterface.org - ENABLE_5G_FEATURES=yes - REGISTER_NRF=yes - USE_FQDN_NRF=yes - UPF_FQDN_5G=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf + # Only one slice is defined (1, 0xFFFFFF) - NSSAI_SST_0=1 - NSSAI_SD_0=0xffffff - DNN_0=oai @@ -204,25 +140,16 @@ services: cap_drop: - ALL privileged: true - volumes: - - ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.134 traffic_net: ipv4_address: 192.168.72.134 - oai-ext-dn: - image: ubuntu:bionic privileged: true container_name: rfsim5g-oai-ext-dn + image: oaisoftwarealliance/trf-gen-cn5g:latest entrypoint: /bin/bash -c \ - "apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" depends_on: @@ -235,7 +162,6 @@ services: interval: 10s timeout: 5s retries: 5 - oai-gnb: image: oai-gnb:develop privileged: true diff --git a/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml index 973a687e87..51d21efc60 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml @@ -2,28 +2,16 @@ version: '3.8' services: oai-nrf: container_name: "rfsim5g-oai-nrf" - image: oai-nrf:august-dev + image: oaisoftwarealliance/oai-nrf:v1.5.0 environment: - NRF_INTERFACE_NAME_FOR_SBI=eth0 - - NRF_INTERFACE_PORT_FOR_SBI=80 - - NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - NRF_API_VERSION=v1 - - INSTANCE=0 - - PID_DIRECTORY=/var/run + - TZ=Europe/Paris networks: public_net: ipv4_address: 192.168.71.130 - volumes: - - ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 - mysql: container_name: "rfsim5g-mysql" - image: mysql:5.7 + image: mysql:8.0 volumes: - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh @@ -37,18 +25,15 @@ services: test: /bin/bash -c "/tmp/mysql-healthcheck.sh" interval: 10s timeout: 5s - retries: 5 + retries: 30 networks: public_net: ipv4_address: 192.168.71.131 - oai-amf: container_name: "rfsim5g-oai-amf" - image: oai-amf:august-dev + image: oaisoftwarealliance/oai-amf:v1.5.0 environment: - TZ=Europe/paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - MCC=208 - MNC=99 - REGION_ID=128 @@ -64,134 +49,85 @@ services: - PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_TAC=0x0001 + # Only one slice is defined (1, 0xFFFFFF). - SST_0=1 - - SD_0=0xffffff - - SST_1=1 - - SD_1=1 - AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0 + # One single SMF instance - SMF_INSTANCE_ID_0=1 - SMF_FQDN_0=oai-smf - - SMF_IPV4_ADDR_0=0.0.0.0 - - SMF_HTTP_VERSION_0=v1 + - SMF_IPV4_ADDR_0=192.168.71.133 - SELECTED_0=true - - SMF_INSTANCE_ID_1=2 - - SMF_FQDN_1=oai-smf - - SMF_IPV4_ADDR_1=0.0.0.0 - - SMF_HTTP_VERSION_1=v1 - - SELECTED_1=false + # mysql definition in AMF is mandatory in mini deployment. - MYSQL_SERVER=192.168.71.131 - MYSQL_USER=root - MYSQL_PASS=linux - MYSQL_DB=oai_db - - OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 + # NF registration - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 + - NRF_FQDN=oai-nrf - NF_REGISTRATION=yes - SMF_SELECTION=yes - USE_FQDN_DNS=yes - - NRF_API_VERSION=v1 - - NRF_FQDN=oai-nrf - - EXTERNAL_AUSF=no - - AUSF_IPV4_ADDRESS=0.0.0.0 - - AUSF_PORT=80 - - AUSF_API_VERSION=v1 - - AUSF_FQDN=localhost + - USE_HTTP2=no depends_on: - oai-nrf - mysql - volumes: - - ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh" - interval: 10s - timeout: 15s - retries: 5 networks: public_net: ipv4_address: 192.168.71.132 - oai-smf: container_name: "rfsim5g-oai-smf" - image: oai-smf:august-dev + image: oaisoftwarealliance/oai-smf:v1.5.0 environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0 - - SMF_INTERFACE_PORT_FOR_SBI=80 - - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - SMF_API_VERSION=v1 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - - AMF_IPV4_ADDRESS=0.0.0.0 - - AMF_PORT=80 - - AMF_API_VERSION=v1 + - AMF_IPV4_ADDRESS=192.168.71.132 - AMF_FQDN=oai-amf - - UDM_IPV4_ADDRESS=127.0.0.1 - - UDM_PORT=80 - - UDM_API_VERSION=v1 - - UDM_FQDN=localhost - UPF_IPV4_ADDRESS=192.168.71.134 - UPF_FQDN_0=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf - REGISTER_NRF=yes - DISCOVER_UPF=yes - USE_FQDN_DNS=yes + - USE_LOCAL_SUBSCRIPTION_INFO=yes + - UE_MTU=1500 + # Only one slice is defined (1, 0xFFFFFF) - DNN_NI0=oai - TYPE0=IPv4 - DNN_RANGE0=12.1.1.2 - 12.1.1.127 - NSSAI_SST0=1 - - NSSAI_SD0=0xFFFFFF - SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_DL0=400Mbps - - DNN_NI2=oai.ipv4 + - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 + - ENABLE_USAGE_REPORTING=no depends_on: - oai-nrf - oai-amf - volumes: - - ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.133 - oai-spgwu: container_name: "rfsim5g-oai-spgwu" - image: oai-spgwu-tiny:august-dev + image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 environment: - TZ=Europe/Paris - - PID_DIRECTORY=/var/run - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0 - NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_IP=12.1.1.0/24 - - SPGWC0_IP_ADDRESS=192.168.71.133 - - BYPASS_UL_PFCP_RULES=no - - MCC=208 - - MNC=99 - - MNC03=099 - - TAC=1 - - GTP_EXTENSION_HEADER_PRESENT=yes - - GW_ID=1 - - REALM=openairinterface.org - ENABLE_5G_FEATURES=yes - REGISTER_NRF=yes - USE_FQDN_NRF=yes - UPF_FQDN_5G=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf + # Only one slice is defined (1, 0xFFFFFF) - NSSAI_SST_0=1 - NSSAI_SD_0=0xffffff - DNN_0=oai @@ -204,25 +140,16 @@ services: cap_drop: - ALL privileged: true - volumes: - - ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: public_net: ipv4_address: 192.168.71.134 traffic_net: ipv4_address: 192.168.72.134 - oai-ext-dn: - image: ubuntu:bionic privileged: true container_name: rfsim5g-oai-ext-dn + image: oaisoftwarealliance/trf-gen-cn5g:latest entrypoint: /bin/bash -c \ - "apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity" depends_on: @@ -235,7 +162,6 @@ services: interval: 10s timeout: 5s retries: 5 - oai-gnb: image: oai-gnb:develop privileged: true From 76ed14e76c06f02d48658cb578f112b305f371d1 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 1 Feb 2023 15:41:41 +0100 Subject: [PATCH 02/12] chore(ci): using pyshark live-capture instead of launching a bg tshark Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 163 ++++++++++++++++----------------- ci-scripts/main.py | 1 + 2 files changed, 81 insertions(+), 83 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index e02d208945..2ef3e8387a 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -38,6 +38,8 @@ import os import shutil import subprocess import time +import pyshark +import threading from multiprocessing import Process, Lock, SimpleQueue from zipfile import ZipFile @@ -345,7 +347,7 @@ class Containerize(): self.dockerfileprefix = '.rhel8.2' self.cliBuildOptions = '--no-cache --disable-compression' - # we always build the ran-build image with all targets + # we always build the ran-build image with all targets imageNames = [('ran-build', 'build')] result = re.search('eNB', self.imageKind) # Creating a tupple with the imageName and the DockerFile prefix pattern on obelix @@ -739,8 +741,7 @@ class Containerize(): mySSH.command(cmd, '\$', 5) response = mySSH.getBefore() else: - logging.info(cmd) - response = subprocess.check_output(cmd, shell=True, universal_newlines=True, stderr=subprocess.STDOUT) + response = self.run_cmd_local_host(cmd) if re.search('Login Succeeded', response) is None: msg = 'Could not log into local registry' logging.error(msg) @@ -756,8 +757,7 @@ class Containerize(): mySSH.command(cmd, '\$', 120) response = mySSH.getBefore() else: - logging.info(cmd) - response = subprocess.check_output(cmd, shell=True, universal_newlines=True) + response = self.run_cmd_local_host(cmd) if re.search('Status: Downloaded newer image for |Status: Image is up to date for', response) is None: logging.debug(response) msg = f'Could not pull {image} from local registry : {tagToUse}' @@ -772,8 +772,7 @@ class Containerize(): mySSH.command(cmd, '\$', 5) response = mySSH.getBefore() else: - logging.info(cmd) - response = subprocess.check_output(cmd, shell=True, universal_newlines=True) + response = self.run_cmd_local_host(cmd) if re.search('Removing login credentials', response) is None: msg = 'Could not log off from local registry' logging.error(msg) @@ -820,8 +819,7 @@ class Containerize(): if lIpAddr != 'none': mySSH.command(cmd, '\$', 5) else: - logging.info(cmd) - subprocess.run(cmd, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + self.run_cmd_local_host(cmd) if lIpAddr != 'none': mySSH.close() @@ -921,7 +919,7 @@ class Containerize(): if healthyNb == 1: cnt = 0 while (cnt < 20): - mySSH.command('docker logs ' + containerName + ' | egrep --text --color=never -i "wait|sync|Starting"', '\$', 30) + mySSH.command('docker logs ' + containerName + ' | egrep --text --color=never -i "wait|sync|Starting"', '\$', 30) result = re.search('got sync|Starting F1AP at CU', mySSH.getBefore()) if result is None: time.sleep(6) @@ -1048,9 +1046,8 @@ class Containerize(): self.exitStatus = 0 logging.debug('\u001B[1m Checking Services to deploy\u001B[0m') cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose config --services' - logging.info(cmd) try: - listServices = subprocess.check_output(cmd, shell=True, universal_newlines=True) + listServices = self.run_cmd_local_host(cmd) except Exception as e: self.exitStatus = 1 HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK) @@ -1065,18 +1062,16 @@ class Containerize(): return cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml' - subprocess.run(cmd, shell=True) + self.run_cmd_local_host(cmd) imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru'] for image in imageNames: tagToUse = self.ImageTagToUse(image) cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml' - logging.debug(cmd) - subprocess.run(cmd, shell=True) + self.run_cmd_local_host(cmd) cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml up -d ' + self.services[0] - logging.info(cmd) try: - deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100) + deployStatus = self.run_cmd_local_host(cmd, 100) except Exception as e: self.exitStatus = 1 logging.error('Could not deploy') @@ -1087,14 +1082,17 @@ class Containerize(): cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps -a' count = 0 healthy = 0 + restarting = 0 newContainers = [] while (count < 10): count += 1 containerStatus = [] - deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) + deployStatus = self.run_cmd_local_host(cmd, 30, silent=True) healthy = 0 + restarting = 0 for state in deployStatus.split('\n'): - res = re.search('Name|----------', state) + state = state.strip() + res = re.search('Name|NAME|----------', state) if res is not None: continue if len(state) == 0: @@ -1109,23 +1107,28 @@ class Containerize(): if not found: newContainers.append(cName) self.deployedContainers.append(cName) - if re.search('Up \(healthy\)', state) is not None: + if re.search('\(healthy\)', state) is not None: healthy += 1 - if re.search('rfsim4g-db-init.*Exit 0', state) is not None: - subprocess.check_output('docker rm -f rfsim4g-db-init || true', shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) - containerStatus.append(state) - if healthy == self.nb_healthy[0]: + if re.search('rfsim4g-db-init.*Exit 0', state) is not None or re.search('rfsim4g-db-init.*Exited \(0\)', state) is not None: + self.run_cmd_local_host('docker rm -f rfsim4g-db-init || true', 30, silent=True) + if re.search('Restarting', state) is None: + containerStatus.append(state) + else: + restarting += 1 + if healthy == self.nb_healthy[0] and restarting == 0: count = 100 else: time.sleep(10) imagesInfo = '' for newCont in newContainers: + if newCont == 'rfsim4g-db-init': + continue cmd = 'docker inspect -f "{{.Config.Image}}" ' + newCont - imageName = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) + imageName = self.run_cmd_local_host(cmd, 30, silent=True) imageName = str(imageName).strip() cmd = 'docker image inspect --format "{{.RepoTags}}\t{{.Size}} bytes\t{{.Created}}\t{{.Id}}" ' + imageName - imagesInfo += subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30) + imagesInfo += self.run_cmd_local_host(cmd, 30, silent=True) html_queue = SimpleQueue() html_cell = '
\n'
@@ -1157,30 +1160,36 @@ class Containerize():
 			self.UndeployGenObject(HTML, RAN, UE)
 			self.exitStatus = 1
 
+	def LaunchPySharkCapture(self, lIfs, lFilter, loFile):
+		capture = pyshark.LiveCapture(interface=lIfs, bpf_filter=lFilter, output_file=loFile, debug=False)
+		for packet in capture.sniff_continuously():
+			pass
+
 	def CaptureOnDockerNetworks(self):
 		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml config | grep com.docker.network.bridge.name | sed -e "s@^.*name: @@"'
-		networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+		networkNames = self.run_cmd_local_host(cmd, silent=True)
 		if re.search('4g.*rfsimulator', self.yamlPath[0]) is not None:
 			# Excluding any traffic from LTE-UE container (192.168.61.30)
 			# From the trf-gen, keeping only PING traffic
-			cmd = 'sudo nohup tshark -f "(host 192.168.61.11 and icmp) or (not host 192.168.61.11 and not host 192.168.61.30 and not arp and not port 53 and not port 2152)"'
+			capture_filter = '(host 192.168.61.11 and icmp) or (not host 192.168.61.11 and not host 192.168.61.30 and not arp and not port 53 and not port 2152)'
 		elif re.search('5g.*rfsimulator', self.yamlPath[0]) is not None:
 			# Excluding any traffic from NR-UE containers (192.168.71.150 and 192.168.71.151)
 			# From the ext-dn, keeping only PING traffic
-			cmd = 'sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not host 192.168.71.150 and not host 192.168.71.151 and not arp and not port 53 and not port 2152 and not port 2153)"'
+			capture_filter = '(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not host 192.168.71.150 and not host 192.168.71.151 and not arp and not port 53 and not port 2152 and not port 2153)'
 		elif re.search('5g_l2sim', self.yamlPath[0]) is not None:
-			cmd = 'sudo nohup tshark -f "(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not arp and not port 53 and not port 2152 and not port 2153)"'
+			capture_filter = '(host 192.168.72.135 and icmp) or (not host 192.168.72.135 and not arp and not port 53 and not port 2152 and not port 2153)'
 		else:
 			return
+		interfaces = []
 		for name in networkNames.split('\n'):
 			if re.search('rfsim', name) is not None or re.search('l2sim', name) is not None:
-				cmd += ' -i ' + name
-		cmd += ' -w /tmp/capture_'
+				interfaces.append(name)
 		ymlPath = self.yamlPath[0].split('/')
-		cmd += ymlPath[1] + '.pcap > /tmp/tshark.log 2>&1 &'
-		logging.info(cmd)
-		networkNames = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+		output_file = f'/tmp/capture_{ymlPath[1]}.pcap'
 		self.tsharkStarted = True
+		x = threading.Thread(target = self.LaunchPySharkCapture, args = (interfaces,capture_filter,output_file,))
+		x.daemon = True
+		x.start()
 
 	def UndeployGenObject(self, HTML, RAN, UE):
 		self.exitStatus = 0
@@ -1188,25 +1197,22 @@ class Containerize():
 		logPath = '../cmake_targets/log/' + ymlPath[1]
 
 		cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
-		logging.info(cmd)
-		subprocess.run(cmd, shell=True)
+		self.run_cmd_local_host(cmd)
 		imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
 		for image in imageNames:
 			tagToUse = self.ImageTagToUse(image)
 			cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml'
-			subprocess.run(cmd, shell=True)
+			self.run_cmd_local_host(cmd)
 
 		# check which containers are running for log recovery later
 		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
-		logging.info(cmd)
-		deployStatusLogs = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
+		deployStatusLogs = self.run_cmd_local_host(cmd, 30)
 
 		# Stop the containers to shut down objects
 		logging.debug('\u001B[1m Stopping containers \u001B[0m')
 		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml stop -t3'
-		logging.info(cmd)
 		try:
-			deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
+			deployStatus = self.run_cmd_local_host(cmd, 100)
 		except Exception as e:
 			self.exitStatus = 1
 			logging.error('Could not stop containers')
@@ -1216,7 +1222,7 @@ class Containerize():
 
 		anyLogs = False
 		for state in deployStatusLogs.split('\n'):
-			res = re.search('Name|----------', state)
+			res = re.search('Name|NAME|----------', state)
 			if res is not None:
 				continue
 			if len(state) == 0:
@@ -1226,17 +1232,14 @@ class Containerize():
 				anyLogs = True
 				cName = res.group('container_name')
 				cmd = 'cd ' + self.yamlPath[0] + ' && docker logs ' + cName + ' > ' + cName + '.log 2>&1'
-				logging.info(cmd)
-				subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
+				self.run_cmd_local_host(cmd, 30)
 				if re.search('magma-mme', cName) is not None:
 					cmd = 'cd ' + self.yamlPath[0] + ' && docker cp -L ' + cName + ':/var/log/mme.log ' + cName + '-full.log'
-					logging.info(cmd)
-					subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
+					self.run_cmd_local_host(cmd, 30)
 		fullStatus = True
 		if anyLogs:
 			cmd = 'mkdir -p '+ logPath + ' && cp ' + self.yamlPath[0] + '/*.log ' + logPath
-			logging.info(cmd)
-			deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+			deployStatus = self.run_cmd_local_host(cmd)
 
 			# Analyzing log file(s)!
 			listOfPossibleRanContainers = ['enb', 'gnb', 'cu', 'du']
@@ -1245,7 +1248,7 @@ class Containerize():
 				cmd = 'ls ' + filenames
 				containerStatus = True
 				try:
-					lsStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+					lsStatus = self.run_cmd_local_host(cmd, silent=True)
 					filenames = str(lsStatus).strip()
 				except:
 					containerStatus = False
@@ -1268,7 +1271,7 @@ class Containerize():
 				cmd = 'ls ' + filenames
 				containerStatus = True
 				try:
-					lsStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+					lsStatus = self.run_cmd_local_host(cmd, silent=True)
 					filenames = str(lsStatus).strip()
 				except:
 					containerStatus = False
@@ -1285,27 +1288,20 @@ class Containerize():
 						HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK)
 
 			cmd = 'rm ' + self.yamlPath[0] + '/*.log'
-			logging.info(cmd)
-			deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+			deployStatus = self.run_cmd_local_host(cmd)
 			if self.tsharkStarted:
 				self.tsharkStarted = True
+				cmd = 'killall tshark || true'
+				self.run_cmd_local_host(cmd)
 				ymlPath = self.yamlPath[0].split('/')
-				cmd = 'sudo chmod 666 /tmp/capture_' + ymlPath[1] + '.pcap'
-				logging.info(cmd)
-				copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
-				cmd = 'cp /tmp/capture_' + ymlPath[1] + '.pcap ' + logPath
-				logging.info(cmd)
-				copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
-				cmd = 'sudo rm /tmp/capture_' + ymlPath[1] + '.pcap'
-				logging.info(cmd)
-				copyStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+				cmd = 'mv /tmp/capture_' + ymlPath[1] + '.pcap ' + logPath + ' || true'
+				copyStatus = self.run_cmd_local_host(cmd, 100)
 				self.tsharkStarted = False
 
 		logging.debug('\u001B[1m Undeploying \u001B[0m')
 		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml down'
-		logging.info(cmd)
 		try:
-			deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
+			deployStatus = self.run_cmd_local_host(cmd, 100)
 		except Exception as e:
 			self.exitStatus = 1
 			logging.error('Could not undeploy')
@@ -1316,8 +1312,7 @@ class Containerize():
 		self.deployedContainers = []
 		# Cleaning any created tmp volume
 		cmd = 'docker volume prune --force || true'
-		logging.info(cmd)
-		deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
+		deployStatus = self.run_cmd_local_host(cmd, 100)
 
 		if fullStatus:
 			HTML.CreateHtmlTestRow('n/a', 'OK', CONST.ALL_PROCESSES_OK)
@@ -1333,12 +1328,11 @@ class Containerize():
 
 		# if the containers are running, recover the logs!
 		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
-		logging.info(cmd)
-		deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
+		deployStatus = self.run_cmd_local_host(cmd, 30)
 		cmd = 'docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}" '
 		anyLogs = False
 		for state in deployStatus.split('\n'):
-			res = re.search('Name|----------', state)
+			res = re.search('Name|NAME|----------', state)
 			if res is not None:
 				continue
 			if len(state) == 0:
@@ -1349,8 +1343,7 @@ class Containerize():
 				cmd += res.group('container_name') + ' '
 		message = ''
 		if anyLogs:
-			logging.info(cmd)
-			stats = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
+			stats = self.run_cmd_local_host(cmd, 30)
 			for statLine in stats.split('\n'):
 				logging.debug(statLine)
 				message += statLine + '\n'
@@ -1365,12 +1358,11 @@ class Containerize():
 		ymlPath = self.yamlPath[0].split('/')
 		logPath = '../cmake_targets/log/' + ymlPath[1]
 		cmd = 'mkdir -p ' + logPath
-		deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+		deployStatus = self.run_cmd_local_host(cmd, silent=True)
 
 		cmd = 'docker exec ' + self.pingContName + ' /bin/bash -c "ping ' + self.pingOptions + '" 2>&1 | tee ' + logPath + '/ping_' + HTML.testCase_id + '.log || true'
 
-		logging.info(cmd)
-		deployStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
+		deployStatus = self.run_cmd_local_host(cmd, 100)
 
 		result = re.search(', (?P[0-9\.]+)% packet loss, time [0-9\.]+ms', deployStatus)
 		if result is None:
@@ -1440,28 +1432,24 @@ class Containerize():
 		ymlPath = self.yamlPath[0].split('/')
 		logPath = '../cmake_targets/log/' + ymlPath[1]
 		cmd = 'mkdir -p ' + logPath
-		logStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+		logStatus = self.run_cmd_local_host(cmd, silent=True)
 
 		# Start the server process
 		cmd = f'docker exec -d {self.svrContName} /bin/bash -c "nohup iperf {self.svrOptions} > /tmp/iperf_server.log 2>&1"'
-		logging.info(cmd)
-		subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+		self.run_cmd_local_host(cmd)
 		time.sleep(3)
 
 		# Start the client process
 		cmd = f'docker exec {self.cliContName} /bin/bash -c "iperf {self.cliOptions}" 2>&1 | tee {logPath}/iperf_client_{HTML.testCase_id}.log'
-		logging.info(cmd)
-		clientStatus = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=100)
+		clientStatus = self.run_cmd_local_host(cmd, 100)
 
 		# Stop the server process
 		cmd = f'docker exec {self.svrContName} /bin/bash -c "pkill iperf"'
-		logging.info(cmd)
-		subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=10)
+		self.run_cmd_local_host(cmd)
 		time.sleep(3)
 		serverStatusFilename = f'{logPath}/iperf_server_{HTML.testCase_id}.log'
 		cmd = f'docker cp {self.svrContName}:/tmp/iperf_server.log {serverStatusFilename}'
-		logging.info(cmd)
-		subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True, timeout=30)
+		self.run_cmd_local_host(cmd, 30)
 
 		# clientStatus was retrieved above. The serverStatus was
 		# written in the background, then copied to the local machine
@@ -1604,3 +1592,12 @@ class Containerize():
 				mySSH.command('echo ' + password + ' | sudo -S iptables -P FORWARD ACCEPT', '\$', 10)
 			mySSH.close()
 
+	def run_cmd_local_host(self, lCmd, lTimeout=10, silent=False):
+		if not silent:
+			logging.info(lCmd)
+		result = subprocess.run(lCmd, shell=True, check=True,
+								universal_newlines=True,
+								stdout=subprocess.PIPE,
+								stderr=subprocess.STDOUT,
+								timeout=lTimeout)
+		return str(result.stdout)
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index 322b6a5c72..438f310ca8 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -70,6 +70,7 @@ import subprocess
 from multiprocessing import Process, Lock, SimpleQueue
 logging.basicConfig(
 	level=logging.DEBUG,
+	stream=sys.stdout,
 	format="[%(asctime)s] %(levelname)8s: %(message)s"
 )
 

From 6905159a3829420ee65a502d5d5bb8480ab3581f Mon Sep 17 00:00:00 2001
From: Raphael Defosseux 
Date: Thu, 2 Feb 2023 10:37:04 +0100
Subject: [PATCH 03/12] chore(ci): applying the same image syntax with
 oaisoftwarealliance/ for RAN components

Signed-off-by: Raphael Defosseux 
---
 ci-scripts/cls_containerize.py                    | 15 +++++++++------
 .../yaml_files/4g_l2sim_fdd/docker-compose.yml    |  6 +++---
 .../yaml_files/4g_rfsimulator_fdd_05MHz/README.md |  3 ---
 .../4g_rfsimulator_fdd_05MHz/docker-compose.yml   |  4 ++--
 .../docker-compose.yml                            |  4 ++--
 .../4g_rfsimulator_fdd_10MHz/docker-compose.yml   |  4 ++--
 .../4g_rfsimulator_fdd_20MHz/docker-compose.yml   |  4 ++--
 .../4g_rfsimulator_fembms/docker-compose.yml      |  4 ++--
 .../4g_rfsimulator_mbms/docker-compose.yml        |  4 ++--
 .../4g_rfsimulator_tdd_05MHz/docker-compose.yml   |  4 ++--
 .../5g_f1_rfsimulator/docker-compose.yaml         |  6 +++---
 .../5g_fdd_rfsimulator/docker-compose.yaml        |  4 ++--
 ci-scripts/yaml_files/5g_l2sim_tdd/README.md      |  6 ++----
 .../yaml_files/5g_l2sim_tdd/docker-compose.yaml   |  4 ++--
 ci-scripts/yaml_files/5g_rfsimulator/README.md    |  7 -------
 .../yaml_files/5g_rfsimulator/docker-compose.yaml |  6 +++---
 .../5g_rfsimulator_24prb/docker-compose.yaml      |  4 ++--
 .../5g_rfsimulator_2x2/docker-compose.yaml        |  4 ++--
 .../docker-compose.yaml                           |  4 ++--
 .../5g_rfsimulator_fr2_32prb/docker-compose.yaml  |  4 ++--
 .../5g_rfsimulator_tdd_dora/docker-compose.yaml   |  4 ++--
 .../5g_rfsimulator_u0_25prb/docker-compose.yaml   |  4 ++--
 22 files changed, 50 insertions(+), 59 deletions(-)

diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py
index 2ef3e8387a..ca98b967a0 100644
--- a/ci-scripts/cls_containerize.py
+++ b/ci-scripts/cls_containerize.py
@@ -289,6 +289,7 @@ class Containerize():
 
 		self.deployedContainers = []
 		self.tsharkStarted = False
+		self.displayedNewTags = False
 		self.pingContName = ''
 		self.pingOptions = ''
 		self.pingLossThreshold = ''
@@ -1062,12 +1063,13 @@ class Containerize():
 			return
 
 		cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
-		self.run_cmd_local_host(cmd)
+		self.run_cmd_local_host(cmd, silent=self.displayedNewTags)
 		imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
 		for image in imageNames:
 			tagToUse = self.ImageTagToUse(image)
-			cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml'
-			self.run_cmd_local_host(cmd)
+			cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml'
+			self.run_cmd_local_host(cmd, silent=self.displayedNewTags)
+		silent=self.displayedNewTags = True
 
 		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml up -d ' + self.services[0]
 		try:
@@ -1197,12 +1199,13 @@ class Containerize():
 		logPath = '../cmake_targets/log/' + ymlPath[1]
 
 		cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
-		self.run_cmd_local_host(cmd)
+		self.run_cmd_local_host(cmd, silent=self.displayedNewTags)
 		imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
 		for image in imageNames:
 			tagToUse = self.ImageTagToUse(image)
-			cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@{image}:develop@{tagToUse}@" docker-compose-ci.yml'
-			self.run_cmd_local_host(cmd)
+			cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml'
+			self.run_cmd_local_host(cmd, silent=self.displayedNewTags)
+		silent=self.displayedNewTags = True
 
 		# check which containers are running for log recovery later
 		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
diff --git a/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml b/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml
index b3e3ede92e..546211e5b3 100644
--- a/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml
@@ -180,7 +180,7 @@ services:
             retries: 5
 
     oai_enb:
-        image: oai-enb:develop
+        image: oaisoftwarealliance/oai-enb:develop
         privileged: true
         container_name: l2sim4g-oai-enb
         network_mode: "host"
@@ -230,7 +230,7 @@ services:
             retries: 5
 
     oai_ue1:
-        image: oai-lte-ue:develop
+        image: oaisoftwarealliance/oai-lte-ue:develop
         privileged: true
         container_name: l2sim4g-oai-lte-ue1
         network_mode: "host"
@@ -258,7 +258,7 @@ services:
             retries: 5
 
     oai_ue2:
-        image: oai-lte-ue:develop
+        image: oaisoftwarealliance/oai-lte-ue:develop
         privileged: true
         container_name: l2sim4g-oai-lte-ue2
         network_mode: "host"
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
index d134ffc824..d47c4842de 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md
@@ -54,9 +54,6 @@ $ docker image tag oaisoftwarealliance/oai-spgwc:latest oai-spgwc:latest
 $ docker image tag oaisoftwarealliance/oai-hss:latest oai-hss:latest
 $ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:latest 
 $ docker image tag oaisoftwarealliance/magma-mme:latest magma-mme:latest
-
-$ docker image tag oaisoftwarealliance/oai-enb:develop oai-enb:develop
-$ docker image tag oaisoftwarealliance/oai-lte-ue:develop oai-lte-ue:develop
 ```
 
 ```bash
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml
index ab54c3ada1..18f929a6e8 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml
@@ -180,7 +180,7 @@ services:
             retries: 5
 
     oai_enb0:
-        image: oai-enb:develop
+        image: oaisoftwarealliance/oai-enb:develop
         privileged: true
         container_name: rfsim4g-oai-enb
         networks:
@@ -214,7 +214,7 @@ services:
             retries: 5
 
     oai_ue0:
-        image: oai-lte-ue:develop
+        image: oaisoftwarealliance/oai-lte-ue:develop
         privileged: true
         container_name: rfsim4g-oai-lte-ue0
         networks:
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml
index dea6724926..39c9394769 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml
@@ -2,7 +2,7 @@ version: '3.8'
 
 services:
     oai_enb0:
-        image: oai-enb:develop
+        image: ioaisoftwarealliance/oai-enb:develop
         privileged: true
         container_name: rfsim4g-oai-enb
         networks:
@@ -36,7 +36,7 @@ services:
             retries: 5
 
     oai_ue0:
-        image: oai-lte-ue:develop
+        image: oaisoftwarealliance/oai-lte-ue:develop
         privileged: true
         container_name: rfsim4g-oai-lte-ue0
         networks:
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml
index b24ebd367d..3f9d764f3a 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml
@@ -180,7 +180,7 @@ services:
             retries: 5
 
     oai_enb0:
-        image: oai-enb:develop
+        image: oaisoftwarealliance/oai-enb:develop
         privileged: true
         container_name: rfsim4g-oai-enb
         networks:
@@ -214,7 +214,7 @@ services:
             retries: 5
 
     oai_ue0:
-        image: oai-lte-ue:develop
+        image: oaisoftwarealliance/oai-lte-ue:develop
         privileged: true
         container_name: rfsim4g-oai-lte-ue0
         networks:
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml
index ebe2b2f4a0..6cf8ee2677 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml
@@ -180,7 +180,7 @@ services:
             retries: 5
 
     oai_enb0:
-        image: oai-enb:develop
+        image: oaisoftwarealliance/oai-enb:develop
         privileged: true
         container_name: rfsim4g-oai-enb
         networks:
@@ -214,7 +214,7 @@ services:
             retries: 5
 
     oai_ue0:
-        image: oai-lte-ue:develop
+        image: oaisoftwarealliance/oai-lte-ue:develop
         privileged: true
         container_name: rfsim4g-oai-lte-ue0
         networks:
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fembms/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fembms/docker-compose.yml
index 39d06f1651..f57b913daf 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_fembms/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_fembms/docker-compose.yml
@@ -2,7 +2,7 @@ version: '3.8'
 
 services:
     oai_enb0:
-        image: oai-enb:develop
+        image: oaisoftwarealliance/oai-enb:develop
         privileged: true
         container_name: rfsim4g-oai-enb
         networks:
@@ -22,7 +22,7 @@ services:
             retries: 5
 
     oai_ue0:
-        image: oai-lte-ue:develop
+        image: oaisoftwarealliance/oai-lte-ue:develop
         privileged: true
         container_name: rfsim4g-oai-lte-ue0
         networks:
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_mbms/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_mbms/docker-compose.yml
index dc64984068..98cb6d5d53 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_mbms/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_mbms/docker-compose.yml
@@ -2,7 +2,7 @@ version: '3.8'
 
 services:
     oai_enb0:
-        image: oai-enb:develop
+        image: oaisoftwarealliance/oai-enb:develop
         privileged: true
         container_name: rfsim4g-oai-enb
         networks:
@@ -22,7 +22,7 @@ services:
             retries: 5
 
     oai_ue0:
-        image: oai-lte-ue:develop
+        image: oaisoftwarealliance/oai-lte-ue:develop
         privileged: true
         container_name: rfsim4g-oai-lte-ue0
         networks:
diff --git a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml
index 63c4965ddb..b3182ba23b 100644
--- a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml
+++ b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml
@@ -180,7 +180,7 @@ services:
             retries: 5
 
     oai_enb0:
-        image: oai-enb:develop
+        image: oaisoftwarealliance/oai-enb:develop
         privileged: true
         container_name: rfsim4g-oai-enb
         networks:
@@ -213,7 +213,7 @@ services:
             retries: 5
 
     oai_ue0:
-        image: oai-lte-ue:develop
+        image: oaisoftwarealliance/oai-lte-ue:develop
         privileged: true
         container_name: rfsim4g-oai-lte-ue0
         networks:
diff --git a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml
index d9d97670d3..a364a1db95 100644
--- a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml
@@ -163,7 +163,7 @@ services:
             timeout: 5s
             retries: 5
     oai-cu:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: rfsim5g-oai-cu
         environment: 
@@ -197,7 +197,7 @@ services:
             timeout: 5s
             retries: 5
     oai-du:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: rfsim5g-oai-du
         environment: 
@@ -231,7 +231,7 @@ services:
             timeout: 5s
             retries: 5
     oai-nr-ue:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment: 
diff --git a/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml
index c3c3797125..42d67b0bdc 100644
--- a/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml
@@ -163,7 +163,7 @@ services:
             timeout: 5s
             retries: 5
     oai-gnb:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: rfsim5g-oai-gnb
         environment: 
@@ -192,7 +192,7 @@ services:
             timeout: 5s
             retries: 5
     oai-nr-ue:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment: 
diff --git a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md
index adbb6edd44..eb8e58d415 100644
--- a/ci-scripts/yaml_files/5g_l2sim_tdd/README.md
+++ b/ci-scripts/yaml_files/5g_l2sim_tdd/README.md
@@ -41,15 +41,13 @@ $ docker pull oaisoftwarealliance/trf-gen-cn5g:latest
 
 $ docker pull oaisoftwarealliance/oai-gnb:develop
 $ docker pull oaisoftwarealliance/oai-nr-ue:develop
-$ docker pull oaisoftwarealliance/proxy:latest
+$ docker pull oaisoftwarealliance/proxy:develop
 ```
 
 And **re-tag** them for tutorials' docker-compose file to work.
 
 ```bash
-$ docker image tag oaisoftwarealliance/oai-gnb:develop oai-gnb:develop
-$ docker image tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue:develop
-$ docker image tag oaisoftwarealliance/proxy:latest oai-lte-multi-ue-proxy:latest
+$ docker image tag oaisoftwarealliance/proxy:develop oai-lte-multi-ue-proxy:latest
 ```
 
 ```bash
diff --git a/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml b/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml
index 265f130c08..3af3bc60cf 100644
--- a/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml
@@ -163,7 +163,7 @@ services:
             timeout: 5s
             retries: 5
     oai-gnb:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: "l2sim-oai-gnb"
         network_mode: "host"
@@ -211,7 +211,7 @@ services:
             retries: 5
 
     oai-nr-ue0:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: "l2sim-oai-nr-ue0"
         network_mode: "host"
diff --git a/ci-scripts/yaml_files/5g_rfsimulator/README.md b/ci-scripts/yaml_files/5g_rfsimulator/README.md
index 901aa37f78..1e2cb638eb 100644
--- a/ci-scripts/yaml_files/5g_rfsimulator/README.md
+++ b/ci-scripts/yaml_files/5g_rfsimulator/README.md
@@ -47,13 +47,6 @@ $ docker pull oaisoftwarealliance/oai-gnb:develop
 $ docker pull oaisoftwarealliance/oai-nr-ue:develop
 ```
 
-And **re-tag** them for tutorials' docker-compose file to work.
-
-```bash
-$ docker image tag oaisoftwarealliance/oai-gnb:develop oai-gnb:develop
-$ docker image tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue:develop
-```
-
 ```bash
 $ docker logout
 ```
diff --git a/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml
index ab78b35ab5..bc271e0643 100644
--- a/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml
@@ -163,7 +163,7 @@ services:
             timeout: 5s
             retries: 5
     oai-gnb:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: rfsim5g-oai-gnb
         environment:
@@ -193,7 +193,7 @@ services:
             timeout: 5s
             retries: 5
     oai-nr-ue:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment: 
@@ -216,7 +216,7 @@ services:
             retries: 5
 
     oai-nr-ue2:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: rfsim5g-oai-nr-ue2
         environment: 
diff --git a/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml
index 64a507e4f6..a298c21748 100644
--- a/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml
@@ -163,7 +163,7 @@ services:
             timeout: 5s
             retries: 5
     oai-gnb:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: rfsim5g-oai-gnb
         environment:
@@ -183,7 +183,7 @@ services:
             timeout: 5s
             retries: 5
     oai-nr-ue:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment:
diff --git a/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml
index 06f1dcc80e..d33738e2f7 100644
--- a/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml
@@ -163,7 +163,7 @@ services:
             timeout: 5s
             retries: 5
     oai-gnb:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: rfsim5g-oai-gnb
         environment:
@@ -184,7 +184,7 @@ services:
             retries: 5
 
     oai-nr-ue:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment:
diff --git a/ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest/docker-compose.yaml
index 1487aa26c0..dbab2002a7 100644
--- a/ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest/docker-compose.yaml
@@ -1,7 +1,7 @@
 version: '3.8'
 services:
     oai-gnb:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: rfsim5g-oai-gnb
         environment:
@@ -21,7 +21,7 @@ services:
             retries: 5
 
     oai-nr-ue:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment:
diff --git a/ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb/docker-compose.yaml
index 11264e5348..2705a69f10 100644
--- a/ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb/docker-compose.yaml
@@ -1,7 +1,7 @@
 version: '3.8'
 services:
     oai-gnb:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: rfsim5g-oai-gnb
         environment:
@@ -21,7 +21,7 @@ services:
             retries: 5
 
     oai-nr-ue:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment:
diff --git a/ci-scripts/yaml_files/5g_rfsimulator_tdd_dora/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_tdd_dora/docker-compose.yaml
index 9f080478c7..2afa9027f3 100644
--- a/ci-scripts/yaml_files/5g_rfsimulator_tdd_dora/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_rfsimulator_tdd_dora/docker-compose.yaml
@@ -1,7 +1,7 @@
 version: '3.8'
 services:
     oai-gnb:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: rfsim5g-oai-gnb
         environment:
@@ -21,7 +21,7 @@ services:
             retries: 5
 
     oai-nr-ue:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment:
diff --git a/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml
index 51d21efc60..e6e525389b 100644
--- a/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml
+++ b/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml
@@ -163,7 +163,7 @@ services:
             timeout: 5s
             retries: 5
     oai-gnb:
-        image: oai-gnb:develop
+        image: oaisoftwarealliance/oai-gnb:develop
         privileged: true
         container_name: rfsim5g-oai-gnb
         environment:
@@ -184,7 +184,7 @@ services:
             retries: 5
 
     oai-nr-ue:
-        image: oai-nr-ue:develop
+        image: oaisoftwarealliance/oai-nr-ue:develop
         privileged: true
         container_name: rfsim5g-oai-nr-ue
         environment:

From 43a2ae004094a12b5820294f54c537ebfc2c1032 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux 
Date: Fri, 3 Feb 2023 10:24:55 +0100
Subject: [PATCH 04/12] style(ci): using and debugging the new LocalCmd class

Signed-off-by: Raphael Defosseux 
---
 ci-scripts/cls_cmd.py          |  17 +--
 ci-scripts/cls_containerize.py | 253 +++++++++++++++------------------
 2 files changed, 124 insertions(+), 146 deletions(-)

diff --git a/ci-scripts/cls_cmd.py b/ci-scripts/cls_cmd.py
index 12eb75e7da..cd7716bc16 100644
--- a/ci-scripts/cls_cmd.py
+++ b/ci-scripts/cls_cmd.py
@@ -74,32 +74,27 @@ class Cmd(metaclass=abc.ABCMeta):
 class LocalCmd(Cmd):
 	def __init__(self, d = None):
 		self.cwd = d
+		if self.cwd is not None:
+			logging.debug(f'Working dir will be {self.cwd}')
 		self.cp = sp.CompletedProcess(args='', returncode=0, stdout='')
 
 	def run(self, line, timeout=300, silent=False, reportNonZero=True):
-		if type(line) is str:
-			line = [s for s in line.split(' ') if len(s) > 0]
 		if not silent:
-			logging.debug(' '.join(line))
+			logging.info(line)
 		try:
-			ret = sp.run(line, cwd=self.cwd, stdout=sp.PIPE, stderr=sp.STDOUT, timeout=timeout)
+			ret = sp.run(line, shell=True, cwd=self.cwd, stdout=sp.PIPE, stderr=sp.STDOUT, timeout=timeout)
 		except Exception as e:
 			ret = sp.CompletedProcess(args=line, returncode=255, stdout=f'Exception: {str(e)}'.encode('utf-8'))
 		if ret.stdout is None:
 			ret.stdout = b''
 		ret.stdout = ret.stdout.decode('utf-8').strip()
 		if reportNonZero and ret.returncode != 0:
-			cmd = ' '.join(ret.args)
-			logging.warning(f'command "{cmd}" returned non-zero returncode {ret.returncode}: output:\n{ret.stdout}')
+			logging.warning(f'command "{ret.args}" returned non-zero returncode {ret.returncode}: output:\n{ret.stdout}')
 		self.cp = ret
 		return ret
 
 	def command(self, commandline, expectedline=None, timeout=300, silent=False, resync=False):
-		line = [s for s in commandline.split(' ') if len(s) > 0]
-		if line[0] == 'cd':
-			self.cd(line[1], silent)
-		else:
-			self.run(line, timeout, silent)
+		self.run(commandline, timeout, silent)
 		return 0
 
 	def close(self):
diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py
index ca98b967a0..44c90c994f 100644
--- a/ci-scripts/cls_containerize.py
+++ b/ci-scripts/cls_containerize.py
@@ -40,6 +40,7 @@ import subprocess
 import time
 import pyshark
 import threading
+import cls_cmd
 from multiprocessing import Process, Lock, SimpleQueue
 from zipfile import ZipFile
 
@@ -732,57 +733,42 @@ class Containerize():
 			sys.exit('Insufficient Parameter')
 		if lIpAddr != 'none':
 			logging.debug('Pulling images onto server: ' + lIpAddr)
-			mySSH = SSH.SSHConnection()
-			mySSH.open(lIpAddr, lUserName, lPassWord)
+			myCmd = cls_cmd.RemoteCmd(lIpAddr)
 		else:
 			logging.debug('Pulling images locally')
+			myCmd = cls_cmd.LocalCmd()
 
 		cmd = 'docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr'
-		if lIpAddr != 'none':
-			mySSH.command(cmd, '\$', 5)
-			response = mySSH.getBefore()
-		else:
-			response = self.run_cmd_local_host(cmd)
-		if re.search('Login Succeeded', response) is None:
+		response = myCmd.run(cmd)
+		if re.search('Login Succeeded', response.stdout) is None:
 			msg = 'Could not log into local registry'
 			logging.error(msg)
-			if lIpAddr != 'none':
-				mySSH.close()
+			myCmd.close()
 			HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
 			return False
 
 		for image in self.imageToPull:
 			tagToUse = self.ImageTagToUse(image)
 			cmd = f'docker pull {tagToUse}'
-			if lIpAddr != 'none':
-				mySSH.command(cmd, '\$', 120)
-				response = mySSH.getBefore()
-			else:
-				response = self.run_cmd_local_host(cmd)
-			if re.search('Status: Downloaded newer image for |Status: Image is up to date for', response) is None:
+			response = myCmd.run(cmd, timeout=120)
+			if re.search('Status: Downloaded newer image for |Status: Image is up to date for', response.stdout) is None:
 				logging.debug(response)
 				msg = f'Could not pull {image} from local registry : {tagToUse}'
 				logging.error(msg)
-				if lIpAddr != 'none':
-					mySSH.close()
+				myCmd.close()
 				HTML.CreateHtmlTestRow('msg', 'KO', CONST.ALL_PROCESSES_OK)
 				return False
 
 		cmd = 'docker logout porcepix.sboai.cs.eurecom.fr'
-		if lIpAddr != 'none':
-			mySSH.command(cmd, '\$', 5)
-			response = mySSH.getBefore()
-		else:
-			response = self.run_cmd_local_host(cmd)
-		if re.search('Removing login credentials', response) is None:
+		response = myCmd.run(cmd)
+		if re.search('Removing login credentials', response.stdout) is None:
 			msg = 'Could not log off from local registry'
 			logging.error(msg)
-			mySSH.close()
+			myCmd.close()
 			HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
 			return False
 
-		if lIpAddr != 'none':
-			mySSH.close()
+		myCmd.close()
 		HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
 		return True
 
@@ -809,21 +795,17 @@ class Containerize():
 			sys.exit('Insufficient Parameter')
 		if lIpAddr != 'none':
 			logging.debug('Removing test images from server: ' + lIpAddr)
-			mySSH = SSH.SSHConnection()
-			mySSH.open(lIpAddr, lUserName, lPassWord)
+			myCmd = cls_cmd.RemoteCmd(lIpAddr)
 		else:
 			logging.debug('Removing test images locally')
+			myCmd = cls_cmd.LocalCmd()
 
 		imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
 		for image in imageNames:
-			cmd = f'docker rmi {self.ImageTagToUse(image)} || true'
-			if lIpAddr != 'none':
-				mySSH.command(cmd, '\$', 5)
-			else:
-				self.run_cmd_local_host(cmd)
+			cmd = f'docker rmi {self.ImageTagToUse(image)}'
+			myCmd.run(cmd, reportNonZero=False)
 
-		if lIpAddr != 'none':
-			mySSH.close()
+		myCmd.close()
 		HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
 		return True
 
@@ -1046,42 +1028,45 @@ class Containerize():
 	def DeployGenObject(self, HTML, RAN, UE):
 		self.exitStatus = 0
 		logging.debug('\u001B[1m Checking Services to deploy\u001B[0m')
-		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose config --services'
-		try:
-			listServices = self.run_cmd_local_host(cmd)
-		except Exception as e:
+		# Implicitly we are running locally
+		myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
+		cmd = 'docker-compose config --services'
+		listServices = myCmd.run(cmd)
+		if listServices.returncode != 0:
+			myCmd.close()
 			self.exitStatus = 1
 			HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK)
 			return
 		for reqSvc in self.services[0].split(' '):
-			res = re.search(reqSvc, listServices)
+			res = re.search(reqSvc, listServices.stdout)
 			if res is None:
 				logging.error(reqSvc + ' not found in specified docker-compose')
 				self.exitStatus = 1
 		if (self.exitStatus == 1):
+			myCmd.close()
 			HTML.CreateHtmlTestRow('SVC not Found', 'KO', CONST.ALL_PROCESSES_OK)
 			return
 
-		cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
-		self.run_cmd_local_host(cmd, silent=self.displayedNewTags)
+		cmd = 'cp docker-compose.y*ml docker-compose-ci.yml'
+		myCmd.command(cmd, silent=self.displayedNewTags)
 		imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
 		for image in imageNames:
 			tagToUse = self.ImageTagToUse(image)
-			cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml'
-			self.run_cmd_local_host(cmd, silent=self.displayedNewTags)
-		silent=self.displayedNewTags = True
+			cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml'
+			myCmd.command(cmd, silent=self.displayedNewTags)
+		self.displayedNewTags = True
 
-		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml up -d ' + self.services[0]
-		try:
-			deployStatus = self.run_cmd_local_host(cmd, 100)
-		except Exception as e:
+		cmd = 'docker-compose -f docker-compose-ci.yml up -d ' + self.services[0]
+		deployStatus = myCmd.run(cmd, timeout=100)
+		if deployStatus.returncode != 0:
+			myCmd.close()
 			self.exitStatus = 1
 			logging.error('Could not deploy')
 			HTML.CreateHtmlTestRow('Could not deploy', 'KO', CONST.ALL_PROCESSES_OK)
 			return
 
 		logging.debug('\u001B[1m Checking if all deployed healthy\u001B[0m')
-		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps -a'
+		cmd = 'docker-compose -f docker-compose-ci.yml ps -a'
 		count = 0
 		healthy = 0
 		restarting = 0
@@ -1089,10 +1074,10 @@ class Containerize():
 		while (count < 10):
 			count += 1
 			containerStatus = []
-			deployStatus = self.run_cmd_local_host(cmd, 30, silent=True)
+			deployStatus = myCmd.run(cmd, 30, silent=True)
 			healthy = 0
 			restarting = 0
-			for state in deployStatus.split('\n'):
+			for state in deployStatus.stdout.split('\n'):
 				state = state.strip()
 				res = re.search('Name|NAME|----------', state)
 				if res is not None:
@@ -1112,7 +1097,7 @@ class Containerize():
 				if re.search('\(healthy\)', state) is not None:
 					healthy += 1
 				if re.search('rfsim4g-db-init.*Exit 0', state) is not None or re.search('rfsim4g-db-init.*Exited \(0\)', state) is not None:
-					self.run_cmd_local_host('docker rm -f rfsim4g-db-init || true', 30, silent=True)
+					myCmd.run('docker rm -f rfsim4g-db-init', timeout=30, silent=True, reportNonZero=False)
 				if re.search('Restarting', state) is None:
 					containerStatus.append(state)
 				else:
@@ -1127,10 +1112,12 @@ class Containerize():
 			if newCont == 'rfsim4g-db-init':
 				continue
 			cmd = 'docker inspect -f "{{.Config.Image}}" ' + newCont
-			imageName = self.run_cmd_local_host(cmd, 30, silent=True)
-			imageName = str(imageName).strip()
+			imageInspect = myCmd.run(cmd, timeout=30, silent=True)
+			imageName = str(imageInspect.stdout).strip()
 			cmd = 'docker image inspect --format "{{.RepoTags}}\t{{.Size}} bytes\t{{.Created}}\t{{.Id}}" ' + imageName
-			imagesInfo += self.run_cmd_local_host(cmd, 30, silent=True)
+			imageInspect = myCmd.run(cmd, 30, silent=True)
+			imagesInfo += imageInspect.stdout.strip()
+		myCmd.close()
 
 		html_queue = SimpleQueue()
 		html_cell = '
\n'
@@ -1168,8 +1155,10 @@ class Containerize():
 			pass
 
 	def CaptureOnDockerNetworks(self):
-		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml config | grep com.docker.network.bridge.name | sed -e "s@^.*name: @@"'
-		networkNames = self.run_cmd_local_host(cmd, silent=True)
+		myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
+		cmd = 'docker-compose -f docker-compose-ci.yml config | grep com.docker.network.bridge.name | sed -e "s@^.*name: @@"'
+		networkNames = myCmd.run(cmd, silent=True)
+		myCmd.close()
 		if re.search('4g.*rfsimulator', self.yamlPath[0]) is not None:
 			# Excluding any traffic from LTE-UE container (192.168.61.30)
 			# From the trf-gen, keeping only PING traffic
@@ -1183,7 +1172,7 @@ class Containerize():
 		else:
 			return
 		interfaces = []
-		for name in networkNames.split('\n'):
+		for name in networkNames.stdout.split('\n'):
 			if re.search('rfsim', name) is not None or re.search('l2sim', name) is not None:
 				interfaces.append(name)
 		ymlPath = self.yamlPath[0].split('/')
@@ -1195,28 +1184,30 @@ class Containerize():
 
 	def UndeployGenObject(self, HTML, RAN, UE):
 		self.exitStatus = 0
+		# Implicitly we are running locally
 		ymlPath = self.yamlPath[0].split('/')
 		logPath = '../cmake_targets/log/' + ymlPath[1]
+		myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
 
-		cmd = 'cd ' + self.yamlPath[0] + ' && cp docker-compose.y*ml docker-compose-ci.yml'
-		self.run_cmd_local_host(cmd, silent=self.displayedNewTags)
+		cmd = 'cp docker-compose.y*ml docker-compose-ci.yml'
+		myCmd.command(cmd, silent=self.displayedNewTags)
 		imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru']
 		for image in imageNames:
 			tagToUse = self.ImageTagToUse(image)
-			cmd = f'cd {self.yamlPath[0]} && sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml'
-			self.run_cmd_local_host(cmd, silent=self.displayedNewTags)
-		silent=self.displayedNewTags = True
+			cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml'
+			myCmd.command(cmd, silent=self.displayedNewTags)
+		self.displayedNewTags = True
 
 		# check which containers are running for log recovery later
-		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
-		deployStatusLogs = self.run_cmd_local_host(cmd, 30)
+		cmd = 'docker-compose -f docker-compose-ci.yml ps --all'
+		deployStatusLogs = myCmd.run(cmd, timeout=30)
 
 		# Stop the containers to shut down objects
 		logging.debug('\u001B[1m Stopping containers \u001B[0m')
-		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml stop -t3'
-		try:
-			deployStatus = self.run_cmd_local_host(cmd, 100)
-		except Exception as e:
+		cmd = 'docker-compose -f docker-compose-ci.yml stop -t3'
+		deployStatus = myCmd.run(cmd, timeout=100)
+		if deployStatus.returncode != 0:
+			myCmd.close()
 			self.exitStatus = 1
 			logging.error('Could not stop containers')
 			HTML.CreateHtmlTestRow('Could not stop', 'KO', CONST.ALL_PROCESSES_OK)
@@ -1224,7 +1215,12 @@ class Containerize():
 			return
 
 		anyLogs = False
-		for state in deployStatusLogs.split('\n'):
+		logging.debug('Working dir is now . (ie ci-scripts)')
+		myCmd.cwd = '.'
+		myCmd.command(f'mkdir -p {logPath}')
+		logging.debug(f'Working dir is now {logPath}')
+		myCmd.cwd = logPath
+		for state in deployStatusLogs.stdout.split('\n'):
 			res = re.search('Name|NAME|----------', state)
 			if res is not None:
 				continue
@@ -1234,33 +1230,26 @@ class Containerize():
 			if res is not None:
 				anyLogs = True
 				cName = res.group('container_name')
-				cmd = 'cd ' + self.yamlPath[0] + ' && docker logs ' + cName + ' > ' + cName + '.log 2>&1'
-				self.run_cmd_local_host(cmd, 30)
+				cmd = 'docker logs ' + cName + ' > ' + cName + '.log 2>&1'
+				myCmd.run(cmd, timeout=30, reportNonZero=False)
 				if re.search('magma-mme', cName) is not None:
-					cmd = 'cd ' + self.yamlPath[0] + ' && docker cp -L ' + cName + ':/var/log/mme.log ' + cName + '-full.log'
-					self.run_cmd_local_host(cmd, 30)
+					cmd = 'docker cp -L ' + cName + ':/var/log/mme.log ' + cName + '-full.log'
+					myCmd.run(cmd, timeout=30, reportNonZero=False)
 		fullStatus = True
 		if anyLogs:
-			cmd = 'mkdir -p '+ logPath + ' && cp ' + self.yamlPath[0] + '/*.log ' + logPath
-			deployStatus = self.run_cmd_local_host(cmd)
-
 			# Analyzing log file(s)!
 			listOfPossibleRanContainers = ['enb', 'gnb', 'cu', 'du']
 			for container in listOfPossibleRanContainers:
-				filenames = self.yamlPath[0] + '/*-oai-' + container + '.log'
+				filenames = './*-oai-' + container + '.log'
 				cmd = 'ls ' + filenames
-				containerStatus = True
-				try:
-					lsStatus = self.run_cmd_local_host(cmd, silent=True)
-					filenames = str(lsStatus).strip()
-				except:
-					containerStatus = False
-				if not containerStatus:
+				lsStatus = myCmd.run(cmd, silent=True, reportNonZero=False)
+				if lsStatus.returncode != 0:
 					continue
+				filenames = str(lsStatus.stdout).strip()
 
 				for filename in filenames.split('\n'):
 					logging.debug('\u001B[1m Analyzing xNB logfile ' + filename + ' \u001B[0m')
-					logStatus = RAN.AnalyzeLogFile_eNB(filename, HTML, self.ran_checkers)
+					logStatus = RAN.AnalyzeLogFile_eNB(f'{logPath}/{filename}', HTML, self.ran_checkers)
 					if (logStatus < 0):
 						fullStatus = False
 						self.exitStatus = 1
@@ -1270,42 +1259,40 @@ class Containerize():
 
 			listOfPossibleUeContainers = ['lte-ue*', 'nr-ue*']
 			for container in listOfPossibleUeContainers:
-				filenames = self.yamlPath[0] + '/*-oai-' + container + '.log'
+				filenames = './*-oai-' + container + '.log'
 				cmd = 'ls ' + filenames
 				containerStatus = True
-				try:
-					lsStatus = self.run_cmd_local_host(cmd, silent=True)
-					filenames = str(lsStatus).strip()
-				except:
-					containerStatus = False
-				if not containerStatus:
+				lsStatus = myCmd.run(cmd, silent=True, reportNonZero=False)
+				if lsStatus.returncode != 0:
 					continue
+				filenames = str(lsStatus.stdout).strip()
 
 				for filename in filenames.split('\n'):
 					logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m')
-					logStatus = UE.AnalyzeLogFile_UE(filename, HTML, RAN)
+					logStatus = UE.AnalyzeLogFile_UE(f'{logPath}/{filename}', HTML, RAN)
 					if (logStatus < 0):
 						fullStatus = False
 						HTML.CreateHtmlTestRow('UE log Analysis', 'KO', logStatus)
 					else:
 						HTML.CreateHtmlTestRow('UE log Analysis', 'OK', CONST.ALL_PROCESSES_OK)
 
-			cmd = 'rm ' + self.yamlPath[0] + '/*.log'
-			deployStatus = self.run_cmd_local_host(cmd)
 			if self.tsharkStarted:
 				self.tsharkStarted = True
-				cmd = 'killall tshark || true'
-				self.run_cmd_local_host(cmd)
+				cmd = 'killall tshark'
+				myCmd.run(cmd, reportNonZero=False)
 				ymlPath = self.yamlPath[0].split('/')
-				cmd = 'mv /tmp/capture_' + ymlPath[1] + '.pcap ' + logPath + ' || true'
-				copyStatus = self.run_cmd_local_host(cmd, 100)
+				# The working dir is still logPath
+				cmd = 'mv /tmp/capture_' + ymlPath[1] + '.pcap .'
+				myCmd.run(cmd, timeout=100, reportNonZero=False)
 				self.tsharkStarted = False
 
 		logging.debug('\u001B[1m Undeploying \u001B[0m')
-		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml down'
-		try:
-			deployStatus = self.run_cmd_local_host(cmd, 100)
-		except Exception as e:
+		logging.debug(f'Working dir is back {self.yamlPath[0]}')
+		myCmd.cwd = self.yamlPath[0]
+		cmd = 'docker-compose -f docker-compose-ci.yml down'
+		deployStatus = myCmd.run(cmd, timeout=100)
+		if deployStatus.returncode != 0:
+			myCmd.close()
 			self.exitStatus = 1
 			logging.error('Could not undeploy')
 			HTML.CreateHtmlTestRow('Could not undeploy', 'KO', CONST.ALL_PROCESSES_OK)
@@ -1314,8 +1301,9 @@ class Containerize():
 
 		self.deployedContainers = []
 		# Cleaning any created tmp volume
-		cmd = 'docker volume prune --force || true'
-		deployStatus = self.run_cmd_local_host(cmd, 100)
+		cmd = 'docker volume prune --force'
+		deployStatus = myCmd.run(cmd, timeout=100, reportNonZero=False)
+		myCmd.close()
 
 		if fullStatus:
 			HTML.CreateHtmlTestRow('n/a', 'OK', CONST.ALL_PROCESSES_OK)
@@ -1330,11 +1318,12 @@ class Containerize():
 		logPath = '../cmake_targets/log/' + ymlPath[1]
 
 		# if the containers are running, recover the logs!
-		cmd = 'cd ' + self.yamlPath[0] + ' && docker-compose -f docker-compose-ci.yml ps --all'
-		deployStatus = self.run_cmd_local_host(cmd, 30)
+		myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0])
+		cmd = 'docker-compose -f docker-compose-ci.yml ps --all'
+		deployStatus = myCmd.run(cmd, timeout=30)
 		cmd = 'docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}" '
 		anyLogs = False
-		for state in deployStatus.split('\n'):
+		for state in deployStatus.stdout.split('\n'):
 			res = re.search('Name|NAME|----------', state)
 			if res is not None:
 				continue
@@ -1346,10 +1335,11 @@ class Containerize():
 				cmd += res.group('container_name') + ' '
 		message = ''
 		if anyLogs:
-			stats = self.run_cmd_local_host(cmd, 30)
-			for statLine in stats.split('\n'):
+			stats = myCmd.run(cmd, timeout=30)
+			for statLine in stats.stdout.split('\n'):
 				logging.debug(statLine)
 				message += statLine + '\n'
+		myCmd.close()
 
 		html_queue = SimpleQueue()
 		html_cell = '
\n' + message + '
' @@ -1357,17 +1347,18 @@ class Containerize(): HTML.CreateHtmlTestRowQueue(self.pingOptions, 'OK', 1, html_queue) def PingFromContainer(self, HTML, RAN, UE): + myCmd = cls_cmd.LocalCmd() self.exitStatus = 0 ymlPath = self.yamlPath[0].split('/') logPath = '../cmake_targets/log/' + ymlPath[1] cmd = 'mkdir -p ' + logPath - deployStatus = self.run_cmd_local_host(cmd, silent=True) + myCmd.run(cmd, silent=True) - cmd = 'docker exec ' + self.pingContName + ' /bin/bash -c "ping ' + self.pingOptions + '" 2>&1 | tee ' + logPath + '/ping_' + HTML.testCase_id + '.log || true' + cmd = 'docker exec ' + self.pingContName + ' /bin/bash -c "ping ' + self.pingOptions + '" 2>&1 | tee ' + logPath + '/ping_' + HTML.testCase_id + '.log' + pingStatus = myCmd.run(cmd, timeout=100, reportNonZero=False) + myCmd.close() - deployStatus = self.run_cmd_local_host(cmd, 100) - - result = re.search(', (?P[0-9\.]+)% packet loss, time [0-9\.]+ms', deployStatus) + result = re.search(', (?P[0-9\.]+)% packet loss, time [0-9\.]+ms', pingStatus.stdout) if result is None: self.PingExit(HTML, RAN, UE, False, 'Packet Loss Not Found') return @@ -1377,7 +1368,7 @@ class Containerize(): self.PingExit(HTML, RAN, UE, False, 'Packet Loss is 100%') return - result = re.search('rtt min\/avg\/max\/mdev = (?P[0-9\.]+)\/(?P[0-9\.]+)\/(?P[0-9\.]+)\/[0-9\.]+ ms', deployStatus) + result = re.search('rtt min\/avg\/max\/mdev = (?P[0-9\.]+)\/(?P[0-9\.]+)\/(?P[0-9\.]+)\/[0-9\.]+ ms', pingStatus.stdout) if result is None: self.PingExit(HTML, RAN, UE, False, 'Ping RTT_Min RTT_Avg RTT_Max Not Found!') return @@ -1430,35 +1421,37 @@ class Containerize(): self.exitStatus = 1 def IperfFromContainer(self, HTML, RAN, UE): + myCmd = cls_cmd.LocalCmd() self.exitStatus = 0 ymlPath = self.yamlPath[0].split('/') logPath = '../cmake_targets/log/' + ymlPath[1] cmd = 'mkdir -p ' + logPath - logStatus = self.run_cmd_local_host(cmd, silent=True) + myCmd.run(cmd, silent=True) # Start the server process cmd = f'docker exec -d {self.svrContName} /bin/bash -c "nohup iperf {self.svrOptions} > /tmp/iperf_server.log 2>&1"' - self.run_cmd_local_host(cmd) + myCmd.run(cmd, reportNonZero=False) time.sleep(3) # Start the client process cmd = f'docker exec {self.cliContName} /bin/bash -c "iperf {self.cliOptions}" 2>&1 | tee {logPath}/iperf_client_{HTML.testCase_id}.log' - clientStatus = self.run_cmd_local_host(cmd, 100) + clientStatus = myCmd.run(cmd, timeout=100) # Stop the server process cmd = f'docker exec {self.svrContName} /bin/bash -c "pkill iperf"' - self.run_cmd_local_host(cmd) + myCmd.run(cmd) time.sleep(3) serverStatusFilename = f'{logPath}/iperf_server_{HTML.testCase_id}.log' cmd = f'docker cp {self.svrContName}:/tmp/iperf_server.log {serverStatusFilename}' - self.run_cmd_local_host(cmd, 30) + myCmd.run(cmd, timeout=60) + myCmd.close() # clientStatus was retrieved above. The serverStatus was # written in the background, then copied to the local machine with open(serverStatusFilename, 'r') as f: serverStatus = f.read() - (iperfStatus, msg) = AnalyzeIperf(self.cliOptions, clientStatus, serverStatus) + (iperfStatus, msg) = AnalyzeIperf(self.cliOptions, clientStatus.stdout, serverStatus) if iperfStatus: logging.info('\u001B[1m Iperf Test PASS\u001B[0m') else: @@ -1594,13 +1587,3 @@ class Containerize(): if result is None: mySSH.command('echo ' + password + ' | sudo -S iptables -P FORWARD ACCEPT', '\$', 10) mySSH.close() - - def run_cmd_local_host(self, lCmd, lTimeout=10, silent=False): - if not silent: - logging.info(lCmd) - result = subprocess.run(lCmd, shell=True, check=True, - universal_newlines=True, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - timeout=lTimeout) - return str(result.stdout) From a03d2746763bf6e0237a4f94bb530c6327e0337e Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 3 Feb 2023 10:26:05 +0100 Subject: [PATCH 05/12] chore(ci): after upgrade of CN5G version on porcepix Signed-off-by: Raphael Defosseux --- ci-scripts/epc.py | 14 +++++++------- ci-scripts/xml_files/sa_cn5g_asue_start.xml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ci-scripts/epc.py b/ci-scripts/epc.py index 8ee4a0a5e6..867236f97e 100644 --- a/ci-scripts/epc.py +++ b/ci-scripts/epc.py @@ -43,7 +43,7 @@ from multiprocessing import Process, Lock, SimpleQueue #----------------------------------------------------------- # OAI Testing modules #----------------------------------------------------------- -import sshconnection as SSH +import sshconnection as SSH import helpreadme as HELP import constants as CONST @@ -66,8 +66,8 @@ class EPCManagement(): self.mmeConfFile = 'mme.conf' self.yamlPath = '' self.isMagmaUsed = False - self.cfgDeploy = '--type start-mini --fqdn yes --scenario 1 --capture /tmp/oai-cn5g-v1.3.pcap' #from xml, 'mini' is default normal for docker-network.py - self.cfgUnDeploy = '--type stop-mini --fqdn yes --scenario 1' #from xml, 'mini' is default normal for docker-network.py + self.cfgDeploy = '--type start-mini --fqdn yes --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap' #from xml, 'mini' is default normal for docker-network.py + self.cfgUnDeploy = '--type stop-mini --fqdn yes --scenario 1' #from xml, 'mini' is default normal for docker-network.py #----------------------------------------------------------- @@ -253,7 +253,7 @@ class EPCManagement(): logging.debug('Starting OAI CN5G') mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5) mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5) - mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5) + mySSH.command('cd /opt/oai-cn5g-fed-v1.5/docker-compose', '\$', 5) mySSH.command('python3 ./core-network.py '+self.cfgDeploy, '\$', 60) if re.search('start-mini-as-ue', self.cfgDeploy): dFile = 'docker-compose-mini-nrf-asue.yaml' @@ -537,11 +537,11 @@ class EPCManagement(): mySSH.command('docker logs ' + c + ' > ' + self.SourceCodePath + '/logs/' + c + '.log', '\$', 5) logging.debug('Terminating OAI CN5G') - mySSH.command('cd /opt/oai-cn5g-fed-v1.4/docker-compose', '\$', 5) + mySSH.command('cd /opt/oai-cn5g-fed-v1.5/docker-compose', '\$', 5) mySSH.command('python3 ./core-network.py '+self.cfgUnDeploy, '\$', 60) mySSH.command('docker volume prune --force || true', '\$', 60) time.sleep(2) - mySSH.command('tshark -r /tmp/oai-cn5g-v1.3.pcap | egrep --colour=never "Tracking area update" ','\$', 30) + mySSH.command('tshark -r /tmp/oai-cn5g-v1.5.pcap | egrep --colour=never "Tracking area update" ','\$', 30) result = re.search('Tracking area update request', mySSH.getBefore()) if result is not None: message = 'UE requested ' + str(mySSH.getBefore().count('Tracking area update request')) + 'Tracking area update request(s)' @@ -828,7 +828,7 @@ class EPCManagement(): mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60) elif re.match('OAICN5G', self.Type, re.IGNORECASE): mySSH.command('cd ' + self.SourceCodePath + '/logs','\$', 5) - mySSH.command('cp -f /tmp/oai-cn5g-v1.3.pcap .','\$', 30) + mySSH.command('cp -f /tmp/oai-cn5g-v1.5.pcap .','\$', 30) mySSH.command('zip mme.log.zip oai-amf.log oai-nrf.log oai-cn5g*.pcap','\$', 30) mySSH.command('mv mme.log.zip ' + self.SourceCodePath + '/scripts','\$', 30) elif re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE): diff --git a/ci-scripts/xml_files/sa_cn5g_asue_start.xml b/ci-scripts/xml_files/sa_cn5g_asue_start.xml index 740022b1c9..0b402f69f1 100644 --- a/ci-scripts/xml_files/sa_cn5g_asue_start.xml +++ b/ci-scripts/xml_files/sa_cn5g_asue_start.xml @@ -33,7 +33,7 @@ Initialize_5GCN Initialize 5G Core - --type start-mini-as-ue --fqdn yes --scenario 1 --capture /tmp/oai-cn5g-v1.3.pcap + --type start-mini-as-ue --fqdn yes --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap From f516d7ab4ff2ff52c965f0abaf883413223e2c75 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 3 Feb 2023 10:34:08 +0100 Subject: [PATCH 06/12] fix(ci): typo found per review Signed-off-by: Raphael Defosseux --- .../yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml index 39c9394769..02bc3c56f2 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: oai_enb0: - image: ioaisoftwarealliance/oai-enb:develop + image: oaisoftwarealliance/oai-enb:develop privileged: true container_name: rfsim4g-oai-enb networks: From 19ffb7be485d36f0c3f407350ef3e4bb76e2c634 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 3 Feb 2023 11:47:11 +0100 Subject: [PATCH 07/12] fix(ci): proxy repo has no develop branch Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 44c90c994f..f8fc84a8d1 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -65,7 +65,8 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge sshSession.command('mkdir -p ' + sourcePath, '\$', 5) sshSession.command('cd ' + sourcePath, '\$', 5) # Recent version of git (>2.20?) should handle missing .git extension # without problems - sshSession.command(f'git clone --filter=blob:none -n -b develop {ranRepository} .', '\$', 60) + baseBranch = re.sub('origin/', '', ranTargetBranch) + sshSession.command(f'git clone --filter=blob:none -n -b {baseBranch} {ranRepository} .', '\$', 60) if sshSession.getBefore().count('error') > 0 or sshSession.getBefore().count('error') > 0: sys.exit('error during clone') sshSession.command('git config user.email "jenkins@openairinterface.org"', '\$', 5) @@ -550,14 +551,17 @@ class Containerize(): oldRanCommidID = self.ranCommitID oldRanRepository = self.ranRepository oldRanAllowMerge = self.ranAllowMerge + oldRanTargetBranch = self.ranTargetBranch self.ranCommitID = self.proxyCommit self.ranRepository = 'https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy.git' self.ranAllowMerge = False + self.ranTargetBranch = 'master' CreateWorkspace(mySSH, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge) # to prevent accidentally overwriting data that might be used later self.ranCommitID = oldRanCommidID self.ranRepository = oldRanRepository self.ranAllowMerge = oldRanAllowMerge + self.ranTargetBranch = oldRanTargetBranch # Let's remove any previous run artifacts if still there mySSH.command(self.cli + ' image prune --force', '\$', 30) @@ -574,6 +578,7 @@ class Containerize(): # Note: at this point, OAI images are flattened, but we cannot do this # here, as the flatten script is not in the proxy repo mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' proxy:' + tag, '\$', 5) + mySSH.command(self.cli + ' image prune --force || true','\$', 15) if mySSH.getBefore().count('o such image') != 0: logging.error('\u001B[1m Build of L2sim proxy failed\u001B[0m') mySSH.close() @@ -1098,6 +1103,8 @@ class Containerize(): healthy += 1 if re.search('rfsim4g-db-init.*Exit 0', state) is not None or re.search('rfsim4g-db-init.*Exited \(0\)', state) is not None: myCmd.run('docker rm -f rfsim4g-db-init', timeout=30, silent=True, reportNonZero=False) + if re.search('l2sim4g-db-init.*Exit 0', state) is not None or re.search('l2sim4g-db-init.*Exited \(0\)', state) is not None: + myCmd.run('docker rm -f l2sim4g-db-init', timeout=30, silent=True, reportNonZero=False) if re.search('Restarting', state) is None: containerStatus.append(state) else: From 00ef792d4799a7eb7ce293b676e939cf90ddbf40 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 3 Feb 2023 14:03:40 +0100 Subject: [PATCH 08/12] chore(ci): post-review changes Signed-off-by: Raphael Defosseux --- ci-scripts/cls_cmd.py | 8 +++-- ci-scripts/cls_containerize.py | 65 +++++++++++++++++++--------------- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/ci-scripts/cls_cmd.py b/ci-scripts/cls_cmd.py index cd7716bc16..8694502fe2 100644 --- a/ci-scripts/cls_cmd.py +++ b/ci-scripts/cls_cmd.py @@ -75,7 +75,7 @@ class LocalCmd(Cmd): def __init__(self, d = None): self.cwd = d if self.cwd is not None: - logging.debug(f'Working dir will be {self.cwd}') + logging.debug(f'Working dir is {self.cwd}') self.cp = sp.CompletedProcess(args='', returncode=0, stdout='') def run(self, line, timeout=300, silent=False, reportNonZero=True): @@ -94,7 +94,11 @@ class LocalCmd(Cmd): return ret def command(self, commandline, expectedline=None, timeout=300, silent=False, resync=False): - self.run(commandline, timeout, silent) + line = [s for s in commandline.split(' ') if len(s) > 0] + if line[0] == 'cd': + self.cd(line[1], silent) + else: + self.run(line, timeout, silent) return 0 def close(self): diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index f8fc84a8d1..8312802aa9 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -745,7 +745,7 @@ class Containerize(): cmd = 'docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr' response = myCmd.run(cmd) - if re.search('Login Succeeded', response.stdout) is None: + if response.returncode != 0: msg = 'Could not log into local registry' logging.error(msg) myCmd.close() @@ -756,7 +756,7 @@ class Containerize(): tagToUse = self.ImageTagToUse(image) cmd = f'docker pull {tagToUse}' response = myCmd.run(cmd, timeout=120) - if re.search('Status: Downloaded newer image for |Status: Image is up to date for', response.stdout) is None: + if response.returncode != 0: logging.debug(response) msg = f'Could not pull {image} from local registry : {tagToUse}' logging.error(msg) @@ -766,7 +766,7 @@ class Containerize(): cmd = 'docker logout porcepix.sboai.cs.eurecom.fr' response = myCmd.run(cmd) - if re.search('Removing login credentials', response.stdout) is None: + if response.returncode != 0: msg = 'Could not log off from local registry' logging.error(msg) myCmd.close() @@ -1053,15 +1053,15 @@ class Containerize(): return cmd = 'cp docker-compose.y*ml docker-compose-ci.yml' - myCmd.command(cmd, silent=self.displayedNewTags) + myCmd.run(cmd, silent=self.displayedNewTags) imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru'] for image in imageNames: tagToUse = self.ImageTagToUse(image) cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml' - myCmd.command(cmd, silent=self.displayedNewTags) + myCmd.run(cmd, silent=self.displayedNewTags) self.displayedNewTags = True - cmd = 'docker-compose -f docker-compose-ci.yml up -d ' + self.services[0] + cmd = f'docker-compose -f docker-compose-ci.yml up -d {self.services[0]}' deployStatus = myCmd.run(cmd, timeout=100) if deployStatus.returncode != 0: myCmd.close() @@ -1156,6 +1156,12 @@ class Containerize(): self.UndeployGenObject(HTML, RAN, UE) self.exitStatus = 1 + # pyshark livecapture launches 2 processes: + # * One using dumpcap -i lIfs -w - (ie redirecting the packets to STDOUT) + # * One using tshark -i - -w loFile (ie capturing from STDIN from previous process) + # but in fact the packets are read by the following loop before being in fact + # really written to loFile. + # So it is mandatory to keep the loop def LaunchPySharkCapture(self, lIfs, lFilter, loFile): capture = pyshark.LiveCapture(interface=lIfs, bpf_filter=lFilter, output_file=loFile, debug=False) for packet in capture.sniff_continuously(): @@ -1197,12 +1203,12 @@ class Containerize(): myCmd = cls_cmd.LocalCmd(d = self.yamlPath[0]) cmd = 'cp docker-compose.y*ml docker-compose-ci.yml' - myCmd.command(cmd, silent=self.displayedNewTags) + myCmd.run(cmd, silent=self.displayedNewTags) imageNames = ['oai-enb', 'oai-gnb', 'oai-lte-ue', 'oai-nr-ue', 'oai-lte-ru'] for image in imageNames: tagToUse = self.ImageTagToUse(image) cmd = f'sed -i -e "s@oaisoftwarealliance/{image}:develop@{tagToUse}@" docker-compose-ci.yml' - myCmd.command(cmd, silent=self.displayedNewTags) + myCmd.run(cmd, silent=self.displayedNewTags) self.displayedNewTags = True # check which containers are running for log recovery later @@ -1223,10 +1229,9 @@ class Containerize(): anyLogs = False logging.debug('Working dir is now . (ie ci-scripts)') - myCmd.cwd = '.' - myCmd.command(f'mkdir -p {logPath}') - logging.debug(f'Working dir is now {logPath}') - myCmd.cwd = logPath + myCmd2 = cls_cmd.LocalCmd() + myCmd2.run(f'mkdir -p {logPath}') + myCmd2.cd(logPath) for state in deployStatusLogs.stdout.split('\n'): res = re.search('Name|NAME|----------', state) if res is not None: @@ -1237,19 +1242,19 @@ class Containerize(): if res is not None: anyLogs = True cName = res.group('container_name') - cmd = 'docker logs ' + cName + ' > ' + cName + '.log 2>&1' - myCmd.run(cmd, timeout=30, reportNonZero=False) + cmd = f'docker logs {cName} > {cName}.log 2>&1' + myCmd2.run(cmd, timeout=30, reportNonZero=False) if re.search('magma-mme', cName) is not None: - cmd = 'docker cp -L ' + cName + ':/var/log/mme.log ' + cName + '-full.log' - myCmd.run(cmd, timeout=30, reportNonZero=False) + cmd = f'docker cp -L {cName}:/var/log/mme.log {cName}-full.log' + myCmd2.run(cmd, timeout=30, reportNonZero=False) fullStatus = True if anyLogs: # Analyzing log file(s)! listOfPossibleRanContainers = ['enb', 'gnb', 'cu', 'du'] for container in listOfPossibleRanContainers: filenames = './*-oai-' + container + '.log' - cmd = 'ls ' + filenames - lsStatus = myCmd.run(cmd, silent=True, reportNonZero=False) + cmd = f'ls {filenames}' + lsStatus = myCmd2.run(cmd, silent=True, reportNonZero=False) if lsStatus.returncode != 0: continue filenames = str(lsStatus.stdout).strip() @@ -1267,9 +1272,8 @@ class Containerize(): listOfPossibleUeContainers = ['lte-ue*', 'nr-ue*'] for container in listOfPossibleUeContainers: filenames = './*-oai-' + container + '.log' - cmd = 'ls ' + filenames - containerStatus = True - lsStatus = myCmd.run(cmd, silent=True, reportNonZero=False) + cmd = f'ls {filenames}' + lsStatus = myCmd2.run(cmd, silent=True, reportNonZero=False) if lsStatus.returncode != 0: continue filenames = str(lsStatus.stdout).strip() @@ -1286,16 +1290,19 @@ class Containerize(): if self.tsharkStarted: self.tsharkStarted = True cmd = 'killall tshark' - myCmd.run(cmd, reportNonZero=False) + myCmd2.run(cmd, reportNonZero=False) + cmd = 'killall dumpcap' + myCmd2.run(cmd, reportNonZero=False) + time.sleep(5) ymlPath = self.yamlPath[0].split('/') # The working dir is still logPath - cmd = 'mv /tmp/capture_' + ymlPath[1] + '.pcap .' - myCmd.run(cmd, timeout=100, reportNonZero=False) + cmd = f'mv /tmp/capture_{ymlPath[1]}.pcap .' + myCmd2.run(cmd, timeout=100, reportNonZero=False) self.tsharkStarted = False + myCmd2.close() logging.debug('\u001B[1m Undeploying \u001B[0m') logging.debug(f'Working dir is back {self.yamlPath[0]}') - myCmd.cwd = self.yamlPath[0] cmd = 'docker-compose -f docker-compose-ci.yml down' deployStatus = myCmd.run(cmd, timeout=100) if deployStatus.returncode != 0: @@ -1358,10 +1365,10 @@ class Containerize(): self.exitStatus = 0 ymlPath = self.yamlPath[0].split('/') logPath = '../cmake_targets/log/' + ymlPath[1] - cmd = 'mkdir -p ' + logPath + cmd = f'mkdir -p {logPath}' myCmd.run(cmd, silent=True) - cmd = 'docker exec ' + self.pingContName + ' /bin/bash -c "ping ' + self.pingOptions + '" 2>&1 | tee ' + logPath + '/ping_' + HTML.testCase_id + '.log' + cmd = f'docker exec {self.pingContName} /bin/bash -c "ping {self.pingOptions}" 2>&1 | tee {logPath}/ping_{HTML.testCase_id}.log' pingStatus = myCmd.run(cmd, timeout=100, reportNonZero=False) myCmd.close() @@ -1433,12 +1440,12 @@ class Containerize(): ymlPath = self.yamlPath[0].split('/') logPath = '../cmake_targets/log/' + ymlPath[1] - cmd = 'mkdir -p ' + logPath + cmd = f'mkdir -p {logPath}' myCmd.run(cmd, silent=True) # Start the server process cmd = f'docker exec -d {self.svrContName} /bin/bash -c "nohup iperf {self.svrOptions} > /tmp/iperf_server.log 2>&1"' - myCmd.run(cmd, reportNonZero=False) + myCmd.run(cmd) time.sleep(3) # Start the client process From 8a388f4b0ed32d2b4d48cef9cef75c0b6ef993df Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 6 Feb 2023 11:22:31 +0100 Subject: [PATCH 09/12] fix(ci): for old versions of python3, pyshark live-capture is buggy Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 8312802aa9..4a897d066b 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -1185,12 +1185,22 @@ class Containerize(): else: return interfaces = [] + iInterfaces = '' for name in networkNames.stdout.split('\n'): if re.search('rfsim', name) is not None or re.search('l2sim', name) is not None: interfaces.append(name) + iInterfaces += f'-i {name} ' ymlPath = self.yamlPath[0].split('/') output_file = f'/tmp/capture_{ymlPath[1]}.pcap' self.tsharkStarted = True + # On old systems (ubuntu 18), pyshark live-capture is buggy. + # Going back to old method + if sys.version_info < (3, 7): + cmd = f'nohup tshark -f "{capture_filter}" {iInterfaces} -w {output_file} > /tmp/tshark.log 2>&1 &' + myCmd = cls_cmd.LocalCmd() + myCmd.run(cmd, timeout=5, reportNonZero=False) + myCmd.close() + return x = threading.Thread(target = self.LaunchPySharkCapture, args = (interfaces,capture_filter,output_file,)) x.daemon = True x.start() From 801dc4cc6c683895ede60f32f99db67df7a93941 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 13 Feb 2023 11:07:17 +0100 Subject: [PATCH 10/12] fix(ci): fdqn is no longer an option for OAI-CN5G launch script Signed-off-by: Raphael Defosseux --- ci-scripts/epc.py | 8 ++++---- ci-scripts/xml_files/sa_cn5g_asue_closure.xml | 2 +- ci-scripts/xml_files/sa_cn5g_asue_start.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci-scripts/epc.py b/ci-scripts/epc.py index 867236f97e..64074fdd6a 100644 --- a/ci-scripts/epc.py +++ b/ci-scripts/epc.py @@ -66,8 +66,8 @@ class EPCManagement(): self.mmeConfFile = 'mme.conf' self.yamlPath = '' self.isMagmaUsed = False - self.cfgDeploy = '--type start-mini --fqdn yes --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap' #from xml, 'mini' is default normal for docker-network.py - self.cfgUnDeploy = '--type stop-mini --fqdn yes --scenario 1' #from xml, 'mini' is default normal for docker-network.py + self.cfgDeploy = '--type start-mini --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap' #from xml, 'mini' is default normal for docker-network.py + self.cfgUnDeploy = '--type stop-mini --scenario 1' #from xml, 'mini' is default normal for docker-network.py #----------------------------------------------------------- @@ -259,12 +259,12 @@ class EPCManagement(): dFile = 'docker-compose-mini-nrf-asue.yaml' else: dFile = 'docker-compose-mini-nrf.yaml' - mySSH.command('docker-compose -p 5gcn -f ' + dFile + ' ps -a', '\$', 60) + mySSH.command('docker-compose -f ' + dFile + ' ps -a', '\$', 60) if mySSH.getBefore().count('Up (healthy)') != 6: logging.error('Not all container healthy') else: logging.debug('OK --> all containers are healthy') - mySSH.command('docker-compose -p 5gcn -f ' + dFile + ' config | grep --colour=never image', '\$', 10) + mySSH.command('docker-compose -f ' + dFile + ' config | grep --colour=never image', '\$', 10) listOfImages = mySSH.getBefore() for imageLine in listOfImages.split('\\r\\n'): res1 = re.search('image: (?P[a-zA-Z0-9\-/]+):(?P[a-zA-Z0-9\-]+)', str(imageLine)) diff --git a/ci-scripts/xml_files/sa_cn5g_asue_closure.xml b/ci-scripts/xml_files/sa_cn5g_asue_closure.xml index b856134e36..f0448d528d 100644 --- a/ci-scripts/xml_files/sa_cn5g_asue_closure.xml +++ b/ci-scripts/xml_files/sa_cn5g_asue_closure.xml @@ -32,7 +32,7 @@ Terminate_5GCN Terminate 5G Core - --type stop-mini-as-ue --fqdn yes --scenario 1 + --type stop-mini-as-ue --scenario 1 diff --git a/ci-scripts/xml_files/sa_cn5g_asue_start.xml b/ci-scripts/xml_files/sa_cn5g_asue_start.xml index 0b402f69f1..da2ae56114 100644 --- a/ci-scripts/xml_files/sa_cn5g_asue_start.xml +++ b/ci-scripts/xml_files/sa_cn5g_asue_start.xml @@ -33,7 +33,7 @@ Initialize_5GCN Initialize 5G Core - --type start-mini-as-ue --fqdn yes --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap + --type start-mini-as-ue --scenario 1 --capture /tmp/oai-cn5g-v1.5.pcap From 8d91453b521a9a4439658e70b5117cda0dfd848e Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 14 Feb 2023 15:23:55 +0100 Subject: [PATCH 11/12] chore(ci): updating the new E1 scenario for CN5G v1.5 Signed-off-by: Raphael Defosseux --- .../5g_rfsimulator_e1/docker-compose.yaml | 124 ++++-------------- 1 file changed, 26 insertions(+), 98 deletions(-) diff --git a/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml index 3d4689e912..7abfb7b915 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml @@ -2,28 +2,16 @@ version: '3.8' services: oai-nrf: container_name: "rfsim5g-oai-nrf" - image: oai-nrf:august-dev + image: oaisoftwarealliance/oai-nrf:v1.5.0 environment: - NRF_INTERFACE_NAME_FOR_SBI=eth0 - - NRF_INTERFACE_PORT_FOR_SBI=80 - - NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - NRF_API_VERSION=v1 - - INSTANCE=0 - - PID_DIRECTORY=/var/run + - TZ=Europe/Paris networks: core_net: ipv4_address: 192.168.71.130 - volumes: - - ../5g_rfsimulator/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 - mysql: container_name: "rfsim5g-mysql" - image: mysql:5.7 + image: mysql:8.0 volumes: - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh @@ -37,18 +25,15 @@ services: test: /bin/bash -c "/tmp/mysql-healthcheck.sh" interval: 10s timeout: 5s - retries: 5 + retries: 30 networks: core_net: ipv4_address: 192.168.71.131 - oai-amf: container_name: "rfsim5g-oai-amf" - image: oai-amf:august-dev + image: oaisoftwarealliance/oai-amf:v1.5.0 environment: - TZ=Europe/paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - MCC=208 - MNC=99 - REGION_ID=128 @@ -64,134 +49,85 @@ services: - PLMN_SUPPORT_MCC=208 - PLMN_SUPPORT_MNC=99 - PLMN_SUPPORT_TAC=0x0001 + # Only one slice is defined (1, 0xFFFFFF). - SST_0=1 - - SD_0=0xffffff - - SST_1=1 - - SD_1=1 - AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0 + # One single SMF instance - SMF_INSTANCE_ID_0=1 - SMF_FQDN_0=oai-smf - - SMF_IPV4_ADDR_0=0.0.0.0 - - SMF_HTTP_VERSION_0=v1 + - SMF_IPV4_ADDR_0=192.168.71.133 - SELECTED_0=true - - SMF_INSTANCE_ID_1=2 - - SMF_FQDN_1=oai-smf - - SMF_IPV4_ADDR_1=0.0.0.0 - - SMF_HTTP_VERSION_1=v1 - - SELECTED_1=false + # mysql definition in AMF is mandatory in mini deployment. - MYSQL_SERVER=192.168.71.131 - MYSQL_USER=root - MYSQL_PASS=linux - MYSQL_DB=oai_db - - OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1 + # NF registration - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 + - NRF_FQDN=oai-nrf - NF_REGISTRATION=yes - SMF_SELECTION=yes - USE_FQDN_DNS=yes - - NRF_API_VERSION=v1 - - NRF_FQDN=oai-nrf - - EXTERNAL_AUSF=no - - AUSF_IPV4_ADDRESS=0.0.0.0 - - AUSF_PORT=80 - - AUSF_API_VERSION=v1 - - AUSF_FQDN=localhost + - USE_HTTP2=no depends_on: - oai-nrf - mysql - volumes: - - ../5g_rfsimulator/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh" - interval: 10s - timeout: 15s - retries: 5 networks: core_net: ipv4_address: 192.168.71.132 - oai-smf: container_name: "rfsim5g-oai-smf" - image: oai-smf:august-dev + image: oaisoftwarealliance/oai-smf:v1.5.0 environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0 - - SMF_INTERFACE_PORT_FOR_SBI=80 - - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - SMF_API_VERSION=v1 - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - - AMF_IPV4_ADDRESS=0.0.0.0 - - AMF_PORT=80 - - AMF_API_VERSION=v1 + - AMF_IPV4_ADDRESS=192.168.71.132 - AMF_FQDN=oai-amf - - UDM_IPV4_ADDRESS=127.0.0.1 - - UDM_PORT=80 - - UDM_API_VERSION=v1 - - UDM_FQDN=localhost - UPF_IPV4_ADDRESS=192.168.71.134 - UPF_FQDN_0=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf - REGISTER_NRF=yes - DISCOVER_UPF=yes - USE_FQDN_DNS=yes + - USE_LOCAL_SUBSCRIPTION_INFO=yes + - UE_MTU=1500 + # Only one slice is defined (1, 0xFFFFFF) - DNN_NI0=oai - TYPE0=IPv4 - DNN_RANGE0=12.1.1.2 - 12.1.1.127 - NSSAI_SST0=1 - - NSSAI_SD0=0xFFFFFF - SESSION_AMBR_UL0=200Mbps - SESSION_AMBR_DL0=400Mbps - - DNN_NI2=oai.ipv4 + - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 + - ENABLE_USAGE_REPORTING=no depends_on: - oai-nrf - oai-amf - volumes: - - ../5g_rfsimulator/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: core_net: ipv4_address: 192.168.71.133 - oai-spgwu: container_name: "rfsim5g-oai-spgwu" - image: oai-spgwu-tiny:august-dev + image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0 environment: - TZ=Europe/Paris - - PID_DIRECTORY=/var/run - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0 - NETWORK_UE_NAT_OPTION=yes - NETWORK_UE_IP=12.1.1.0/24 - - SPGWC0_IP_ADDRESS=192.168.71.133 - - BYPASS_UL_PFCP_RULES=no - - MCC=208 - - MNC=99 - - MNC03=099 - - TAC=1 - - GTP_EXTENSION_HEADER_PRESENT=yes - - GW_ID=1 - - REALM=openairinterface.org - ENABLE_5G_FEATURES=yes - REGISTER_NRF=yes - USE_FQDN_NRF=yes - UPF_FQDN_5G=oai-spgwu - NRF_IPV4_ADDRESS=192.168.71.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf + # Only one slice is defined (1, 0xFFFFFF) - NSSAI_SST_0=1 - NSSAI_SD_0=0xffffff - DNN_0=oai @@ -204,13 +140,6 @@ services: cap_drop: - ALL privileged: true - volumes: - - ../5g_rfsimulator/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh - healthcheck: - test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh" - interval: 10s - timeout: 5s - retries: 5 networks: core_net: ipv4_address: 192.168.71.134 @@ -218,11 +147,10 @@ services: ipv4_address: 192.168.73.134 oai-ext-dn: - image: ubuntu:bionic privileged: true container_name: rfsim5g-oai-ext-dn + image: oaisoftwarealliance/trf-gen-cn5g:latest entrypoint: /bin/bash -c \ - "apt update; apt install -y procps iptables iproute2 iperf iputils-ping;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "ip route add 12.1.1.0/24 via 192.168.73.134 dev eth0; sleep infinity" depends_on: @@ -237,7 +165,7 @@ services: retries: 5 oai-cucp: - image: oai-gnb:develop + image: oaisoftwarealliance/oai-gnb:develop privileged: true container_name: rfsim5g-oai-cucp environment: @@ -259,7 +187,7 @@ services: retries: 5 oai-cuup: - image: oai-nr-cuup:develop + image: oaisoftwarealliance/oai-nr-cuup:develop privileged: true container_name: rfsim5g-oai-cuup environment: @@ -282,7 +210,7 @@ services: retries: 5 oai-du: - image: oai-gnb:develop + image: oaisoftwarealliance/oai-gnb:develop privileged: true container_name: rfsim5g-oai-du environment: @@ -301,7 +229,7 @@ services: retries: 5 oai-nr-ue: - image: oai-nr-ue:develop + image: oaisoftwarealliance/oai-nr-ue:develop privileged: true container_name: rfsim5g-oai-nr-ue environment: From 31d6a5e9bdcb5a4962549ceb771c49b076dff3a4 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 14 Feb 2023 15:25:05 +0100 Subject: [PATCH 12/12] chore(ci): pushing oai-nr-cuup new image to docker-hub Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-push-registry | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/Jenkinsfile-push-registry b/ci-scripts/Jenkinsfile-push-registry index 273b3876be..d05c167f6f 100644 --- a/ci-scripts/Jenkinsfile-push-registry +++ b/ci-scripts/Jenkinsfile-push-registry @@ -77,7 +77,7 @@ pipeline { withCredentials([ [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.DH_Credentials}", usernameVariable: 'DH_Username', passwordVariable: 'DH_Password'] ]) { - def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue"] + def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue", "oai-nr-cuup"] // Logging in on both registries sh "docker login -u ${DH_Username} -p ${DH_Password} > /dev/null 2>&1" sh "docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"