Commit d8a6ba7c authored by Laura Dominguez's avatar Laura Dominguez
Browse files

CCIPS implementation in Teraflow with NETCONF-SSH as SBI

parent 6c3e4c4c
Loading
Loading
Loading
Loading
+6 −0
Changes for common_requirements.in: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -24,3 +24,9 @@ protobuf==3.20.*
pytest==6.2.5
pytest-benchmark==3.4.1
python-dateutil==2.8.2
python-json-logger==2.0.2
ncclient==0.7.1
python-socketio==5.17.0
flask==3.1.3
pydantic==2.6.3
flask-restful==0.3.10
 No newline at end of file
+143 −0
Changes for common_requirements.txt: 143 added lines, 0 removed lines.
Original line number Diff line number Diff line
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
#    pip-compile --cert=None --client-cert=None --index-url=None --no-index --output-file=common_requirements.txt --pip-args=None common_requirements.in
#
aniso8601==10.0.1
    # via flask-restful
annotated-types==0.8.0
    # via pydantic
attrs==26.1.0
    # via pytest
bcrypt==5.0.0
    # via paramiko
bidict==0.23.1
    # via python-socketio
blinker==1.9.0
    # via flask
cffi==2.1.1
    # via
    #   cryptography
    #   pynacl
click==8.5.0
    # via flask
coverage==6.3
    # via -r common_requirements.in
cryptography==50.0.1
    # via paramiko
flask==3.1.3
    # via
    #   -r common_requirements.in
    #   flask-restful
flask-restful==0.3.10
    # via -r common_requirements.in
grpcio==1.47.5
    # via
    #   -r common_requirements.in
    #   grpcio-health-checking
    #   grpcio-reflection
    #   grpcio-tools
grpcio-health-checking==1.47.5
    # via -r common_requirements.in
grpcio-reflection==1.47.5
    # via -r common_requirements.in
grpcio-tools==1.47.5
    # via -r common_requirements.in
grpclib==0.4.4
    # via -r common_requirements.in
h11==0.16.0
    # via wsproto
h2==4.4.1
    # via grpclib
hpack==4.2.0
    # via h2
hyperframe==6.1.0
    # via h2
iniconfig==2.3.0
    # via pytest
invoke==3.0.3
    # via paramiko
itsdangerous==2.2.0
    # via flask
jinja2==3.1.6
    # via flask
lxml==6.1.3
    # via ncclient
markupsafe==3.0.3
    # via
    #   flask
    #   jinja2
    #   werkzeug
multidict==6.9.0
    # via grpclib
ncclient==0.7.1
    # via -r common_requirements.in
packaging==26.3
    # via pytest
paramiko==5.0.0
    # via ncclient
pluggy==1.6.0
    # via pytest
prettytable==3.5.0
    # via -r common_requirements.in
prometheus-client==0.13.0
    # via -r common_requirements.in
protobuf==3.20.3
    # via
    #   -r common_requirements.in
    #   grpcio-health-checking
    #   grpcio-reflection
    #   grpcio-tools
py==1.11.0
    # via pytest
py-cpuinfo==9.0.0
    # via pytest-benchmark
pycparser==3.0
    # via cffi
pydantic==2.6.3
    # via -r common_requirements.in
pydantic-core==2.16.3
    # via pydantic
pynacl==1.6.2
    # via paramiko
pytest==6.2.5
    # via
    #   -r common_requirements.in
    #   pytest-benchmark
pytest-benchmark==3.4.1
    # via -r common_requirements.in
python-dateutil==2.8.2
    # via -r common_requirements.in
python-engineio==4.14.0
    # via python-socketio
python-json-logger==2.0.2
    # via -r common_requirements.in
python-socketio==5.17.0
    # via -r common_requirements.in
pytz==2026.4
    # via flask-restful
simple-websocket==1.1.0
    # via python-engineio
six==1.17.0
    # via
    #   flask-restful
    #   grpcio
    #   python-dateutil
toml==0.10.2
    # via pytest
typing-extensions==4.16.0
    # via
    #   cryptography
    #   multidict
    #   pydantic
    #   pydantic-core
wcwidth==0.8.4
    # via prettytable
werkzeug==3.1.8
    # via flask
wsproto==1.3.2
    # via simple-websocket

# The following packages are considered to be unsafe in a requirements file:
# setuptools
+22 −8
Changes for install_requirements.sh: 22 added lines, 8 removed lines.
Original line number Diff line number Diff line
#!/bin/bash
set -euo pipefail
# Copyright 2022-2026 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -50,9 +51,15 @@ echo "Updating PIP, SetupTools and Wheel..."
# Bring basic tooling for other requirements, package compilation, and code linting.
# Ensure next packages get the fixed versions to prevent:
#   "'InstallRequirement' object has no attribute 'use_pep517'"
pip install --upgrade 'pip==25.2'
pip install --upgrade 'setuptools==79.0.0' 'wheel==0.45.1'
pip install --upgrade 'pip-tools==7.3.0'
# Ubuntu/Debian use python3 and python3 -m pip instead of the legacy pip/python commands.
if ! command -v python3 >/dev/null 2>&1; then
    echo "ERROR: python3 is not installed or not in PATH. Install it with: sudo apt-get install -y python3 python3-pip python3-venv"
    exit 1
fi

python3 -m pip install --upgrade 'pip==25.2'
python3 -m pip install --upgrade 'setuptools==79.0.0' 'wheel==0.45.1'
python3 -m pip install --upgrade 'pip-tools==7.3.0'
printf "\n"

echo "Creating integrated requirements file..."
@@ -69,15 +76,22 @@ done
printf "\n"

echo "Compiling requirements..."
# Done in a single step to prevent breaking dependencies between components
pip-compile --quiet --output-file=requirements.txt requirements.in
# Done in a single step to prevent breaking dependencies between components.
# Use the Python 3 environment explicitly so it works on Ubuntu/Debian systems
# where the legacy `pip`/`python` commands are not available.
python3 -m piptools compile --quiet --output-file=requirements.txt requirements.in

if [ ! -f requirements.txt ]; then
    echo "ERROR: requirements.txt was not generated by pip-tools. Check the previous compile error and fix the dependency constraints."
    exit 1
fi
printf "\n"

echo "Installing requirements..."
python -m pip install -r requirements.txt
python3 -m pip install -r install_requirements.txt
printf "\n"

#echo "Removing the temporary files..."
rm requirements.in
rm requirements.txt
rm -f install_requirements.in
rm -f install_requirements.txt
printf "\n"
+76 −0
Changes for manifests/ccipsservice.yaml: 76 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Copyright 2022-2026 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.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: ccipsservice
spec:
  selector:
    matchLabels:
      app: ccipsservice
  template:
    metadata:
      labels:
        app: ccipsservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
        - name: server
          image: labs.etsi.org:5050/tfs/controller/ccips:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 10071
            - containerPort: 9192
          env:
            - name: LOG_LEVEL
              value: "INFO"
          envFrom:
            - secretRef:
                name: crdb-data
            - secretRef:
                name: nats-data
          readinessProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:10071"]
          livenessProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:10071"]
          resources:
            requests:
              cpu: 150m
              memory: 128Mi
            limits:
              cpu: 500m
              memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
  name: ccipsservice
  labels:
    app: ccipsservice
spec:
  type: ClusterIP
  selector:
    app: ccipsservice
  ports:
    - name: grpc
      protocol: TCP
      port: 10071
      targetPort: 10071
    - name: metrics
      protocol: TCP
      port: 9192
      targetPort: 9192

my_deploy.sh

100644 → 100755
+57 −37
Changes for my_deploy.sh: 57 added lines, 37 removed lines.
Original line number Diff line number Diff line
@@ -25,7 +25,8 @@ export DOCKERHUB_USER_NAME=""
export DOCKERHUB_ACCESS_TOKEN=""

# Set the list of components, separated by spaces, you want to build images for, and deploy.
export TFS_COMPONENTS="context device pathcomp service nbi webui"
# CCIPS is intentionally included here so the migrated CCIPS service is built and deployed together with the TeraFlow NBI.
export TFS_COMPONENTS="context device pathcomp service ccips nbi"

# Uncomment to activate Monitoring (old)
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
@@ -94,6 +95,25 @@ export TFS_COMPONENTS="context device pathcomp service nbi webui"
#    export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}"
#fi

# Uncomment to activate CCIPS
#   To manage CCIPS, "service" requires "ccips" to be deployed
#   before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the
#   "ccips" only if "service" is already in TFS_COMPONENTS, and re-export it.
if [[ "$TFS_COMPONENTS" == *"service"* ]]; then
   BEFORE="${TFS_COMPONENTS% service*}"
   AFTER="${TFS_COMPONENTS#* service}"
   export TFS_COMPONENTS="${BEFORE} ccips service ${AFTER}"
fi

# Uncomment to activate CCIPS
#   CCIPS is deployed as a standalone service and is registered by the NBI.
#   Keep it before the NBI so that the endpoint is available when the NBI boots.
if [[ "$TFS_COMPONENTS" == *"nbi"* ]]; then
   BEFORE="${TFS_COMPONENTS% nbi*}"
   AFTER="${TFS_COMPONENTS#* nbi}"
   export TFS_COMPONENTS="${BEFORE} ccips nbi ${AFTER}"
fi

# Uncomment to activate SIMAP Connector
#export TFS_COMPONENTS="${TFS_COMPONENTS} simap_connector"

@@ -113,13 +133,13 @@ export TFS_COMPONENTS="context device pathcomp service nbi webui"


# Set the tag you want to use for your images.
export TFS_IMAGE_TAG="dev"
#export TFS_IMAGE_TAG="dev"

# Set the name of the Kubernetes namespace to deploy TFS to.
export TFS_K8S_NAMESPACE="tfs"
#export TFS_K8S_NAMESPACE="tfs"

# Set additional manifest files to be applied after the deployment
export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml"
#export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml"

# Uncomment to monitor performance of components
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml"
@@ -128,106 +148,106 @@ export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml"
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml"

# Set the new Grafana admin password
export TFS_GRAFANA_PASSWORD="admin123+"
#export TFS_GRAFANA_PASSWORD="admin123+"

# Disable skip-build flag to rebuild the Docker images.
export TFS_SKIP_BUILD=""
#export TFS_SKIP_BUILD=""


# ----- CockroachDB ------------------------------------------------------------

# Set the namespace where CockroackDB will be deployed.
export CRDB_NAMESPACE="crdb"
#export CRDB_NAMESPACE="crdb"

# Set the external port CockroackDB Postgre SQL interface will be exposed to.
export CRDB_EXT_PORT_SQL="26257"
#export CRDB_EXT_PORT_SQL="26257"

# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to.
export CRDB_EXT_PORT_HTTP="8081"
#export CRDB_EXT_PORT_HTTP="8081"

# Set the database username to be used by Context.
export CRDB_USERNAME="tfs"
#export CRDB_USERNAME="tfs"

# Set the database user's password to be used by Context.
export CRDB_PASSWORD="tfs123"
#export CRDB_PASSWORD="tfs123"

# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/crdb.sh for additional details
export CRDB_DEPLOY_MODE="single"
#export CRDB_DEPLOY_MODE="single"

# Disable flag for dropping database, if it exists.
export CRDB_DROP_DATABASE_IF_EXISTS=""
#export CRDB_DROP_DATABASE_IF_EXISTS=""

# Disable flag for re-deploying CockroachDB from scratch.
export CRDB_REDEPLOY=""
#export CRDB_REDEPLOY=""


# ----- NATS -------------------------------------------------------------------

# Set the namespace where NATS will be deployed.
export NATS_NAMESPACE="nats"
#export NATS_NAMESPACE="nats"

# Set the external port NATS Client interface will be exposed to.
export NATS_EXT_PORT_CLIENT="4222"
#export NATS_EXT_PORT_CLIENT="4222"

# Set the external port NATS HTTP Mgmt GUI interface will be exposed to.
export NATS_EXT_PORT_HTTP="8222"
#export NATS_EXT_PORT_HTTP="8222"

# Set NATS installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/nats.sh for additional details
export NATS_DEPLOY_MODE="single"
#export NATS_DEPLOY_MODE="single"

# Disable flag for re-deploying NATS from scratch.
export NATS_REDEPLOY=""
#export NATS_REDEPLOY=""


# ----- Apache Kafka -----------------------------------------------------------

# Set the namespace where Apache Kafka will be deployed.
export KFK_NAMESPACE="kafka"
#export KFK_NAMESPACE="kafka"

# Set the port Apache Kafka server will be exposed to.
export KFK_EXT_PORT_CLIENT="9092"
#export KFK_EXT_PORT_CLIENT="9092"

# Set Kafka installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/kafka.sh for additional details
export KFK_DEPLOY_MODE="single"
#export KFK_DEPLOY_MODE="single"

# Disable flag for re-deploying Kafka from scratch.
export KFK_REDEPLOY=""
#export KFK_REDEPLOY=""


# ----- QuestDB ----------------------------------------------------------------

# Set the namespace where QuestDB will be deployed.
export QDB_NAMESPACE="qdb"
#export QDB_NAMESPACE="qdb"

# Set the external port QuestDB Postgre SQL interface will be exposed to.
export QDB_EXT_PORT_SQL="8812"
#export QDB_EXT_PORT_SQL="8812"

# Set the external port QuestDB Influx Line Protocol interface will be exposed to.
export QDB_EXT_PORT_ILP="9009"
#export QDB_EXT_PORT_ILP="9009"

# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to.
export QDB_EXT_PORT_HTTP="9000"
#export QDB_EXT_PORT_HTTP="9000"

# Set the database username to be used for QuestDB.
export QDB_USERNAME="admin"
#export QDB_USERNAME="admin"

# Set the database user's password to be used for QuestDB.
export QDB_PASSWORD="quest"
#export QDB_PASSWORD="quest"

# Set the table name to be used by Monitoring for KPIs.
export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis"
#export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis"

# Set the table name to be used by Slice for plotting groups.
export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups"
#export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups"

# Disable flag for dropping tables if they exist.
export QDB_DROP_TABLES_IF_EXIST=""
#export QDB_DROP_TABLES_IF_EXIST=""

# Disable flag for re-deploying QuestDB from scratch.
export QDB_REDEPLOY=""
#export QDB_REDEPLOY=""


# ----- Time Series Storage - Prometheus / Grafana Mimir -----------------------
@@ -235,19 +255,19 @@ export QDB_REDEPLOY=""
# Set Time Series Storage installation mode to 'single' (i.e., Prometheus only).
# This option is convenient for development and testing. See ./deploy/all.sh or
# ./deploy/monitoring.sh for additional details.
export TSDB_DEPLOY_MODE="single"
#export TSDB_DEPLOY_MODE="single"


# ----- K8s Observability ------------------------------------------------------

# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to.
export PROM_EXT_PORT_HTTP="9090"
#export PROM_EXT_PORT_HTTP="9090"

# Set the external port Grafana HTTP Dashboards will be exposed to.
export GRAF_EXT_PORT_HTTP="3000"
#export GRAF_EXT_PORT_HTTP="3000"


# ----- Telemetry Config ------------------------------------------------------

# Define a Load Balancer IP for Telemetry Collector components
export LOAD_BALANCER_IP="192.168.5.250" # <-- Change this to match your network
#export LOAD_BALANCER_IP="192.168.5.250" # <-- Change this to match your network
Loading