From 635efe54c3c74ceb79bfbfb1873bd300b1b11ec5 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 30 May 2025 11:23:02 +0000 Subject: [PATCH 01/80] CI/CD tests: - Disable all unitary tests - Disable all end-to-end tests but RyuOpenFlow --- .gitlab-ci.yml | 66 ++++++------ src/tests/.gitlab-ci.yml | 24 ++--- src/tests/ryu-openflow/.gitlab-ci.yml | 142 +++++++++----------------- 3 files changed, 93 insertions(+), 139 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1aa5e597d..cc85679d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: - #- local: '/manifests/.gitlab-ci.yml' - - local: '/src/monitoring/.gitlab-ci.yml' - - local: '/src/nbi/.gitlab-ci.yml' - - local: '/src/context/.gitlab-ci.yml' - - local: '/src/device/.gitlab-ci.yml' - - local: '/src/service/.gitlab-ci.yml' - - local: '/src/dbscanserving/.gitlab-ci.yml' - - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - - local: '/src/opticalattackdetector/.gitlab-ci.yml' - - local: '/src/opticalattackmanager/.gitlab-ci.yml' - - local: '/src/opticalcontroller/.gitlab-ci.yml' - - local: '/src/ztp/.gitlab-ci.yml' - - local: '/src/policy/.gitlab-ci.yml' - - local: '/src/automation/.gitlab-ci.yml' - - local: '/src/forecaster/.gitlab-ci.yml' - #- local: '/src/webui/.gitlab-ci.yml' - #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' - - local: '/src/slice/.gitlab-ci.yml' - #- local: '/src/interdomain/.gitlab-ci.yml' - - local: '/src/pathcomp/.gitlab-ci.yml' - #- local: '/src/dlt/.gitlab-ci.yml' - - local: '/src/load_generator/.gitlab-ci.yml' - - local: '/src/bgpls_speaker/.gitlab-ci.yml' - - local: '/src/kpi_manager/.gitlab-ci.yml' - - local: '/src/kpi_value_api/.gitlab-ci.yml' - #- local: '/src/kpi_value_writer/.gitlab-ci.yml' - #- local: '/src/telemetry/.gitlab-ci.yml' - - local: '/src/analytics/.gitlab-ci.yml' - - local: '/src/qos_profile/.gitlab-ci.yml' - - local: '/src/vnt_manager/.gitlab-ci.yml' - - local: '/src/e2e_orchestrator/.gitlab-ci.yml' +# #- local: '/manifests/.gitlab-ci.yml' +# - local: '/src/monitoring/.gitlab-ci.yml' +# - local: '/src/nbi/.gitlab-ci.yml' +# - local: '/src/context/.gitlab-ci.yml' +# - local: '/src/device/.gitlab-ci.yml' +# - local: '/src/service/.gitlab-ci.yml' +# - local: '/src/dbscanserving/.gitlab-ci.yml' +# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' +# - local: '/src/opticalattackdetector/.gitlab-ci.yml' +# - local: '/src/opticalattackmanager/.gitlab-ci.yml' +# - local: '/src/opticalcontroller/.gitlab-ci.yml' +# - local: '/src/ztp/.gitlab-ci.yml' +# - local: '/src/policy/.gitlab-ci.yml' +# - local: '/src/automation/.gitlab-ci.yml' +# - local: '/src/forecaster/.gitlab-ci.yml' +# #- local: '/src/webui/.gitlab-ci.yml' +# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' +# - local: '/src/slice/.gitlab-ci.yml' +# #- local: '/src/interdomain/.gitlab-ci.yml' +# - local: '/src/pathcomp/.gitlab-ci.yml' +# #- local: '/src/dlt/.gitlab-ci.yml' +# - local: '/src/load_generator/.gitlab-ci.yml' +# - local: '/src/bgpls_speaker/.gitlab-ci.yml' +# - local: '/src/kpi_manager/.gitlab-ci.yml' +# - local: '/src/kpi_value_api/.gitlab-ci.yml' +# #- local: '/src/kpi_value_writer/.gitlab-ci.yml' +# #- local: '/src/telemetry/.gitlab-ci.yml' +# - local: '/src/analytics/.gitlab-ci.yml' +# - local: '/src/qos_profile/.gitlab-ci.yml' +# - local: '/src/vnt_manager/.gitlab-ci.yml' +# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index dfccc4726..775bf2167 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -14,16 +14,16 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: - - local: '/src/tests/ofc22/.gitlab-ci.yml' - #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' - - local: '/src/tests/ecoc22/.gitlab-ci.yml' - #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' - #- local: '/src/tests/ofc23/.gitlab-ci.yml' - - local: '/src/tests/ofc24/.gitlab-ci.yml' - - local: '/src/tests/eucnc24/.gitlab-ci.yml' - #- local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' - #- local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' - #- local: '/src/tests/ofc25/.gitlab-ci.yml' - #- local: '/src/tests/ryu-openflow/.gitlab-ci.yml' +# - local: '/src/tests/ofc22/.gitlab-ci.yml' +# #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' +# - local: '/src/tests/ecoc22/.gitlab-ci.yml' +# #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' +# #- local: '/src/tests/ofc23/.gitlab-ci.yml' +# - local: '/src/tests/ofc24/.gitlab-ci.yml' +# - local: '/src/tests/eucnc24/.gitlab-ci.yml' +# #- local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' +# #- local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' +# #- local: '/src/tests/ofc25/.gitlab-ci.yml' + - local: '/src/tests/ryu-openflow/.gitlab-ci.yml' - - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' +# - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 42d595384..112d3b68e 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -56,27 +56,29 @@ build ryu-openflow: # asgamb1/oc23bgp.img:latest /confd/examples.confd/OC23/startNetconfAgent.sh -## Deploy TeraFlowSDN and Execute end-2-end test -#end2end_test ryu-openflow: -# timeout: 90m -# variables: -# TEST_NAME: 'ryu-openflow' -# stage: end2end_test -# # Disable to force running it after all other tasks -# #needs: -# # - build ryu-openflow -# before_script: -# - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY -# - docker ps -aq | xargs -r docker rm -f -# - containerlab destroy --all --cleanup || true -# script: -# # Download Docker image to run the test -# - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" -# -# # Check MicroK8s is ready -# - microk8s status --wait-ready -# - kubectl get pods --all-namespaces -# +# Deploy TeraFlowSDN and Execute end-2-end test +end2end_test ryu-openflow: + timeout: 90m + variables: + TEST_NAME: 'ryu-openflow' + IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' + stage: end2end_test + # Disable to force running it after all other tasks + #needs: + # - build ryu-openflow + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker ps -aq | xargs -r docker rm -f + #- containerlab destroy --all --cleanup || true + # cleanup mininet + script: + # Download Docker image to run the test + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" + + # Check MicroK8s is ready + - microk8s status --wait-ready + - kubectl get pods --all-namespaces + # # Deploy ContainerLab Scenario # - RUNNER_PATH=`pwd` # #- cd $PWD/src/tests/${TEST_NAME} @@ -86,16 +88,15 @@ build ryu-openflow: # - cd /tmp/clab/${TEST_NAME} # - containerlab deploy --reconfigure --topo ryu-openflow.clab.yml # - cd $RUNNER_PATH -# + +# deploy ryu + +# deploy mininet + # # Wait for initialization of Device NOSes # - sleep 3 # - docker ps -a # -# # Dump configuration of the routers (before any configuration) -# - containerlab exec --name ryu-openflow --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# # # Configure TeraFlowSDN deployment # # Uncomment if DEBUG log level is needed for the components # #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml @@ -145,49 +146,7 @@ build ryu-openflow: # --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" # $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-onboarding.sh # -# # Run end-to-end test: configure service TFS -# - > -# docker run -t --rm --name ${TEST_NAME} --network=host -# --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" -# --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" -# $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-create.sh -# -# # Dump configuration of the routers (after configure TFS service) -# - containerlab exec --name ryu-openflow --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# -# # Run end-to-end test: test connectivity with ping -# - export TEST1_10=$(containerlab exec --name ryu-openflow --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) -# - echo $TEST1_10 -# - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' -# - export TEST1_1=$(containerlab exec --name ryu-openflow --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.1' --format json) -# - echo $TEST1_1 -# - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' -# - export TEST2_1=$(containerlab exec --name ryu-openflow --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.1' --format json) -# - echo $TEST2_1 -# - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' -# - export TEST2_10=$(containerlab exec --name ryu-openflow --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.10' --format json) -# - echo $TEST2_10 -# - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' -# - export TEST3_1=$(containerlab exec --name ryu-openflow --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.1' --format json) -# - echo $TEST3_1 -# - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' -# - export TEST3_10=$(containerlab exec --name ryu-openflow --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.10' --format json) -# - echo $TEST3_10 -# - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' -# -# # Run end-to-end test: deconfigure service TFS -# - > -# docker run -t --rm --name ${TEST_NAME} --network=host -# --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" -# --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" -# $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-remove.sh -# -# # Dump configuration of the routers (after deconfigure TFS service) -# - containerlab exec --name ryu-openflow --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" +# # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) # # # Run end-to-end test: configure service IETF # - > @@ -196,10 +155,7 @@ build ryu-openflow: # --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" # $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-create.sh # -# # Dump configuration of the routers (after configure IETF service) -# - containerlab exec --name ryu-openflow --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" +# # Dump configuration of the switches (OpenFlow rules configured) (after configure IETF service) # # # Run end-to-end test: test connectivity with ping # - export TEST1_10=$(containerlab exec --name ryu-openflow --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) @@ -228,10 +184,7 @@ build ryu-openflow: # --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" # $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-remove.sh # -# # Dump configuration of the routers (after deconfigure IETF service) -# - containerlab exec --name ryu-openflow --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" +# # Dump configuration of the switches (OpenFlow rules configured) (after deconfigure IETF service) # # # Run end-to-end test: cleanup scenario # - > @@ -241,10 +194,7 @@ build ryu-openflow: # $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-cleanup.sh # # after_script: -# # Dump configuration of the routers (on after_script) -# - containerlab exec --name ryu-openflow --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" -# - containerlab exec --name ryu-openflow --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" +# # Dump configuration of the switches (OpenFlow rules configured) (on after_script) # # # Dump TeraFlowSDN component logs # - source src/tests/${TEST_NAME}/deploy_specs.sh @@ -262,17 +212,21 @@ build ryu-openflow: # - cd /tmp/clab/${TEST_NAME} # - containerlab destroy --topo ryu-openflow.clab.yml --cleanup || true # - sudo rm -rf clab-ryu-openflow/ .ryu-openflow.clab.yml.bak || true + +# destroy ryu +# destroy mininet + # - cd $RUNNER_PATH # - kubectl delete namespaces tfs || true -# -# # Clean old docker images -# - docker images --filter="dangling=true" --quiet | xargs -r docker rmi -# -# #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' -# rules: -# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' -# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' -# artifacts: -# when: always -# reports: -# junit: ./src/tests/${TEST_NAME}/report_*.xml + + # Clean old docker images + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + + #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + artifacts: + when: always + reports: + junit: ./src/tests/${TEST_NAME}/report_*.xml -- GitLab From adc467739b09706b06d14fdbe7137edabebb28b6 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 30 May 2025 11:26:30 +0000 Subject: [PATCH 02/80] CI/CD test Ryu-OpenFlow fix --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 112d3b68e..642a49da5 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -61,7 +61,7 @@ end2end_test ryu-openflow: timeout: 90m variables: TEST_NAME: 'ryu-openflow' - IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' + IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' stage: end2end_test # Disable to force running it after all other tasks #needs: -- GitLab From 8a1310455a3dff33345f828ca0550ea53cad5fe2 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 30 May 2025 11:37:17 +0000 Subject: [PATCH 03/80] Fix CI/CD pipeline for Ryu OpenFlow test --- src/tests/ryu-openflow/.gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 642a49da5..b068bd2cc 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -28,13 +28,15 @@ build ryu-openflow: - echo "CI_MERGE_REQUEST_IID = $CI_MERGE_REQUEST_IID" - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-ryu:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Ryu.Dockerfile . - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-mininet:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Mininet.Dockerfile . + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-ryu:${IMAGE_TAG}" - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-test:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Test.Dockerfile . - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-test:${IMAGE_TAG}" after_script: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + #- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - changes: - src/common/**/*.py - proto/*.proto @@ -72,8 +74,10 @@ end2end_test ryu-openflow: #- containerlab destroy --all --cleanup || true # cleanup mininet script: - # Download Docker image to run the test - - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" + # Download Docker images to run the test + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-test:${IMAGE_TAG}" # Check MicroK8s is ready - microk8s status --wait-ready @@ -225,7 +229,7 @@ end2end_test ryu-openflow: #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + #- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' artifacts: when: always reports: -- GitLab From 63c64cc0cd18c09e203fd2a3e303e2e2dc4a0332 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 30 May 2025 11:42:28 +0000 Subject: [PATCH 04/80] Fix CI/CD pipeline --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc85679d0..1657d3dc0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,6 +19,12 @@ stages: - unit_test - end2end_test +workflow: + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + when: always + - when: never + # include the individual .gitlab-ci.yml of each micro-service and tests include: # #- local: '/manifests/.gitlab-ci.yml' -- GitLab From 1ce39e9c7053a0d976571cd84b8395442a366bfe Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 30 May 2025 11:45:22 +0000 Subject: [PATCH 05/80] Fix CI/CD pipeline for Ryu OpenFlow --- src/tests/ryu-openflow/.gitlab-ci.yml | 4 ---- src/tests/ryu-openflow/Mininet.Dockerfile | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index b068bd2cc..f66a0f135 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -21,11 +21,7 @@ build ryu-openflow: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker ps -aq | xargs -r docker rm -f - - containerlab destroy --all --cleanup || true script: - - echo "CI_PIPELINE_SOURCE = $CI_PIPELINE_SOURCE" - - echo "CI_MERGE_REQUEST_ID = $CI_MERGE_REQUEST_ID" - - echo "CI_MERGE_REQUEST_IID = $CI_MERGE_REQUEST_IID" - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-ryu:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Ryu.Dockerfile . - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-ryu:${IMAGE_TAG}" - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-mininet:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Mininet.Dockerfile . diff --git a/src/tests/ryu-openflow/Mininet.Dockerfile b/src/tests/ryu-openflow/Mininet.Dockerfile index a465297e4..0a829bb49 100644 --- a/src/tests/ryu-openflow/Mininet.Dockerfile +++ b/src/tests/ryu-openflow/Mininet.Dockerfile @@ -22,6 +22,6 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -COPY custom_pentagon_topology.py /opt/custom_pentagon_topology.py +COPY src/tests/ryu-openflow/custom_pentagon_topology.py /opt/custom_pentagon_topology.py CMD ["python3", "/opt/custom_pentagon_topology.py"] -- GitLab From 3c76230f71ce6c9f4d7f9c154ff1b8c648e5c9cd Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 30 May 2025 11:49:07 +0000 Subject: [PATCH 06/80] CI/CD pipeline fix on Ryu OpenFlow --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index f66a0f135..734cf49a0 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -25,7 +25,7 @@ build ryu-openflow: - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-ryu:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Ryu.Dockerfile . - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-ryu:${IMAGE_TAG}" - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-mininet:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Mininet.Dockerfile . - - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-mininet:${IMAGE_TAG}" - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-test:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Test.Dockerfile . - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-test:${IMAGE_TAG}" after_script: -- GitLab From cf2b4b99d7155f7aed38a53a369f5233f89679bf Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Fri, 30 May 2025 13:48:48 +0000 Subject: [PATCH 07/80] deploy ryu and mininet --- src/tests/ryu-openflow/.gitlab-ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 734cf49a0..5ea18b234 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -69,7 +69,8 @@ end2end_test ryu-openflow: - docker ps -aq | xargs -r docker rm -f #- containerlab destroy --all --cleanup || true # cleanup mininet - script: + - docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c + # Download Docker images to run the test - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" @@ -90,12 +91,15 @@ end2end_test ryu-openflow: # - cd $RUNNER_PATH # deploy ryu + - docker network create tfs-test-net + - docker run -d --name ryu --network tfs-test-net "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" # deploy mininet + - docker run -d --name mininet --network tfs-test-net "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # # Wait for initialization of Device NOSes -# - sleep 3 -# - docker ps -a + - sleep 10 + - docker ps -a # # # Configure TeraFlowSDN deployment # # Uncomment if DEBUG log level is needed for the components -- GitLab From 4744209b62cf74e73456ef41a3aacb761f0e4046 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Fri, 30 May 2025 13:55:31 +0000 Subject: [PATCH 08/80] Update file .gitlab-ci.yml --- src/tests/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 775bf2167..c3faacd02 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -24,6 +24,6 @@ include: # #- local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' # #- local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' # #- local: '/src/tests/ofc25/.gitlab-ci.yml' - - local: '/src/tests/ryu-openflow/.gitlab-ci.yml' + - local: '/src/tests/ryu-openflow/.gitlab-ci.yml' # - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' -- GitLab From 1b5f0857dabfe8874456b5cff0bcfb791ca5d177 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Fri, 30 May 2025 13:58:16 +0000 Subject: [PATCH 09/80] Update 2 files - /src/tests/.gitlab-ci.yml - /src/tests/ryu-openflow/.gitlab-ci.yml --- src/tests/.gitlab-ci.yml | 2 +- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index c3faacd02..775bf2167 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -24,6 +24,6 @@ include: # #- local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' # #- local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' # #- local: '/src/tests/ofc25/.gitlab-ci.yml' - - local: '/src/tests/ryu-openflow/.gitlab-ci.yml' + - local: '/src/tests/ryu-openflow/.gitlab-ci.yml' # - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 5ea18b234..90f3ffdc7 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -70,7 +70,7 @@ end2end_test ryu-openflow: #- containerlab destroy --all --cleanup || true # cleanup mininet - docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c - + script: # Download Docker images to run the test - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" -- GitLab From ad271ace673950aaafe3b7d8009ee1624ff45288 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 09:38:45 +0000 Subject: [PATCH 10/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 77 +++++++++++++++------------ 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 90f3ffdc7..70451fc36 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -91,38 +91,47 @@ end2end_test ryu-openflow: # - cd $RUNNER_PATH # deploy ryu - - docker network create tfs-test-net - - docker run -d --name ryu --network tfs-test-net "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker network create -d bridge \ + --subnet=172.254.254.0/24 \ + --gateway=172.254.254.1 \ + tfs-test-net -# deploy mininet - - docker run -d --name mininet --network tfs-test-net "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker run -d --name ryu \ + --network tfs-test-net \ + --ip 172.254.254.10 \ + "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + + # deploy mininet + - docker run -d --name mininet \ + --network tfs-test-net \ + "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # # Wait for initialization of Device NOSes - sleep 10 - docker ps -a # -# # Configure TeraFlowSDN deployment -# # Uncomment if DEBUG log level is needed for the components -# #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml -# #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml -# #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml -# #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml -# #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml -# #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml -# -# - source src/tests/${TEST_NAME}/deploy_specs.sh -# #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" -# #- export TFS_SKIP_BUILD="YES" -# #- export TFS_IMAGE_TAG="latest" -# #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" -# -# # Deploy TeraFlowSDN -# - ./deploy/crdb.sh -# - ./deploy/nats.sh -# - ./deploy/kafka.sh -# - ./deploy/qdb.sh -# - ./deploy/tfs.sh -# - ./deploy/show.sh + Configure TeraFlowSDN deployment + # Uncomment if DEBUG log level is needed for the components + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml +# + - source src/tests/${TEST_NAME}/deploy_specs.sh + - export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + - export TFS_SKIP_BUILD="YES" + - export TFS_IMAGE_TAG="latest" + - echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" +# + Deploy TeraFlowSDN + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/kafka.sh + - ./deploy/qdb.sh + - ./deploy/tfs.sh + - ./deploy/show.sh # # ## Wait for Context to be subscribed to NATS # ## WARNING: this loop is infinite if there is no subscriber (such as monitoring). @@ -141,14 +150,14 @@ end2end_test ryu-openflow: # # break # # fi # # done -# - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server -# -# # Run end-to-end test: onboard scenario -# - > -# docker run -t --rm --name ${TEST_NAME} --network=host -# --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" -# --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" -# $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-onboarding.sh + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server +# + # Run end-to-end test: onboard scenario + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh # # # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) # -- GitLab From a38cc19288116d6635c812a2271e0f8ba34509a8 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 09:44:43 +0000 Subject: [PATCH 11/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 70451fc36..b05d55a60 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -90,21 +90,11 @@ end2end_test ryu-openflow: # - containerlab deploy --reconfigure --topo ryu-openflow.clab.yml # - cd $RUNNER_PATH -# deploy ryu - - docker network create -d bridge \ - --subnet=172.254.254.0/24 \ - --gateway=172.254.254.1 \ - tfs-test-net - - - docker run -d --name ryu \ - --network tfs-test-net \ - --ip 172.254.254.10 \ - "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - - # deploy mininet - - docker run -d --name mininet \ - --network tfs-test-net \ - "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker network rm tfs-test-net || true + - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-net + - docker run -d --name ryu --network tfs-test-net --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker run -d --name mininet --network tfs-test-net "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # # Wait for initialization of Device NOSes - sleep 10 -- GitLab From 2641069e3400cba12a406b44b0701a56044dad8b Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 09:49:09 +0000 Subject: [PATCH 12/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index b05d55a60..0e512db95 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -91,10 +91,9 @@ end2end_test ryu-openflow: # - cd $RUNNER_PATH - docker network rm tfs-test-net || true - - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-net - - docker run -d --name ryu --network tfs-test-net --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - - docker run -d --name mininet --network tfs-test-net "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" - "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # # Wait for initialization of Device NOSes - sleep 10 -- GitLab From e556845778382f66181d2441c7d853504999a57c Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 09:54:03 +0000 Subject: [PATCH 13/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 0e512db95..13c80f075 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -55,7 +55,7 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test -end2end_test ryu-openflow: +end2end_test_ryu-openflow: timeout: 90m variables: TEST_NAME: 'ryu-openflow' -- GitLab From 673008a3bf8682f1ad53a07e7c4f390fa47e267a Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 09:55:13 +0000 Subject: [PATCH 14/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 13c80f075..30df68f52 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -55,7 +55,7 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test -end2end_test_ryu-openflow: +end2end_test ryu-openflow: timeout: 90m variables: TEST_NAME: 'ryu-openflow' @@ -90,10 +90,10 @@ end2end_test_ryu-openflow: # - containerlab deploy --reconfigure --topo ryu-openflow.clab.yml # - cd $RUNNER_PATH - - docker network rm tfs-test-net || true - - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + # - docker network rm tfs-test-net || true + # - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + # - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + # - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # # Wait for initialization of Device NOSes - sleep 10 -- GitLab From fddc8cb86418fea2b5ae4b1baffeab5305cdf106 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:07:32 +0000 Subject: [PATCH 15/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 30df68f52..6b790de61 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -32,7 +32,6 @@ build ryu-openflow: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - #- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - changes: - src/common/**/*.py - proto/*.proto @@ -90,10 +89,10 @@ end2end_test ryu-openflow: # - containerlab deploy --reconfigure --topo ryu-openflow.clab.yml # - cd $RUNNER_PATH - # - docker network rm tfs-test-net || true - # - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - # - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - # - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker network rm tfs-test-net || true + - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # # Wait for initialization of Device NOSes - sleep 10 -- GitLab From 03705c1504a92749e5f4a6e0d4b455e232496b2e Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:15:28 +0000 Subject: [PATCH 16/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 93 ++++++++++++++------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 6b790de61..c3d262a88 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -32,6 +32,7 @@ build ryu-openflow: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + #- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - changes: - src/common/**/*.py - proto/*.proto @@ -69,15 +70,15 @@ end2end_test ryu-openflow: #- containerlab destroy --all --cleanup || true # cleanup mininet - docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c - script: - # Download Docker images to run the test - - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" - - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-test:${IMAGE_TAG}" + #script: + ## Download Docker images to run the test + #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-test:${IMAGE_TAG}" # Check MicroK8s is ready - - microk8s status --wait-ready - - kubectl get pods --all-namespaces + #- microk8s status --wait-ready + #- kubectl get pods --all-namespaces # # Deploy ContainerLab Scenario # - RUNNER_PATH=`pwd` @@ -89,37 +90,37 @@ end2end_test ryu-openflow: # - containerlab deploy --reconfigure --topo ryu-openflow.clab.yml # - cd $RUNNER_PATH - - docker network rm tfs-test-net || true - - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" - -# # Wait for initialization of Device NOSes - - sleep 10 - - docker ps -a -# - Configure TeraFlowSDN deployment - # Uncomment if DEBUG log level is needed for the components - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml -# - - source src/tests/${TEST_NAME}/deploy_specs.sh - - export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" - - export TFS_SKIP_BUILD="YES" - - export TFS_IMAGE_TAG="latest" - - echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" -# - Deploy TeraFlowSDN - - ./deploy/crdb.sh - - ./deploy/nats.sh - - ./deploy/kafka.sh - - ./deploy/qdb.sh - - ./deploy/tfs.sh - - ./deploy/show.sh + #- docker network rm tfs-test-net || true + #- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + #- docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + #- docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" +# +# # # Wait for initialization of Device NOSes + #- sleep 10 + #- docker ps -a +## + # Configure TeraFlowSDN deployment + ## Uncomment if DEBUG log level is needed for the components + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml +## + #- source src/tests/${TEST_NAME}/deploy_specs.sh + #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + #- export TFS_SKIP_BUILD="YES" + #- export TFS_IMAGE_TAG="latest" + #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" +# + # Deploy TeraFlowSDN + # - ./deploy/crdb.sh + # - ./deploy/nats.sh + # - ./deploy/kafka.sh + # - ./deploy/qdb.sh + # - ./deploy/tfs.sh + # - ./deploy/show.sh # # ## Wait for Context to be subscribed to NATS # ## WARNING: this loop is infinite if there is no subscriber (such as monitoring). @@ -138,14 +139,14 @@ end2end_test ryu-openflow: # # break # # fi # # done - - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server -# - # Run end-to-end test: onboard scenario - - > - docker run -t --rm --name ${TEST_NAME} --network=host - --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" - --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh + #- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + + ## Run end-to-end test: onboard scenario + #- > + # docker run -t --rm --name ${TEST_NAME} --network=host + # --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + # --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + # $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh # # # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) # -- GitLab From 4aeb762f6bb9644ebda60fc3c6857f9bcfd97458 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:16:15 +0000 Subject: [PATCH 17/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index c3d262a88..0fff56ed0 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -64,12 +64,12 @@ end2end_test ryu-openflow: # Disable to force running it after all other tasks #needs: # - build ryu-openflow - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - - docker ps -aq | xargs -r docker rm -f - #- containerlab destroy --all --cleanup || true - # cleanup mininet - - docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c + #before_script: + # - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + # - docker ps -aq | xargs -r docker rm -f + # #- containerlab destroy --all --cleanup || true + # # cleanup mininet + # - docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c #script: ## Download Docker images to run the test #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" -- GitLab From 78245bf36615961c9fa9325048efe661baa2c176 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:16:38 +0000 Subject: [PATCH 18/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 0fff56ed0..d70e1a443 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -55,12 +55,12 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test -end2end_test ryu-openflow: - timeout: 90m - variables: - TEST_NAME: 'ryu-openflow' - IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' - stage: end2end_test +#end2end_test ryu-openflow: + #timeout: 90m + #variables: + #TEST_NAME: 'ryu-openflow' + #IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' + #stage: end2end_test # Disable to force running it after all other tasks #needs: # - build ryu-openflow -- GitLab From 815d4ebe471d2e6beebf870e3e9c76d75d2dbea8 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:19:15 +0000 Subject: [PATCH 19/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index d70e1a443..8db2f7cd6 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -55,9 +55,9 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test -#end2end_test ryu-openflow: - #timeout: 90m - #variables: +end2end_test ryu-openflow: + timeout: 90m + variables: #TEST_NAME: 'ryu-openflow' #IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' #stage: end2end_test -- GitLab From b433da472f601756fa1bdb156569801c6d6588e5 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:20:48 +0000 Subject: [PATCH 20/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 8db2f7cd6..47a971965 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -55,7 +55,7 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test -end2end_test ryu-openflow: +end2end_test ryu_openflow: timeout: 90m variables: #TEST_NAME: 'ryu-openflow' -- GitLab From 7ba83be56e7a7568dd86787614a85a60a8ad9fd4 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:28:13 +0000 Subject: [PATCH 21/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 47a971965..d394c7681 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -58,8 +58,8 @@ build ryu-openflow: end2end_test ryu_openflow: timeout: 90m variables: - #TEST_NAME: 'ryu-openflow' - #IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' + TEST_NAME: 'ryu-openflow' + IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' #stage: end2end_test # Disable to force running it after all other tasks #needs: -- GitLab From cb1fc9ed0516a8bdacebf134cb29399d4dad9a58 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:29:01 +0000 Subject: [PATCH 22/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index d394c7681..23e653ec2 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -55,7 +55,7 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test -end2end_test ryu_openflow: +end2end_test ryu-openflow: timeout: 90m variables: TEST_NAME: 'ryu-openflow' -- GitLab From ba49d86d61c5f407fa3bfffd69e8753ba852771c Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:30:44 +0000 Subject: [PATCH 23/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 23e653ec2..b34f292f9 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -55,11 +55,11 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test -end2end_test ryu-openflow: - timeout: 90m - variables: - TEST_NAME: 'ryu-openflow' - IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' +#end2end_test ryu-openflow: +# timeout: 90m +# variables: +# TEST_NAME: 'ryu-openflow' +# IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' #stage: end2end_test # Disable to force running it after all other tasks #needs: -- GitLab From 68c651e6f72f760fdcde8f604e3d3a8bd7132041 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:32:26 +0000 Subject: [PATCH 24/80] add --- src/tests/ryu-openflow/.gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index b34f292f9..23e653ec2 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -55,11 +55,11 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test -#end2end_test ryu-openflow: -# timeout: 90m -# variables: -# TEST_NAME: 'ryu-openflow' -# IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' +end2end_test ryu-openflow: + timeout: 90m + variables: + TEST_NAME: 'ryu-openflow' + IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' #stage: end2end_test # Disable to force running it after all other tasks #needs: -- GitLab From fe57292f3192b1822c3d258100a8f5daba17d24f Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:35:48 +0000 Subject: [PATCH 25/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 23e653ec2..e61312254 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -56,10 +56,10 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test end2end_test ryu-openflow: - timeout: 90m - variables: - TEST_NAME: 'ryu-openflow' - IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' + #timeout: 90m + #variables: + # TEST_NAME: 'ryu-openflow' + # IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' #stage: end2end_test # Disable to force running it after all other tasks #needs: -- GitLab From adac956f787c453986dba96d07bc3a6e0cec99bb Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 10:36:16 +0000 Subject: [PATCH 26/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index e61312254..dafafe3d9 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -55,7 +55,7 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test -end2end_test ryu-openflow: + end2end_test ryu-openflow: #timeout: 90m #variables: # TEST_NAME: 'ryu-openflow' -- GitLab From f8a94d53431ec3219c6cd2164ab657725f15f2c1 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:07:53 +0000 Subject: [PATCH 27/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index dafafe3d9..adbeeaa06 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -55,7 +55,7 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test - end2end_test ryu-openflow: +end2end_test ryu-openflow: #timeout: 90m #variables: # TEST_NAME: 'ryu-openflow' @@ -70,7 +70,7 @@ build ryu-openflow: # #- containerlab destroy --all --cleanup || true # # cleanup mininet # - docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c - #script: + script: ## Download Docker images to run the test #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" -- GitLab From 714c08d53cda15a15d7184b4a42229c142653d6f Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:10:28 +0000 Subject: [PATCH 28/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 65 +++++++++++---------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index adbeeaa06..624b35d35 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -56,49 +56,38 @@ build ryu-openflow: # Deploy TeraFlowSDN and Execute end-2-end test end2end_test ryu-openflow: - #timeout: 90m - #variables: - # TEST_NAME: 'ryu-openflow' - # IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' - #stage: end2end_test - # Disable to force running it after all other tasks - #needs: - # - build ryu-openflow - #before_script: - # - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - # - docker ps -aq | xargs -r docker rm -f - # #- containerlab destroy --all --cleanup || true - # # cleanup mininet - # - docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c + timeout: 90m + variables: + TEST_NAME: 'ryu-openflow' + IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' + stage: end2end_test + Disable to force running it after all other tasks + needs: + - build ryu-openflow + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker ps -aq | xargs -r docker rm -f + #- containerlab destroy --all --cleanup || true + # cleanup mininet + - docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c script: ## Download Docker images to run the test - #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" - #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-test:${IMAGE_TAG}" + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-test:${IMAGE_TAG}" # Check MicroK8s is ready - #- microk8s status --wait-ready - #- kubectl get pods --all-namespaces + - microk8s status --wait-ready + - kubectl get pods --all-namespaces + #run ryu and mininet + - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" -# # Deploy ContainerLab Scenario -# - RUNNER_PATH=`pwd` -# #- cd $PWD/src/tests/${TEST_NAME} -# - mkdir -p /tmp/clab/${TEST_NAME} -# - cp -R src/tests/${TEST_NAME}/clab/* /tmp/clab/${TEST_NAME} -# - tree -la /tmp/clab/${TEST_NAME} -# - cd /tmp/clab/${TEST_NAME} -# - containerlab deploy --reconfigure --topo ryu-openflow.clab.yml -# - cd $RUNNER_PATH - - #- docker network rm tfs-test-net || true - #- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - #- docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - #- docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" -# -# # # Wait for initialization of Device NOSes - #- sleep 10 - #- docker ps -a -## + # Wait for initialization of Device NOSes + - sleep 10 + - docker ps -a +# # Configure TeraFlowSDN deployment ## Uncomment if DEBUG log level is needed for the components #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml -- GitLab From 76869645c23fd3075d12f0a655e2e577f1da848b Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:12:39 +0000 Subject: [PATCH 29/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 29 +++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 624b35d35..5babf4998 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -71,22 +71,25 @@ end2end_test ryu-openflow: # cleanup mininet - docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c script: + - echo "Starting script section" ## Download Docker images to run the test - - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" - - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-test:${IMAGE_TAG}" + #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-test:${IMAGE_TAG}" - # Check MicroK8s is ready - - microk8s status --wait-ready - - kubectl get pods --all-namespaces - #run ryu and mininet - - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" - # Wait for initialization of Device NOSes - - sleep 10 - - docker ps -a + ## Check MicroK8s is ready + #- microk8s status --wait-ready + #- kubectl get pods --all-namespaces + ##run ryu and mininet + #- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + #- docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + #- docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" +# + ## Wait for initialization of Device NOSes + #- sleep 10 + #- docker ps -a + - echo "Finishing script section" # # Configure TeraFlowSDN deployment ## Uncomment if DEBUG log level is needed for the components -- GitLab From d91f6d0a6f7c925bf2bb721d4f78a202ce35f5af Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:13:33 +0000 Subject: [PATCH 30/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 5babf4998..d153ef2b4 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -61,7 +61,7 @@ end2end_test ryu-openflow: TEST_NAME: 'ryu-openflow' IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' stage: end2end_test - Disable to force running it after all other tasks + #Disable to force running it after all other tasks needs: - build ryu-openflow before_script: -- GitLab From bfd6337b06b2d4f38ba307da373b55e4d3888bd4 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:14:57 +0000 Subject: [PATCH 31/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index d153ef2b4..16e5528db 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -73,9 +73,9 @@ end2end_test ryu-openflow: script: - echo "Starting script section" ## Download Docker images to run the test - #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" - #- docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-test:${IMAGE_TAG}" + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}-test:${IMAGE_TAG}" ## Check MicroK8s is ready -- GitLab From c2cb05501e0829a2a47ec1a6e8cdf1890d4e4337 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:15:42 +0000 Subject: [PATCH 32/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 16e5528db..e75535e92 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -79,16 +79,16 @@ end2end_test ryu-openflow: ## Check MicroK8s is ready - #- microk8s status --wait-ready - #- kubectl get pods --all-namespaces + - microk8s status --wait-ready + - kubectl get pods --all-namespaces ##run ryu and mininet - #- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - #- docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - #- docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # ## Wait for initialization of Device NOSes - #- sleep 10 - #- docker ps -a + - sleep 10 + - docker ps -a - echo "Finishing script section" # # Configure TeraFlowSDN deployment -- GitLab From dc2ad01005262b322da001c804baca736d6f00a4 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:26:57 +0000 Subject: [PATCH 33/80] adding switches configuration --- src/tests/ryu-openflow/.gitlab-ci.yml | 50 +++++++++++++++------------ 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index e75535e92..bf7f8acb3 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -100,19 +100,19 @@ end2end_test ryu-openflow: #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml ## - #- source src/tests/${TEST_NAME}/deploy_specs.sh - #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" - #- export TFS_SKIP_BUILD="YES" - #- export TFS_IMAGE_TAG="latest" - #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" -# - # Deploy TeraFlowSDN - # - ./deploy/crdb.sh - # - ./deploy/nats.sh - # - ./deploy/kafka.sh - # - ./deploy/qdb.sh - # - ./deploy/tfs.sh - # - ./deploy/show.sh + - source src/tests/${TEST_NAME}/deploy_specs.sh + - export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + - export TFS_SKIP_BUILD="YES" + - export TFS_IMAGE_TAG="latest" + - echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" +# + Deploy TeraFlowSDN + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/kafka.sh + - ./deploy/qdb.sh + - ./deploy/tfs.sh + - ./deploy/show.sh # # ## Wait for Context to be subscribed to NATS # ## WARNING: this loop is infinite if there is no subscriber (such as monitoring). @@ -131,17 +131,23 @@ end2end_test ryu-openflow: # # break # # fi # # done - #- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server ## Run end-to-end test: onboard scenario - #- > - # docker run -t --rm --name ${TEST_NAME} --network=host - # --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" - # --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - # $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh -# -# # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) -# + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh + +# Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) + - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s1 + - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s2 + - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s3 + - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s4 + - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s5 + + # # Run end-to-end test: configure service IETF # - > # docker run -t --rm --name ${TEST_NAME} --network=host -- GitLab From 4227158cef351cde37eb4fb1fdb6e959d1e75564 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:28:58 +0000 Subject: [PATCH 34/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index bf7f8acb3..6eed537ed 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -100,19 +100,19 @@ end2end_test ryu-openflow: #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml ## - - source src/tests/${TEST_NAME}/deploy_specs.sh - - export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" - - export TFS_SKIP_BUILD="YES" - - export TFS_IMAGE_TAG="latest" - - echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" -# - Deploy TeraFlowSDN - - ./deploy/crdb.sh - - ./deploy/nats.sh - - ./deploy/kafka.sh - - ./deploy/qdb.sh - - ./deploy/tfs.sh - - ./deploy/show.sh + #- source src/tests/${TEST_NAME}/deploy_specs.sh + #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + #- export TFS_SKIP_BUILD="YES" + #- export TFS_IMAGE_TAG="latest" + #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" +## + # Deploy TeraFlowSDN + #- ./deploy/crdb.sh + #- ./deploy/nats.sh + #- ./deploy/kafka.sh + #- ./deploy/qdb.sh + #- ./deploy/tfs.sh + #- ./deploy/show.sh # # ## Wait for Context to be subscribed to NATS # ## WARNING: this loop is infinite if there is no subscriber (such as monitoring). @@ -131,21 +131,21 @@ end2end_test ryu-openflow: # # break # # fi # # done - - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + #- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server ## Run end-to-end test: onboard scenario - - > - docker run -t --rm --name ${TEST_NAME} --network=host - --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" - --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh + #- > + # docker run -t --rm --name ${TEST_NAME} --network=host + # --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + # --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + # $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) - - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s1 - - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s2 - - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s3 - - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s4 - - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s5 + #- docker exec ryu-openflow-mininet ovs-ofctl dump-flows s1 + #- docker exec ryu-openflow-mininet ovs-ofctl dump-flows s2 + #- docker exec ryu-openflow-mininet ovs-ofctl dump-flows s3 + #- docker exec ryu-openflow-mininet ovs-ofctl dump-flows s4 + #- docker exec ryu-openflow-mininet ovs-ofctl dump-flows s5 # # Run end-to-end test: configure service IETF -- GitLab From cd6a36db2c44c93398d81eab57115a8cce89641a Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:30:23 +0000 Subject: [PATCH 35/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 6eed537ed..79bfbb3be 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -100,11 +100,11 @@ end2end_test ryu-openflow: #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml ## - #- source src/tests/${TEST_NAME}/deploy_specs.sh - #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" - #- export TFS_SKIP_BUILD="YES" - #- export TFS_IMAGE_TAG="latest" - #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" + - source src/tests/${TEST_NAME}/deploy_specs.sh + - export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + - export TFS_SKIP_BUILD="YES" + - export TFS_IMAGE_TAG="latest" + - echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" ## # Deploy TeraFlowSDN #- ./deploy/crdb.sh -- GitLab From 7fc724046961d96ffc92f1e659d1ef49df7eaf23 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:34:22 +0000 Subject: [PATCH 36/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 79bfbb3be..72ccbf74e 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -82,6 +82,8 @@ end2end_test ryu-openflow: - microk8s status --wait-ready - kubectl get pods --all-namespaces ##run ryu and mininet + - docker rm -f ryu mininet || true + - docker network rm tfs-test-ryu || true - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" @@ -107,12 +109,12 @@ end2end_test ryu-openflow: - echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" ## # Deploy TeraFlowSDN - #- ./deploy/crdb.sh - #- ./deploy/nats.sh - #- ./deploy/kafka.sh - #- ./deploy/qdb.sh - #- ./deploy/tfs.sh - #- ./deploy/show.sh + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/kafka.sh + - ./deploy/qdb.sh + - ./deploy/tfs.sh + - ./deploy/show.sh # # ## Wait for Context to be subscribed to NATS # ## WARNING: this loop is infinite if there is no subscriber (such as monitoring). -- GitLab From a36567dd48b7a1f3c3a34681d74d7c563895d7a1 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 11:39:02 +0000 Subject: [PATCH 37/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 72ccbf74e..e366ea854 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -133,14 +133,14 @@ end2end_test ryu-openflow: # # break # # fi # # done - #- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server ## Run end-to-end test: onboard scenario - #- > - # docker run -t --rm --name ${TEST_NAME} --network=host - # --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" - # --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - # $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) #- docker exec ryu-openflow-mininet ovs-ofctl dump-flows s1 -- GitLab From 25228cc81637d207dc4878154b32aea1a3b79f13 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 12:10:27 +0000 Subject: [PATCH 38/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index e366ea854..cc74d00b4 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -137,7 +137,7 @@ end2end_test ryu-openflow: ## Run end-to-end test: onboard scenario - > - docker run -t --rm --name ${TEST_NAME} --network=host + docker run -t --rm --name ${TEST_NAME}-test --network=host --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh -- GitLab From a6fdac6d15cf156987c60b19053cecf369d55d2d Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 12:25:11 +0000 Subject: [PATCH 39/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index cc74d00b4..5e389aac2 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -137,10 +137,10 @@ end2end_test ryu-openflow: ## Run end-to-end test: onboard scenario - > - docker run -t --rm --name ${TEST_NAME}-test --network=host + docker run -t --rm --name ${TEST_NAME}-test --network=host --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - $CI_REGISTRY_IMAGE/${TEST_NAME}:${IMAGE_TAG} /var/teraflow/run-onboarding.sh + $CI_REGISTRY_IMAGE/${TEST_NAME}-test :${IMAGE_TAG} /var/teraflow/run-onboarding.sh # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) #- docker exec ryu-openflow-mininet ovs-ofctl dump-flows s1 -- GitLab From 6b884554e97bb7ebaa898e522e47d06063347b71 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 12:38:54 +0000 Subject: [PATCH 40/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 5e389aac2..6263b9f82 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -137,10 +137,10 @@ end2end_test ryu-openflow: ## Run end-to-end test: onboard scenario - > - docker run -t --rm --name ${TEST_NAME}-test --network=host + docker run -t --rm --name ${TEST_NAME} --network=host --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - $CI_REGISTRY_IMAGE/${TEST_NAME}-test :${IMAGE_TAG} /var/teraflow/run-onboarding.sh + "${CI_REGISTRY_IMAGE}/${TEST_NAME}-test:${IMAGE_TAG}" /var/teraflow/run-onboarding.sh # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) #- docker exec ryu-openflow-mininet ovs-ofctl dump-flows s1 -- GitLab From 0bc68ddb40707a98e597536e662949af6e8af33e Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 13:02:23 +0000 Subject: [PATCH 41/80] Update file tfs-topology.json --- src/tests/ryu-openflow/data/tfs-topology.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/data/tfs-topology.json b/src/tests/ryu-openflow/data/tfs-topology.json index e427f16ea..fda873aa9 100644 --- a/src/tests/ryu-openflow/data/tfs-topology.json +++ b/src/tests/ryu-openflow/data/tfs-topology.json @@ -14,7 +14,7 @@ { "device_id": {"device_uuid": {"uuid": "RYU"}}, "device_type": "openflow-ryu-controller", "device_drivers": ["DEVICEDRIVER_RYU"], "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.254.10"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"timeout": 120}}} ]} -- GitLab From 381c2c8006f8c3af18bef7cdb3aafe725bc96605 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 19:41:30 +0000 Subject: [PATCH 42/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 6263b9f82..eb7c37465 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -84,7 +84,8 @@ end2end_test ryu-openflow: ##run ryu and mininet - docker rm -f ryu mininet || true - docker network rm tfs-test-ryu || true - - docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + #- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + - docker network create -d bridge --subnet=172.20.0.0/24 --gateway=172.20.0.1 tfs-test-ryu - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # -- GitLab From 20f7194c4a90c7e2623e31539cb639ec74c6eb21 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 20:32:05 +0000 Subject: [PATCH 43/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index eb7c37465..e71f0e29a 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -86,7 +86,7 @@ end2end_test ryu-openflow: - docker network rm tfs-test-ryu || true #- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - docker network create -d bridge --subnet=172.20.0.0/24 --gateway=172.20.0.1 tfs-test-ryu - - docker run -d --name ryu --network tfs-test-ryu --ip 172.254.254.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - docker run -d --name ryu --network tfs-test-ryu --ip 172.20.0.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # ## Wait for initialization of Device NOSes -- GitLab From 0379381c8e87e20cdd31df6bfe97f846d03a3ec8 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 20:43:04 +0000 Subject: [PATCH 44/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index e71f0e29a..b46eb3208 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -84,7 +84,7 @@ end2end_test ryu-openflow: ##run ryu and mininet - docker rm -f ryu mininet || true - docker network rm tfs-test-ryu || true - #- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + ##- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - docker network create -d bridge --subnet=172.20.0.0/24 --gateway=172.20.0.1 tfs-test-ryu - docker run -d --name ryu --network tfs-test-ryu --ip 172.20.0.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" -- GitLab From d77c1287c632c7d2adfaff99e708229b5b61af24 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 20:51:48 +0000 Subject: [PATCH 45/80] Update file tfs-topology.json --- src/tests/ryu-openflow/data/tfs-topology.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/data/tfs-topology.json b/src/tests/ryu-openflow/data/tfs-topology.json index fda873aa9..d7823d4bb 100644 --- a/src/tests/ryu-openflow/data/tfs-topology.json +++ b/src/tests/ryu-openflow/data/tfs-topology.json @@ -14,7 +14,7 @@ { "device_id": {"device_uuid": {"uuid": "RYU"}}, "device_type": "openflow-ryu-controller", "device_drivers": ["DEVICEDRIVER_RYU"], "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.254.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.20.0.10"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8080"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"timeout": 120}}} ]} -- GitLab From 13db3625541a1b3de8614c998efd8b5bf5b27955 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 21:00:01 +0000 Subject: [PATCH 46/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index b46eb3208..d24b4ce9b 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -84,7 +84,7 @@ end2end_test ryu-openflow: ##run ryu and mininet - docker rm -f ryu mininet || true - docker network rm tfs-test-ryu || true - ##- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu + ###- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - docker network create -d bridge --subnet=172.20.0.0/24 --gateway=172.20.0.1 tfs-test-ryu - docker run -d --name ryu --network tfs-test-ryu --ip 172.20.0.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" -- GitLab From 35669c02c497f84147a197a3240f4a616f923797 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 21:20:03 +0000 Subject: [PATCH 47/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index d24b4ce9b..8042ea003 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -113,7 +113,7 @@ end2end_test ryu-openflow: - ./deploy/crdb.sh - ./deploy/nats.sh - ./deploy/kafka.sh - - ./deploy/qdb.sh + #- ./deploy/qdb.sh - ./deploy/tfs.sh - ./deploy/show.sh # -- GitLab From 00cd26b643fc16aeafbb2bca63e16c0ee96c5fe0 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 21:36:55 +0000 Subject: [PATCH 48/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 8042ea003..f0abeb1da 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -93,15 +93,21 @@ end2end_test ryu-openflow: - sleep 10 - docker ps -a - echo "Finishing script section" -# +# Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) + - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s1 + - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s2 + - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s3 + - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s4 + - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s5 + # Configure TeraFlowSDN deployment ## Uncomment if DEBUG log level is needed for the components - #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml - #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml - #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml - #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml - #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml - #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml ## - source src/tests/${TEST_NAME}/deploy_specs.sh - export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" -- GitLab From 8cc04e0497caac63057dd8c197faaf69e08a75f0 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 21:48:57 +0000 Subject: [PATCH 49/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index f0abeb1da..d14793681 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -94,11 +94,11 @@ end2end_test ryu-openflow: - docker ps -a - echo "Finishing script section" # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) - - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s1 - - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s2 - - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s3 - - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s4 - - docker exec ryu-openflow-mininet ovs-ofctl dump-flows s5 + - docker exec mininet ovs-ofctl dump-flows s1 + - docker exec mininet ovs-ofctl dump-flows s2 + - docker exec mininet ovs-ofctl dump-flows s3 + - docker exec mininet ovs-ofctl dump-flows s4 + - docker exec mininet ovs-ofctl dump-flows s5 # Configure TeraFlowSDN deployment ## Uncomment if DEBUG log level is needed for the components -- GitLab From f30acc7916f5094969df2ab19caf803348f9a519 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 22:13:48 +0000 Subject: [PATCH 50/80] Update file custom_pentagon_topology.py --- src/tests/ryu-openflow/custom_pentagon_topology.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/custom_pentagon_topology.py b/src/tests/ryu-openflow/custom_pentagon_topology.py index 03605f24a..e6a305555 100644 --- a/src/tests/ryu-openflow/custom_pentagon_topology.py +++ b/src/tests/ryu-openflow/custom_pentagon_topology.py @@ -18,6 +18,7 @@ from mininet.net import Mininet from mininet.node import RemoteController from mininet.cli import CLI from mininet.link import TCLink +import time class PentagonTopo(Topo): def build(self): @@ -51,5 +52,7 @@ if __name__ == '__main__': net.staticArp() print('Custom Pentagon Topology is up with static ARP.') - CLI(net) + #CLI(net) + while True: + time.sleep(60) net.stop() -- GitLab From 9f82b9d2c60652501c5bf848f23b2ee2a128437a Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 22:19:56 +0000 Subject: [PATCH 51/80] Update file custom_pentagon_topology.py --- src/tests/ryu-openflow/custom_pentagon_topology.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/tests/ryu-openflow/custom_pentagon_topology.py b/src/tests/ryu-openflow/custom_pentagon_topology.py index e6a305555..970bfd58c 100644 --- a/src/tests/ryu-openflow/custom_pentagon_topology.py +++ b/src/tests/ryu-openflow/custom_pentagon_topology.py @@ -53,6 +53,13 @@ if __name__ == '__main__': print('Custom Pentagon Topology is up with static ARP.') #CLI(net) + try: while True: - time.sleep(60) - net.stop() + time.sleep(60) + except KeyboardInterrupt: + print("Stopping topology.") + finally: + net.stop() + #while True: + #time.sleep(60) + #net.stop() -- GitLab From ca437f088875463953f4347c601a5a540d0392b6 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 22:40:15 +0000 Subject: [PATCH 52/80] Update file custom_pentagon_topology.py --- src/tests/ryu-openflow/custom_pentagon_topology.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ryu-openflow/custom_pentagon_topology.py b/src/tests/ryu-openflow/custom_pentagon_topology.py index 970bfd58c..9f3efbcda 100644 --- a/src/tests/ryu-openflow/custom_pentagon_topology.py +++ b/src/tests/ryu-openflow/custom_pentagon_topology.py @@ -54,8 +54,8 @@ if __name__ == '__main__': print('Custom Pentagon Topology is up with static ARP.') #CLI(net) try: - while True: - time.sleep(60) + while True: + time.sleep(60) except KeyboardInterrupt: print("Stopping topology.") finally: -- GitLab From 4ccce6ef4abaf0042e8d293592bad65898ece3d3 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 2 Jun 2025 22:45:33 +0000 Subject: [PATCH 53/80] Update 2 files - /src/tests/ryu-openflow/custom_pentagon_topology.py - /src/tests/ryu-openflow/.gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 ++ src/tests/ryu-openflow/custom_pentagon_topology.py | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index d14793681..52cc38c76 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -94,6 +94,8 @@ end2end_test ryu-openflow: - docker ps -a - echo "Finishing script section" # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) + - docker exec mininet ovs-vsctl show + - docker logs mininet - docker exec mininet ovs-ofctl dump-flows s1 - docker exec mininet ovs-ofctl dump-flows s2 - docker exec mininet ovs-ofctl dump-flows s3 diff --git a/src/tests/ryu-openflow/custom_pentagon_topology.py b/src/tests/ryu-openflow/custom_pentagon_topology.py index 9f3efbcda..616890dad 100644 --- a/src/tests/ryu-openflow/custom_pentagon_topology.py +++ b/src/tests/ryu-openflow/custom_pentagon_topology.py @@ -53,13 +53,8 @@ if __name__ == '__main__': print('Custom Pentagon Topology is up with static ARP.') #CLI(net) - try: - while True: - time.sleep(60) - except KeyboardInterrupt: - print("Stopping topology.") - finally: - net.stop() + while True: + time.sleep(60) #while True: #time.sleep(60) #net.stop() -- GitLab From f6928d6c488d270ea55386c8666156b9f2c2f0b0 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 10:47:10 +0000 Subject: [PATCH 54/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 52cc38c76..8a833db5a 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -92,6 +92,8 @@ end2end_test ryu-openflow: ## Wait for initialization of Device NOSes - sleep 10 - docker ps -a + - docker logs ryu + - docker logs mininet - echo "Finishing script section" # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) - docker exec mininet ovs-vsctl show -- GitLab From aa1ee7023727e1003db8810cd211dc0183508e8b Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 11:06:31 +0000 Subject: [PATCH 55/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 8a833db5a..91759effa 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -87,6 +87,7 @@ end2end_test ryu-openflow: ###- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - docker network create -d bridge --subnet=172.20.0.0/24 --gateway=172.20.0.1 tfs-test-ryu - docker run -d --name ryu --network tfs-test-ryu --ip 172.20.0.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" + - sleep 30 - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # ## Wait for initialization of Device NOSes -- GitLab From e0121a0ad6a873cf22a2cdf93fa4d95d9c1dbc30 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 12:09:51 +0000 Subject: [PATCH 56/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 91759effa..474e24642 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -87,7 +87,13 @@ end2end_test ryu-openflow: ###- docker network create -d bridge --subnet=172.254.254.0/24 --gateway=172.254.254.1 tfs-test-ryu - docker network create -d bridge --subnet=172.20.0.0/24 --gateway=172.20.0.1 tfs-test-ryu - docker run -d --name ryu --network tfs-test-ryu --ip 172.20.0.10 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-ryu:${IMAGE_TAG}" - - sleep 30 + - | + echo "Waiting for Ryu to be ready..." + until curl -s http://172.20.0.10:8080 >/dev/null; do + echo "Still waiting..." + sleep 5 + done + echo "Ryu is ready!" - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # ## Wait for initialization of Device NOSes -- GitLab From 67aa32fa6fcc9fb78cab558471da5e46b9e1699b Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 12:21:45 +0000 Subject: [PATCH 57/80] Update file custom_pentagon_topology.py --- src/tests/ryu-openflow/custom_pentagon_topology.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/custom_pentagon_topology.py b/src/tests/ryu-openflow/custom_pentagon_topology.py index 616890dad..310cb4dc9 100644 --- a/src/tests/ryu-openflow/custom_pentagon_topology.py +++ b/src/tests/ryu-openflow/custom_pentagon_topology.py @@ -46,7 +46,7 @@ class PentagonTopo(Topo): if __name__ == '__main__': topo = PentagonTopo() - net = Mininet(topo=topo, controller=lambda name: RemoteController(name, ip='127.0.0.1'), link=TCLink) + net = Mininet(topo=topo, controller=lambda name: RemoteController(name, ip='172.20.0.10'), link=TCLink) net.start() net.staticArp() -- GitLab From 3c1f6a1571ffa689308c35f7ae759ddb609f2ab1 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 12:39:44 +0000 Subject: [PATCH 58/80] Update file custom_pentagon_topology.py --- src/tests/ryu-openflow/custom_pentagon_topology.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/custom_pentagon_topology.py b/src/tests/ryu-openflow/custom_pentagon_topology.py index 310cb4dc9..5d9012866 100644 --- a/src/tests/ryu-openflow/custom_pentagon_topology.py +++ b/src/tests/ryu-openflow/custom_pentagon_topology.py @@ -46,7 +46,7 @@ class PentagonTopo(Topo): if __name__ == '__main__': topo = PentagonTopo() - net = Mininet(topo=topo, controller=lambda name: RemoteController(name, ip='172.20.0.10'), link=TCLink) + net = Mininet(topo=topo, controller=lambda name: RemoteController(name, ip='172.20.0.10', port=6653), link=TCLink) net.start() net.staticArp() -- GitLab From d18e25bc9649b60a047ac9bc6fb130773010387e Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 13:35:05 +0000 Subject: [PATCH 59/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 474e24642..c3c52ef9a 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -94,7 +94,7 @@ end2end_test ryu-openflow: sleep 5 done echo "Ryu is ready!" - - docker run -d --name mininet --network tfs-test-ryu "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # ## Wait for initialization of Device NOSes - sleep 10 -- GitLab From 6281d306ab0356e30ac16b35870f0c6666f3dabb Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 13:42:51 +0000 Subject: [PATCH 60/80] Update file docker-compose.yml --- src/tests/ryu-openflow/docker-compose.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/tests/ryu-openflow/docker-compose.yml b/src/tests/ryu-openflow/docker-compose.yml index 611129592..5d1204b7d 100644 --- a/src/tests/ryu-openflow/docker-compose.yml +++ b/src/tests/ryu-openflow/docker-compose.yml @@ -18,3 +18,15 @@ services: build: context: . dockerfile: Ryu.Dockerfile + +version: '3' +services: + mininet: + build: + context: . + image: mininet + tty: true + privileged: true + network_mode: "host" + volumes: + - /lib/modules:/lib/modules \ No newline at end of file -- GitLab From cbcb9bd3b413176672ce19b5b3ca96ba0cc87a6d Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 15:10:32 +0000 Subject: [PATCH 61/80] Update 2 files - /src/tests/ryu-openflow/docker-compose.yml - /src/tests/ryu-openflow/.gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 1 + src/tests/ryu-openflow/docker-compose.yml | 13 +------------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index c3c52ef9a..ae44c1762 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -99,6 +99,7 @@ end2end_test ryu-openflow: ## Wait for initialization of Device NOSes - sleep 10 - docker ps -a + - docker inspect mininet - docker logs ryu - docker logs mininet - echo "Finishing script section" diff --git a/src/tests/ryu-openflow/docker-compose.yml b/src/tests/ryu-openflow/docker-compose.yml index 5d1204b7d..b4892184a 100644 --- a/src/tests/ryu-openflow/docker-compose.yml +++ b/src/tests/ryu-openflow/docker-compose.yml @@ -18,15 +18,4 @@ services: build: context: . dockerfile: Ryu.Dockerfile - -version: '3' -services: - mininet: - build: - context: . - image: mininet - tty: true - privileged: true - network_mode: "host" - volumes: - - /lib/modules:/lib/modules \ No newline at end of file + -- GitLab From 6bcf93aa3dbe337edaa18589234368a57621cbaf Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 15:53:46 +0000 Subject: [PATCH 62/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index ae44c1762..bfc7340a3 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -94,7 +94,13 @@ end2end_test ryu-openflow: sleep 5 done echo "Ryu is ready!" - - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 \ + --privileged \ + --ulimit memlock=-1:-1 \ + --ulimit nofile=65536:65536 \ + --ulimit nproc=65536:65536 \ + mininet-image-name + # - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # ## Wait for initialization of Device NOSes - sleep 10 -- GitLab From 201f9ddf42620f9356c8a22d60d1cb0ec9754cab Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 15:57:07 +0000 Subject: [PATCH 63/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index bfc7340a3..524aba2d8 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -94,12 +94,8 @@ end2end_test ryu-openflow: sleep 5 done echo "Ryu is ready!" - - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 \ - --privileged \ - --ulimit memlock=-1:-1 \ - --ulimit nofile=65536:65536 \ - --ulimit nproc=65536:65536 \ - mininet-image-name + + - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 --privileged --ulimit memlock=-1:-1 --ulimit nofile=65536:65536 --ulimit nproc=65536:65536 mininet-image-name # - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # ## Wait for initialization of Device NOSes -- GitLab From 553d8c3f7fc0d1858e0d62b5a126d0f2ebecf324 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 16:01:11 +0000 Subject: [PATCH 64/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 524aba2d8..ba38db4bf 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -95,7 +95,7 @@ end2end_test ryu-openflow: done echo "Ryu is ready!" - - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 --privileged --ulimit memlock=-1:-1 --ulimit nofile=65536:65536 --ulimit nproc=65536:65536 mininet-image-name + - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 --privileged --ulimit memlock=-1:-1 --ulimit nofile=65536:65536 --ulimit nproc=65536:65536 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # ## Wait for initialization of Device NOSes -- GitLab From 3019b226bd0dca9cd2bf0f2ca0d6fbc927e3ab8e Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 10 Jun 2025 16:08:04 +0000 Subject: [PATCH 65/80] Update file Mininet.Dockerfile --- src/tests/ryu-openflow/Mininet.Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/Mininet.Dockerfile b/src/tests/ryu-openflow/Mininet.Dockerfile index 0a829bb49..4b6bee010 100644 --- a/src/tests/ryu-openflow/Mininet.Dockerfile +++ b/src/tests/ryu-openflow/Mininet.Dockerfile @@ -24,4 +24,7 @@ RUN apt-get update && \ COPY src/tests/ryu-openflow/custom_pentagon_topology.py /opt/custom_pentagon_topology.py -CMD ["python3", "/opt/custom_pentagon_topology.py"] +CMD sh -c "/usr/share/openvswitch/scripts/ovs-ctl start && python3 /opt/custom_pentagon_topology.py" + + +#CMD ["python3", "/opt/custom_pentagon_topology.py"] -- GitLab From 34c6ff0c23bd79eba4b64d4b8540a16dd5f5d9d1 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Wed, 11 Jun 2025 09:37:38 +0000 Subject: [PATCH 66/80] Update file Mininet.Dockerfile --- src/tests/ryu-openflow/Mininet.Dockerfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/tests/ryu-openflow/Mininet.Dockerfile b/src/tests/ryu-openflow/Mininet.Dockerfile index 4b6bee010..5fb95e6d0 100644 --- a/src/tests/ryu-openflow/Mininet.Dockerfile +++ b/src/tests/ryu-openflow/Mininet.Dockerfile @@ -23,8 +23,4 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* COPY src/tests/ryu-openflow/custom_pentagon_topology.py /opt/custom_pentagon_topology.py - -CMD sh -c "/usr/share/openvswitch/scripts/ovs-ctl start && python3 /opt/custom_pentagon_topology.py" - - -#CMD ["python3", "/opt/custom_pentagon_topology.py"] +CMD ["python3", "/opt/custom_pentagon_topology.py"] -- GitLab From 7c89ed58fc3f703cb875cefd864106e9773d8147 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 26 Jun 2025 17:34:33 +0000 Subject: [PATCH 67/80] Ryu-OpenFlow CI/CD test - Fixed docker exec commands --- src/tests/ryu-openflow/.gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index ba38db4bf..073e5c29f 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -106,13 +106,13 @@ end2end_test ryu-openflow: - docker logs mininet - echo "Finishing script section" # Dump configuration of the switches (OpenFlow rules configured) (before configure IETF service) - - docker exec mininet ovs-vsctl show + - docker exec mininet bash -c "ovs-vsctl show" - docker logs mininet - - docker exec mininet ovs-ofctl dump-flows s1 - - docker exec mininet ovs-ofctl dump-flows s2 - - docker exec mininet ovs-ofctl dump-flows s3 - - docker exec mininet ovs-ofctl dump-flows s4 - - docker exec mininet ovs-ofctl dump-flows s5 + - docker exec mininet bash -c "ovs-ofctl dump-flows s1" + - docker exec mininet bash -c "ovs-ofctl dump-flows s2" + - docker exec mininet bash -c "ovs-ofctl dump-flows s3" + - docker exec mininet bash -c "ovs-ofctl dump-flows s4" + - docker exec mininet bash -c "ovs-ofctl dump-flows s5" # Configure TeraFlowSDN deployment ## Uncomment if DEBUG log level is needed for the components -- GitLab From b2e882ec5a61edeac987ceafde1f7a298f3a24ec Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 26 Jun 2025 17:44:39 +0000 Subject: [PATCH 68/80] Ryu-OpenFlow CI/CD test - Corrected mininet dockerfile --- src/tests/ryu-openflow/Mininet.Dockerfile | 11 +++++++++-- .../{ => mininet}/custom_pentagon_topology.py | 0 src/tests/ryu-openflow/mininet/mininet-entrypoint.sh | 8 ++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) rename src/tests/ryu-openflow/{ => mininet}/custom_pentagon_topology.py (100%) create mode 100644 src/tests/ryu-openflow/mininet/mininet-entrypoint.sh diff --git a/src/tests/ryu-openflow/Mininet.Dockerfile b/src/tests/ryu-openflow/Mininet.Dockerfile index 5fb95e6d0..1d6328554 100644 --- a/src/tests/ryu-openflow/Mininet.Dockerfile +++ b/src/tests/ryu-openflow/Mininet.Dockerfile @@ -14,6 +14,9 @@ FROM ubuntu:22.04 +USER root +WORKDIR /root + ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get install -y --no-install-recommends iproute2 net-tools openvswitch-switch ca-certificates && \ @@ -22,5 +25,9 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -COPY src/tests/ryu-openflow/custom_pentagon_topology.py /opt/custom_pentagon_topology.py -CMD ["python3", "/opt/custom_pentagon_topology.py"] +COPY src/tests/ryu-openflow/mininet/custom_pentagon_topology.py /opt/custom_pentagon_topology.py +COPY src/tests/ryu-openflow/mininet/mininet-entrypoint.sh /mininet-entrypoint.sh + +EXPOSE 6633 6653 6640 + +ENTRYPOINT ["/mininet-entrypoint.sh"] diff --git a/src/tests/ryu-openflow/custom_pentagon_topology.py b/src/tests/ryu-openflow/mininet/custom_pentagon_topology.py similarity index 100% rename from src/tests/ryu-openflow/custom_pentagon_topology.py rename to src/tests/ryu-openflow/mininet/custom_pentagon_topology.py diff --git a/src/tests/ryu-openflow/mininet/mininet-entrypoint.sh b/src/tests/ryu-openflow/mininet/mininet-entrypoint.sh new file mode 100644 index 000000000..b5eb4066f --- /dev/null +++ b/src/tests/ryu-openflow/mininet/mininet-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +service openvswitch-switch start +ovs-vsctl set-manager ptcp:6640 + +python3 /opt/custom_pentagon_topology.py + +service openvswitch-switch stop -- GitLab From 97b3c55a7a4cebde7792457316cec4b149556138 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 26 Jun 2025 17:47:11 +0000 Subject: [PATCH 69/80] Ryu-OpenFlow CI/CD test - Corrected mininet dockerfile entrypoint permissions --- src/tests/ryu-openflow/mininet/mininet-entrypoint.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 src/tests/ryu-openflow/mininet/mininet-entrypoint.sh diff --git a/src/tests/ryu-openflow/mininet/mininet-entrypoint.sh b/src/tests/ryu-openflow/mininet/mininet-entrypoint.sh old mode 100644 new mode 100755 -- GitLab From 199ceb30c8b0ae10747ccbe10576743a61596fb7 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 26 Jun 2025 17:54:47 +0000 Subject: [PATCH 70/80] Ryu-OpenFlow CI/CD test - Added ACK - Corrected mininet instantiation --- src/tests/ryu-openflow/.gitlab-ci.yml | 6 +++--- .../ryu-openflow/{ => mininet}/Mininet.Dockerfile | 2 ++ src/tests/ryu-openflow/mininet/README.md | 3 +++ .../ryu-openflow/mininet/mininet-entrypoint.sh | 15 +++++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) rename src/tests/ryu-openflow/{ => mininet}/Mininet.Dockerfile (95%) create mode 100644 src/tests/ryu-openflow/mininet/README.md diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 073e5c29f..e3181fb76 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -24,7 +24,7 @@ build ryu-openflow: script: - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-ryu:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Ryu.Dockerfile . - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-ryu:${IMAGE_TAG}" - - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-mininet:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Mininet.Dockerfile . + - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-mininet:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/mininet/Mininet.Dockerfile . - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-mininet:${IMAGE_TAG}" - docker buildx build -t "$CI_REGISTRY_IMAGE/${TEST_NAME}-test:${IMAGE_TAG}" -f ./src/tests/${TEST_NAME}/Test.Dockerfile . - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}-test:${IMAGE_TAG}" @@ -95,9 +95,9 @@ end2end_test ryu-openflow: done echo "Ryu is ready!" - - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 --privileged --ulimit memlock=-1:-1 --ulimit nofile=65536:65536 --ulimit nproc=65536:65536 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" + - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 --privileged --ulimit memlock=-1:-1 --ulimit nofile=65536:65536 --ulimit nproc=65536:65536 --volume /lib/modules:/lib/modules "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" # - docker run -d --name mininet --network tfs-test-ryu --ip 172.20.0.11 "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" -# + ## Wait for initialization of Device NOSes - sleep 10 - docker ps -a diff --git a/src/tests/ryu-openflow/Mininet.Dockerfile b/src/tests/ryu-openflow/mininet/Mininet.Dockerfile similarity index 95% rename from src/tests/ryu-openflow/Mininet.Dockerfile rename to src/tests/ryu-openflow/mininet/Mininet.Dockerfile index 1d6328554..ea18a3dd8 100644 --- a/src/tests/ryu-openflow/Mininet.Dockerfile +++ b/src/tests/ryu-openflow/mininet/Mininet.Dockerfile @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Based on: https://github.com/iwaseyusuke/docker-mininet + FROM ubuntu:22.04 USER root diff --git a/src/tests/ryu-openflow/mininet/README.md b/src/tests/ryu-openflow/mininet/README.md new file mode 100644 index 000000000..8cc106555 --- /dev/null +++ b/src/tests/ryu-openflow/mininet/README.md @@ -0,0 +1,3 @@ +# Docker-containerized Mininet environment + +- Based on: https://github.com/iwaseyusuke/docker-mininet diff --git a/src/tests/ryu-openflow/mininet/mininet-entrypoint.sh b/src/tests/ryu-openflow/mininet/mininet-entrypoint.sh index b5eb4066f..525e89d0a 100755 --- a/src/tests/ryu-openflow/mininet/mininet-entrypoint.sh +++ b/src/tests/ryu-openflow/mininet/mininet-entrypoint.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Based on: https://github.com/iwaseyusuke/docker-mininet service openvswitch-switch start ovs-vsctl set-manager ptcp:6640 -- GitLab From ed3162863dfa808d2e4cf5a0435d2fd843b30b4f Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 30 Jun 2025 13:13:00 +0000 Subject: [PATCH 71/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index e3181fb76..d20d038af 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -32,7 +32,7 @@ build ryu-openflow: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - #- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + ##- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - changes: - src/common/**/*.py - proto/*.proto -- GitLab From d4e94f13b4bcb7b3349aa1b1c163066feea38ada Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 1 Jul 2025 15:01:24 +0000 Subject: [PATCH 72/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index d20d038af..532f2cc96 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -32,7 +32,7 @@ build ryu-openflow: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - ##- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + ###- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - changes: - src/common/**/*.py - proto/*.proto -- GitLab From d97308ea2dcf5b5b83b16f13465712e2bca3fe5f Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Fri, 8 Aug 2025 13:22:38 +0000 Subject: [PATCH 73/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 532f2cc96..2b6f82cdd 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -14,7 +14,7 @@ # Build, tag, and push the Docker image to the GitLab Docker registry build ryu-openflow: - variables: + variables: TEST_NAME: 'ryu-openflow' IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' stage: build @@ -40,7 +40,7 @@ build ryu-openflow: - src/tests/${TEST_NAME}/Dockerfile - .gitlab-ci.yml - +# # - docker rm -f na-t1 na-t2 na-r1 na-r2 # - docker network rm -f na-br # -- GitLab From 4622ac2e30f5a0b8c543382d8cb3a758749d2afe Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 11 Aug 2025 11:12:42 +0000 Subject: [PATCH 74/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 2b6f82cdd..a62fd7dce 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -69,7 +69,7 @@ end2end_test ryu-openflow: - docker ps -aq | xargs -r docker rm -f #- containerlab destroy --all --cleanup || true # cleanup mininet - - docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c + #- docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c script: - echo "Starting script section" ## Download Docker images to run the test -- GitLab From 0afea6987f9d9aafb0b968fac88d4213a54707bc Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 11 Aug 2025 11:31:37 +0000 Subject: [PATCH 75/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index a62fd7dce..6f7031743 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -116,12 +116,12 @@ end2end_test ryu-openflow: # Configure TeraFlowSDN deployment ## Uncomment if DEBUG log level is needed for the components - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml ## - source src/tests/${TEST_NAME}/deploy_specs.sh - export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" @@ -171,12 +171,12 @@ end2end_test ryu-openflow: #- docker exec ryu-openflow-mininet ovs-ofctl dump-flows s5 -# # Run end-to-end test: configure service IETF -# - > -# docker run -t --rm --name ${TEST_NAME} --network=host -# --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" -# --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" -# $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-create.sh + # Run end-to-end test: configure service IETF + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-create.sh # # # Dump configuration of the switches (OpenFlow rules configured) (after configure IETF service) # -- GitLab From 94c3f9ec8e7494c8e885892c1cb35bdac5234391 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 11 Aug 2025 15:20:56 +0000 Subject: [PATCH 76/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 6f7031743..16271301b 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -122,20 +122,21 @@ end2end_test ryu-openflow: #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml -## + - source src/tests/${TEST_NAME}/deploy_specs.sh - - export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" - - export TFS_SKIP_BUILD="YES" - - export TFS_IMAGE_TAG="latest" - - echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" -## + #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + #- export TFS_SKIP_BUILD="YES" + #- export TFS_IMAGE_TAG="latest" + #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" + # Deploy TeraFlowSDN - ./deploy/crdb.sh - ./deploy/nats.sh - ./deploy/kafka.sh - #- ./deploy/qdb.sh + - ./deploy/qdb.sh - ./deploy/tfs.sh - ./deploy/show.sh + # # ## Wait for Context to be subscribed to NATS # ## WARNING: this loop is infinite if there is no subscriber (such as monitoring). -- GitLab From 021355ec42340e126130793ee5ba8ae101a79ec8 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Tue, 12 Aug 2025 10:29:13 +0000 Subject: [PATCH 77/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 16271301b..d574ff670 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -67,7 +67,6 @@ end2end_test ryu-openflow: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker ps -aq | xargs -r docker rm -f - #- containerlab destroy --all --cleanup || true # cleanup mininet #- docker run --rm "${CI_REGISTRY_IMAGE}/${TEST_NAME}-mininet:${IMAGE_TAG}" mn -c script: -- GitLab From e9ad6c8e9a766c24064c207dad7449520c850560 Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 25 Aug 2025 11:10:57 +0000 Subject: [PATCH 78/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index d574ff670..a111dec69 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -40,7 +40,7 @@ build ryu-openflow: - src/tests/${TEST_NAME}/Dockerfile - .gitlab-ci.yml -# + # - docker rm -f na-t1 na-t2 na-r1 na-r2 # - docker network rm -f na-br # -- GitLab From 344b68b51c78f91e5a174f8fa473f3aba33c38fc Mon Sep 17 00:00:00 2001 From: Mohamad Rahhal Date: Mon, 25 Aug 2025 13:26:04 +0000 Subject: [PATCH 79/80] Update file .gitlab-ci.yml --- src/tests/ryu-openflow/.gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index a111dec69..56b1a235b 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -39,8 +39,6 @@ build ryu-openflow: - src/tests/${TEST_NAME}/**/*.{py,in,sh,yml} - src/tests/${TEST_NAME}/Dockerfile - .gitlab-ci.yml - - # - docker rm -f na-t1 na-t2 na-r1 na-r2 # - docker network rm -f na-br # -- GitLab From 5d59451b663fa867b1931eccad7bf513bbea14df Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 26 Aug 2025 08:08:25 +0000 Subject: [PATCH 80/80] Ryu E2E Integration Test: - Resolve merge conflict in CI/CD pipeline descriptors --- .gitlab-ci.yml | 40 +---------------------- src/tests/.gitlab-ci.yml | 22 ++----------- src/tests/ryu-openflow/.gitlab-ci.yml | 2 +- src/tests/ryu-openflow/docker-compose.yml | 1 - 4 files changed, 5 insertions(+), 60 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 823dfd753..c8fcd83a6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,13 +27,13 @@ workflow: # include the individual .gitlab-ci.yml of each micro-service and tests include: -<<<<<<< HEAD # #- local: '/manifests/.gitlab-ci.yml' # - local: '/src/monitoring/.gitlab-ci.yml' # - local: '/src/nbi/.gitlab-ci.yml' # - local: '/src/context/.gitlab-ci.yml' # - local: '/src/device/.gitlab-ci.yml' # - local: '/src/service/.gitlab-ci.yml' +# - local: '/src/qkd_app/.gitlab-ci.yml' # - local: '/src/dbscanserving/.gitlab-ci.yml' # - local: '/src/opticalattackmitigator/.gitlab-ci.yml' # - local: '/src/opticalattackdetector/.gitlab-ci.yml' @@ -63,44 +63,6 @@ include: # - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # - local: '/src/ztp_server/.gitlab-ci.yml' # - local: '/src/osm_client/.gitlab-ci.yml' -======= - #- local: '/manifests/.gitlab-ci.yml' - - local: '/src/monitoring/.gitlab-ci.yml' - - local: '/src/nbi/.gitlab-ci.yml' - - local: '/src/context/.gitlab-ci.yml' - - local: '/src/device/.gitlab-ci.yml' - - local: '/src/service/.gitlab-ci.yml' - - local: '/src/qkd_app/.gitlab-ci.yml' - - local: '/src/dbscanserving/.gitlab-ci.yml' - - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - - local: '/src/opticalattackdetector/.gitlab-ci.yml' - - local: '/src/opticalattackmanager/.gitlab-ci.yml' - - local: '/src/opticalcontroller/.gitlab-ci.yml' - - local: '/src/ztp/.gitlab-ci.yml' - - local: '/src/policy/.gitlab-ci.yml' - - local: '/src/automation/.gitlab-ci.yml' - - local: '/src/forecaster/.gitlab-ci.yml' - #- local: '/src/webui/.gitlab-ci.yml' - #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' - - local: '/src/slice/.gitlab-ci.yml' - #- local: '/src/interdomain/.gitlab-ci.yml' - - local: '/src/pathcomp/.gitlab-ci.yml' - #- local: '/src/dlt/.gitlab-ci.yml' - - local: '/src/load_generator/.gitlab-ci.yml' - - local: '/src/bgpls_speaker/.gitlab-ci.yml' - - local: '/src/kpi_manager/.gitlab-ci.yml' - - local: '/src/kpi_value_api/.gitlab-ci.yml' - #- local: '/src/kpi_value_writer/.gitlab-ci.yml' - #- local: '/src/telemetry/.gitlab-ci.yml' - - local: '/src/analytics/.gitlab-ci.yml' - - local: '/src/qos_profile/.gitlab-ci.yml' - - local: '/src/vnt_manager/.gitlab-ci.yml' - - local: '/src/e2e_orchestrator/.gitlab-ci.yml' - - local: '/src/ztp_server/.gitlab-ci.yml' - - local: '/src/osm_client/.gitlab-ci.yml' ->>>>>>> e3f502c37e9ed4060edf0d3af0a22857867233b3 # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 4a5788147..98c0c1eb6 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -14,7 +14,6 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: -<<<<<<< HEAD # - local: '/src/tests/ofc22/.gitlab-ci.yml' # #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' # - local: '/src/tests/ecoc22/.gitlab-ci.yml' @@ -26,23 +25,8 @@ include: # #- local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' # #- local: '/src/tests/ofc25/.gitlab-ci.yml' - local: '/src/tests/ryu-openflow/.gitlab-ci.yml' +# - local: '/src/tests/qkd_end2end/.gitlab-ci.yml' # - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' -======= - - local: '/src/tests/ofc22/.gitlab-ci.yml' - #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' - - local: '/src/tests/ecoc22/.gitlab-ci.yml' - #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' - #- local: '/src/tests/ofc23/.gitlab-ci.yml' - - local: '/src/tests/ofc24/.gitlab-ci.yml' - - local: '/src/tests/eucnc24/.gitlab-ci.yml' - #- local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' - #- local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' - #- local: '/src/tests/ofc25/.gitlab-ci.yml' - #- local: '/src/tests/ryu-openflow/.gitlab-ci.yml' - - local: '/src/tests/qkd_end2end/.gitlab-ci.yml' - - - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' - - local: '/src/tests/tools/mock_qkd_node/.gitlab-ci.yml' - - local: '/src/tests/tools/mock_osm_nbi/.gitlab-ci.yml' ->>>>>>> e3f502c37e9ed4060edf0d3af0a22857867233b3 +# - local: '/src/tests/tools/mock_qkd_node/.gitlab-ci.yml' +# - local: '/src/tests/tools/mock_osm_nbi/.gitlab-ci.yml' diff --git a/src/tests/ryu-openflow/.gitlab-ci.yml b/src/tests/ryu-openflow/.gitlab-ci.yml index 56b1a235b..18e35f454 100644 --- a/src/tests/ryu-openflow/.gitlab-ci.yml +++ b/src/tests/ryu-openflow/.gitlab-ci.yml @@ -14,7 +14,7 @@ # Build, tag, and push the Docker image to the GitLab Docker registry build ryu-openflow: - variables: + variables: TEST_NAME: 'ryu-openflow' IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID' stage: build diff --git a/src/tests/ryu-openflow/docker-compose.yml b/src/tests/ryu-openflow/docker-compose.yml index b4892184a..611129592 100644 --- a/src/tests/ryu-openflow/docker-compose.yml +++ b/src/tests/ryu-openflow/docker-compose.yml @@ -18,4 +18,3 @@ services: build: context: . dockerfile: Ryu.Dockerfile - -- GitLab