Skip to content
Snippets Groups Projects
Commit 17681a44 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Tests - Ryu-OpenFlow integration test:

- Testing CI/CD pipeline
- Deactivated CI/CD tests, to be composed later on
parent d8cd5309
No related branches found
No related tags found
2 merge requests!359Release TeraFlowSDN 5.0,!296Resolve "(CTTC) Add OpenFlow support through Ryu SDN controller"
......@@ -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'
my_deploy.sh 100755 → 100644
File mode changed from 100755 to 100644
......@@ -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'
......@@ -16,6 +16,7 @@
build ryu-openflow:
variables:
TEST_NAME: 'ryu-openflow'
IMAGE_TAG: 'mr$CI_MERGE_REQUEST_IID'
stage: build
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
......@@ -25,9 +26,10 @@ build ryu-openflow:
- 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 "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile .
- docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest"
- docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest"
- 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}-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:
......@@ -40,6 +42,20 @@ 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
#
# - >
# docker network create -d bridge --subnet=172.254.253.0/24 --gateway=172.254.253.254
# --ip-range=172.254.253.0/24 na-br
# - >
# docker run -dit --init --name na-t1 --network=na-br --ip 172.254.253.101
# --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/startNetconfAgent-tp.sh:/confd/examples.confd/OC23/startNetconfAgent.sh"
# --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/platform_t1.xml:/confd/examples.confd/OC23/platform.xml"
# asgamb1/oc23bgp.img:latest /confd/examples.confd/OC23/startNetconfAgent.sh
## Deploy TeraFlowSDN and Execute end-2-end test
#end2end_test ryu-openflow:
# timeout: 90m
......
# Copyright 2022-2024 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.
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends iproute2 net-tools openvswitch-switch ca-certificates && \
apt-get install -y --no-install-recommends mininet=2.3.0-1ubuntu1 && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY custom_pentagon_topology.py /opt/custom_pentagon_topology.py
CMD ["python3", "/opt/custom_pentagon_topology.py"]
......@@ -14,7 +14,7 @@
FROM python:3.9-slim
RUN apt-get update && apt-get install -y --no-install-recommends iproute2 tree git && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends git iproute2 && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir --upgrade pip
# NOTE: Ryu 4.34 expects eventlet.wsgi.ALREADY_HANDLED, which disappears in Eventlet ≥ 0.30.3.
......@@ -26,6 +26,4 @@ WORKDIR /opt/ryu-apps
# --- OpenFlow & Ryu REST API ports ---
EXPOSE 6653/tcp 8080/tcp
RUN tree -a /usr/local/lib/python3.9/site-packages/ryu/app/gui_topology/
CMD ["ryu-manager", "--verbose", "--observe-links", "ryu.app.ofctl_rest", "ryu.app.gui_topology.gui_topology"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment