From 6d7b87772d1c705c95d7bb55cbde3fe197d5c344 Mon Sep 17 00:00:00 2001 From: velazquez Date: Tue, 4 Aug 2026 12:14:30 +0200 Subject: [PATCH 1/3] Create Helm chart --- helm/nsc/Chart.yaml | 6 ++ helm/nsc/templates/_helpers.tpl | 62 ++++++++++++++++ helm/nsc/templates/configmap.yaml | 29 ++++++++ helm/nsc/templates/deployment.yaml | 82 ++++++++++++++++++++++ helm/nsc/templates/ingress.yaml | 43 ++++++++++++ helm/nsc/templates/secret.yaml | 10 +++ helm/nsc/templates/service.yaml | 15 ++++ helm/nsc/templates/serviceaccount.yaml | 12 ++++ helm/nsc/values.yaml | 97 ++++++++++++++++++++++++++ 9 files changed, 356 insertions(+) create mode 100644 helm/nsc/Chart.yaml create mode 100644 helm/nsc/templates/_helpers.tpl create mode 100644 helm/nsc/templates/configmap.yaml create mode 100644 helm/nsc/templates/deployment.yaml create mode 100644 helm/nsc/templates/ingress.yaml create mode 100644 helm/nsc/templates/secret.yaml create mode 100644 helm/nsc/templates/service.yaml create mode 100644 helm/nsc/templates/serviceaccount.yaml create mode 100644 helm/nsc/values.yaml diff --git a/helm/nsc/Chart.yaml b/helm/nsc/Chart.yaml new file mode 100644 index 0000000..4a7c7d1 --- /dev/null +++ b/helm/nsc/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: nsc +description: A Helm chart for Kubernetes deployment of the Network Slice Controller (NSC) +type: application +version: 0.1.0 +appVersion: "1.0.0" diff --git a/helm/nsc/templates/_helpers.tpl b/helm/nsc/templates/_helpers.tpl new file mode 100644 index 0000000..e754ec5 --- /dev/null +++ b/helm/nsc/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "nsc.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "nsc.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "nsc.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "nsc.labels" -}} +helm.sh/chart: {{ include "nsc.chart" . }} +{{ include "nsc.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "nsc.selectorLabels" -}} +app.kubernetes.io/name: {{ include "nsc.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "nsc.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "nsc.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/helm/nsc/templates/configmap.yaml b/helm/nsc/templates/configmap.yaml new file mode 100644 index 0000000..4c48b8a --- /dev/null +++ b/helm/nsc/templates/configmap.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "nsc.fullname" . }}-config + labels: + {{- include "nsc.labels" . | nindent 4 }} +data: + NSC_PORT: {{ .Values.service.port | quote }} + LOGGING_LEVEL: {{ .Values.config.loggingLevel | quote }} + DUMP_TEMPLATES: {{ .Values.config.dumpTemplates | quote }} + NRP_ENABLED: {{ .Values.config.nrpEnabled | quote }} + PLANNER_ENABLED: {{ .Values.config.plannerEnabled | quote }} + PCE_EXTERNAL: {{ .Values.config.pceExternal | quote }} + PLANNER_TYPE: {{ .Values.config.plannerType | quote }} + HRAT_IP: {{ .Values.config.hratIp | quote }} + E2E_OPTICAL_IP: {{ .Values.config.e2eOpticalIp | quote }} + SUBSCRIBE_ALERTS: {{ .Values.config.subscribeAlerts | quote }} + SUBSCRIBE_ALERTS_URL: {{ .Values.config.subscribeAlertsUrl | quote }} + DUMMY_MODE: {{ .Values.config.dummyMode | quote }} + TFS_IP: {{ .Values.config.tfsIp | quote }} + UPLOAD_TYPE: {{ .Values.config.uploadType | quote }} + TFS_L2VPN_SUPPORT: {{ .Values.config.tfsL2vpnSupport | quote }} + IXIA_IP: {{ .Values.config.ixiaIp | quote }} + TFS_E2E_IP: {{ .Values.config.tfsE2eIp | quote }} + RESTCONF_IP: {{ .Values.config.restconfIp | quote }} + SDN_CONTROLLER_TYPE: {{ .Values.config.sdnControllerType | quote }} + DATAPLANE_SUPPORT: {{ .Values.config.dataplaneSupport | quote }} + SDN_SUBSCRIPTION_PERIOD: {{ .Values.config.sdnSubscriptionPeriod | quote }} + WEBUI_DEPLOY: {{ .Values.config.webuiDeploy | quote }} diff --git a/helm/nsc/templates/deployment.yaml b/helm/nsc/templates/deployment.yaml new file mode 100644 index 0000000..d1983a5 --- /dev/null +++ b/helm/nsc/templates/deployment.yaml @@ -0,0 +1,82 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "nsc.fullname" . }} + labels: + {{- include "nsc.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "nsc.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + rollout-timestamp: {{ now | quote }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "nsc.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "nsc.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + envFrom: + - configMapRef: + name: {{ include "nsc.fullname" . }}-config + - secretRef: + name: {{ include "nsc.fullname" . }}-secret + {{- if .Values.probes.liveness.enabled }} + livenessProbe: + httpGet: + path: /nsc + port: http + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }} + failureThreshold: {{ .Values.probes.liveness.failureThreshold }} + {{- end }} + {{- if .Values.probes.readiness.enabled }} + readinessProbe: + httpGet: + path: /nsc + port: http + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + failureThreshold: {{ .Values.probes.readiness.failureThreshold }} + {{- end }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/helm/nsc/templates/ingress.yaml b/helm/nsc/templates/ingress.yaml new file mode 100644 index 0000000..3296d96 --- /dev/null +++ b/helm/nsc/templates/ingress.yaml @@ -0,0 +1,43 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "nsc.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "nsc.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/helm/nsc/templates/secret.yaml b/helm/nsc/templates/secret.yaml new file mode 100644 index 0000000..480cd33 --- /dev/null +++ b/helm/nsc/templates/secret.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "nsc.fullname" . }}-secret + labels: + {{- include "nsc.labels" . | nindent 4 }} +type: Opaque +data: + API_USERNAME: {{ .Values.secretConfig.apiUsername | b64enc | quote }} + API_PASSWORD: {{ .Values.secretConfig.apiPassword | b64enc | quote }} diff --git a/helm/nsc/templates/service.yaml b/helm/nsc/templates/service.yaml new file mode 100644 index 0000000..f00f40a --- /dev/null +++ b/helm/nsc/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "nsc.fullname" . }} + labels: + {{- include "nsc.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "nsc.selectorLabels" . | nindent 4 }} diff --git a/helm/nsc/templates/serviceaccount.yaml b/helm/nsc/templates/serviceaccount.yaml new file mode 100644 index 0000000..35aa813 --- /dev/null +++ b/helm/nsc/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "nsc.serviceAccountName" . }} + labels: + {{- include "nsc.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/nsc/values.yaml b/helm/nsc/values.yaml new file mode 100644 index 0000000..e0b2ea4 --- /dev/null +++ b/helm/nsc/values.yaml @@ -0,0 +1,97 @@ +# Default values for nsc. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: nsc + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 8085 + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: nsc.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +probes: + liveness: + enabled: true + initialDelaySeconds: 15 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + readiness: + enabled: true + initialDelaySeconds: 15 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 10 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# NSC Application Configuration (populated dynamically via deploy.sh from .env) +config: {} +secretConfig: {} -- GitLab From a045ddf9e844bf4335e7a6d4d7b42fba66b09714 Mon Sep 17 00:00:00 2001 From: velazquez Date: Tue, 4 Aug 2026 12:15:04 +0200 Subject: [PATCH 2/3] Update docs --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c05f28c..fb2a9e4 100644 --- a/README.md +++ b/README.md @@ -165,19 +165,66 @@ In the `src/config/.env.example` file, several constants can be adjusted to cust ## Usage -To use the NSC, just build the image an run it in a container following these steps: +To use the NSC, just build the image and run it in a container following these steps: 1. **Deploy** + - Deploy as a local Docker container: + ```bash + ./deploy.sh + ``` + - Deploy to Kubernetes using Helm: + ```bash + ./deploy.sh --helm + ``` + +2. **Send Slice Requests**: + + Send slice requests via **API** (`/nsc`) or **WebUI** (`/webui`). + +### Kubernetes Deployment with Helm + +You can deploy the Network Slice Controller (NSC) to a Kubernetes cluster using the provided Helm chart. + +#### Prerequisites +- A Kubernetes cluster (e.g., Minikube, Kind, or a remote cluster) +- [Helm v3](https://helm.sh/docs/intro/install/) installed +- Docker image built and loaded into the cluster or registered in a registry. + +#### Installation + +1. **Deploy using the Deployment Script (Recommended)**: + ```bash + ./deploy.sh --helm ``` - ./deploy.sh + +2. **Alternatively, deploy manually**: + ```bash + # Build Docker Image + docker build -t nsc:latest . + + # Install with default values + helm install nsc ./helm/nsc + + # Or override configuration variables on install + helm install nsc ./helm/nsc --set config.dummyMode=true --set secretConfig.apiPassword=mysecurepassword ``` -2. **Send Slice Requests**: - Send slice requests via **API** (/nsc) or **WebUI** (/webui) +#### Configuration +You can customize the deployment by modifying the [values.yaml](file:///c:/Users/id03125/OneDrive%20-%20Telefonica/Trabajo/Network%20slicing/Network%20Slice%20Controller/nsc/helm/nsc/values.yaml) file or by using the `--set` option on the CLI. Key variables include: +- `service.port`: Port to expose the NSC (default: `8085`). +- `config.*`: Application configuration variables matching the parameters in `.env` (e.g., `config.loggingLevel`, `config.tfsIp`, `config.dummyMode`). +- `secretConfig.apiUsername` and `secretConfig.apiPassword`: Basic auth credentials for the API. + +#### Uninstallation +To remove the deployed chart: + ```bash + helm uninstall nsc + ``` ## Available branches and releases + [![Latest Release](https://labs.etsi.org/rep/tfs/nsc/-/badges/release.svg)](https://labs.etsi.org/rep/tfs/nsc/-/releases) - The branch `main` ([![pipeline status](https://labs.etsi.org/rep/tfs/nsc/badges/main/pipeline.svg)](https://labs.etsi.org/rep/tfs/nsc/-/commits/main) [![coverage report](https://labs.etsi.org/rep/tfs/nsc/badges/main/coverage.svg)](https://labs.etsi.org/rep/tfs/nsc/-/commits/main)), points always to the latest stable version of the TeraFlowSDN Network Slice Controller (NSC). -- GitLab From ec9860fbbfecb94bde8b7d6bfb7da438ee59c517 Mon Sep 17 00:00:00 2001 From: velazquez Date: Tue, 4 Aug 2026 12:15:22 +0200 Subject: [PATCH 3/3] Update deploy to include flag for helm deployment --- app.py | 3 +- deploy.sh | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 120 insertions(+), 9 deletions(-) diff --git a/app.py b/app.py index 5a57b2a..5ab0e81 100644 --- a/app.py +++ b/app.py @@ -34,7 +34,8 @@ from src.database.alert_db import init_db as init_alert # /nsc → Swagger UI # /swaggerui → Swagger UI static assets (flask-restx) # /swagger → swagger.json spec file (flask-restx) -UNAUTHENTICATED_PREFIXES = ("/nsc", "/swaggerui", "/swagger") +# /webui → WebUI login page +UNAUTHENTICATED_PREFIXES = ("/nsc", "/swaggerui", "/swagger", "/webui") def _unauthorized_response(): diff --git a/deploy.sh b/deploy.sh index d47a19d..355081e 100755 --- a/deploy.sh +++ b/deploy.sh @@ -19,6 +19,46 @@ # Container name CONTAINER_NAME=nsc +# Default deployment mode is Docker container +DEPLOY_MODE="docker" + +# Help message +show_help() { + echo "Usage: ./deploy.sh [OPTIONS]" + echo "Options:" + echo " --helm, -k, --kubernetes Deploy using Helm on Kubernetes" + echo " -h, --help Show this help message" +} + +# Helper to read values from .env with fallback to .env.example +get_env_val() { + local key=$1 + local default=$2 + local val="" + + # 1. Try to read from root .env + if [ -f .env ]; then + val=$(grep "^${key}=" .env | cut -d '=' -f2- | tr -d '\r') + fi + + # 2. If not found, try to read from src/config/.env.example + if [ -z "$val" ] && [ -f src/config/.env.example ]; then + val=$(grep "^${key}=" src/config/.env.example | cut -d '=' -f2- | tr -d '\r') + fi + + # 3. Return the value or the hardcoded default + echo "${val:-$default}" +} + +# Parse arguments +while [[ "$#" -gt 0 ]]; do + case $1 in + --helm|-k|--kubernetes) DEPLOY_MODE="helm"; shift ;; + -h|--help) show_help; exit 0 ;; + *) echo "Unknown parameter: $1"; show_help; exit 1 ;; + esac +done + # Verify if docker is active if ! docker info > /dev/null 2>&1; then echo "Error: Docker not running. Please, restart Docker service and try again." @@ -52,14 +92,84 @@ else cp src/config/.env.example .env fi -# Read NSC_PORT from .env -NSC_PORT=$(grep '^NSC_PORT=' .env | cut -d '=' -f2) +# Read all variables from .env +NSC_PORT=$(get_env_val "NSC_PORT" "8085") +LOGGING_LEVEL=$(get_env_val "LOGGING_LEVEL" "INFO") +DUMP_TEMPLATES=$(get_env_val "DUMP_TEMPLATES" "false") +NRP_ENABLED=$(get_env_val "NRP_ENABLED" "false") +PLANNER_ENABLED=$(get_env_val "PLANNER_ENABLED" "false") +PLANNER_TYPE=$(get_env_val "PLANNER_TYPE" "ENERGY") +PCE_EXTERNAL=$(get_env_val "PCE_EXTERNAL" "false") +HRAT_IP=$(get_env_val "HRAT_IP" "10.0.0.1") +E2E_OPTICAL_IP=$(get_env_val "E2E_OPTICAL_IP" "127.0.0.1") +SUBSCRIBE_ALERTS=$(get_env_val "SUBSCRIBE_ALERTS" "false") +SUBSCRIBE_ALERTS_URL=$(get_env_val "SUBSCRIBE_ALERTS_URL" "") +DUMMY_MODE=$(get_env_val "DUMMY_MODE" "true") +TFS_IP=$(get_env_val "TFS_IP" "127.0.0.1") +UPLOAD_TYPE=$(get_env_val "UPLOAD_TYPE" "WEBUI") +TFS_L2VPN_SUPPORT=$(get_env_val "TFS_L2VPN_SUPPORT" "false") +IXIA_IP=$(get_env_val "IXIA_IP" "127.0.0.1") +TFS_E2E_IP=$(get_env_val "TFS_E2E_IP" "127.0.0.1") +WEBUI_DEPLOY=$(get_env_val "WEBUI_DEPLOY" "false") +RESTCONF_IP=$(get_env_val "RESTCONF_IP" "127.0.0.1") +SDN_CONTROLLER_TYPE=$(get_env_val "SDN_CONTROLLER_TYPE" "TFS") +DATAPLANE_SUPPORT=$(get_env_val "DATAPLANE_SUPPORT" "FRR") +SDN_SUBSCRIPTION_PERIOD=$(get_env_val "SDN_SUBSCRIPTION_PERIOD" "10") +API_USERNAME=$(get_env_val "API_USERNAME" "admin") +API_PASSWORD=$(get_env_val "API_PASSWORD" "admin") + +# Generate a unique tag for local Kubernetes deployment to avoid containerd cache issues +TAG="latest" +if [ "$DEPLOY_MODE" = "helm" ]; then + TAG="dev-$(date +%s)" +fi # Docker build -echo "Building docker image..." -docker build -t nsc . +echo "Building docker image with tag nsc:$TAG..." +docker build -t nsc:$TAG -t nsc:latest . + +if [ "$DEPLOY_MODE" = "helm" ]; then + # Verify if helm is installed + if ! command -v helm &> /dev/null; then + echo "Error: helm command not found. Please install Helm and try again." + exit 1 + fi + + echo "Deploying to Kubernetes using Helm..." + helm upgrade --install nsc ./helm/nsc \ + --set image.repository=nsc \ + --set image.tag=$TAG \ + --set image.pullPolicy=IfNotPresent \ + --set service.type=LoadBalancer \ + --set service.port=$NSC_PORT \ + --set config.loggingLevel=$LOGGING_LEVEL \ + --set config.dumpTemplates=$DUMP_TEMPLATES \ + --set config.nrpEnabled=$NRP_ENABLED \ + --set config.plannerEnabled=$PLANNER_ENABLED \ + --set config.plannerType=$PLANNER_TYPE \ + --set config.pceExternal=$PCE_EXTERNAL \ + --set config.hratIp=$HRAT_IP \ + --set config.e2eOpticalIp=$E2E_OPTICAL_IP \ + --set config.subscribeAlerts=$SUBSCRIBE_ALERTS \ + --set config.subscribeAlertsUrl=$SUBSCRIBE_ALERTS_URL \ + --set config.dummyMode=$DUMMY_MODE \ + --set config.tfsIp=$TFS_IP \ + --set config.uploadType=$UPLOAD_TYPE \ + --set config.tfsL2vpnSupport=$TFS_L2VPN_SUPPORT \ + --set config.ixiaIp=$IXIA_IP \ + --set config.tfsE2eIp=$TFS_E2E_IP \ + --set config.webuiDeploy=$WEBUI_DEPLOY \ + --set config.restconfIp=$RESTCONF_IP \ + --set config.sdnControllerType=$SDN_CONTROLLER_TYPE \ + --set config.dataplaneSupport=$DATAPLANE_SUPPORT \ + --set config.sdnSubscriptionPeriod=$SDN_SUBSCRIPTION_PERIOD \ + --set secretConfig.apiUsername=$API_USERNAME \ + --set secretConfig.apiPassword=$API_PASSWORD + echo "---READY (Kubernetes/Helm)---" +else + # Executing nsc + echo "Running nsc on port $NSC_PORT..." + docker run -d --env-file .env -p $NSC_PORT:$NSC_PORT --name $CONTAINER_NAME $CONTAINER_NAME + echo "---READY (Docker)---" +fi -# Executing nsc -echo "Running nsc on port $NSC_PORT..." -docker run -d --env-file .env -p $NSC_PORT:$NSC_PORT --name $CONTAINER_NAME $CONTAINER_NAME -echo "---READY---" -- GitLab