Loading deploy/tfs.sh +4 −0 Original line number Diff line number Diff line Loading @@ -679,6 +679,10 @@ if [[ "$TFS_COMPONENTS" == *"monitoring"* ]] && [[ "$TFS_COMPONENTS" == *"webui" printf "\n\n" fi echo "Pruning Docker Images..." docker image prune --force printf "\n\n" if [ "$DOCKER_BUILD" == "docker buildx build" ]; then echo "Pruning Docker Buildx Cache..." docker buildx prune --force Loading manifests/nginx_ingress_http.yaml +7 −0 Original line number Diff line number Diff line Loading @@ -62,3 +62,10 @@ spec: name: nbiservice port: number: 8080 - path: /()(qkd_app/.*) pathType: Prefix backend: service: name: qkd-appservice port: number: 8005 manifests/qkd_appservice.yaml 0 → 100644 +83 −0 Original line number Diff line number Diff line # Copyright 2022-2024 ETSI OSG/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: qkd-appservice spec: selector: matchLabels: app: qkd-appservice #replicas: 1 template: metadata: labels: app: qkd-appservice spec: terminationGracePeriodSeconds: 5 containers: - name: server image: labs.etsi.org:5050/tfs/controller/qkd_app:latest imagePullPolicy: Always ports: - containerPort: 10060 - containerPort: 9192 - containerPort: 8005 env: - name: LOG_LEVEL value: "DEBUG" - name: CRDB_DATABASE_APP value: "qkd_app" envFrom: - secretRef: name: crdb-data - secretRef: name: nats-data readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:10060"] livenessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:10060"] resources: requests: cpu: 150m memory: 128Mi limits: cpu: 500m memory: 512Mi --- apiVersion: v1 kind: Service metadata: name: qkd-appservice labels: app: qkd-appservice spec: type: ClusterIP selector: app: qkd-appservice ports: - name: grpc protocol: TCP port: 10060 targetPort: 10060 - name: metrics protocol: TCP port: 9192 targetPort: 9192 - name: http port: 8005 targetPort: 8005 my_deploy.sh +8 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,14 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene #fi # Uncomment to activate QKD App #export TFS_COMPONENTS="${TFS_COMPONENTS} app" # To manage QKD Apps, "service" requires "qkd_app" to be deployed # before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the # "qkd_app" 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} qkd_app service ${AFTER}" #fi # Set the tag you want to use for your images. Loading proto/qkd_app.proto 0 → 100644 +53 −0 Original line number Diff line number Diff line syntax = "proto3"; package qkd_app; import "context.proto"; // Optare: Change this if you want to change App's structure or enums. // Optare: If a message (structure) is changed it must be changed in src/app/service/database enum QKDAppStatusEnum { QKDAPPSTATUS_ON = 0; QKDAPPSTATUS_DISCONNECTED = 1; QKDAPPSTATUS_OUT_OF_TIME = 2; QKDAPPSTATUS_ZOMBIE = 3; } enum QKDAppTypesEnum { QKDAPPTYPES_INTERNAL = 0; QKDAPPTYPES_CLIENT = 1; } message QKDLId { context.Uuid qkdl_uuid = 1; } message App { AppId app_id = 1; QKDAppStatusEnum app_status = 2; QKDAppTypesEnum app_type = 3; string server_app_id = 4; repeated string client_app_id = 5; repeated QKDLId backing_qkdl_id = 6; context.DeviceId local_device_id = 7; context.DeviceId remote_device_id = 8; } message AppId { context.ContextId context_id = 1; context.Uuid app_uuid = 2; } service AppService { rpc RegisterApp(App) returns (context.Empty) {} rpc ListApps (context.ContextId ) returns ( AppList ) {} } message AppList { repeated App apps = 1; } Loading
deploy/tfs.sh +4 −0 Original line number Diff line number Diff line Loading @@ -679,6 +679,10 @@ if [[ "$TFS_COMPONENTS" == *"monitoring"* ]] && [[ "$TFS_COMPONENTS" == *"webui" printf "\n\n" fi echo "Pruning Docker Images..." docker image prune --force printf "\n\n" if [ "$DOCKER_BUILD" == "docker buildx build" ]; then echo "Pruning Docker Buildx Cache..." docker buildx prune --force Loading
manifests/nginx_ingress_http.yaml +7 −0 Original line number Diff line number Diff line Loading @@ -62,3 +62,10 @@ spec: name: nbiservice port: number: 8080 - path: /()(qkd_app/.*) pathType: Prefix backend: service: name: qkd-appservice port: number: 8005
manifests/qkd_appservice.yaml 0 → 100644 +83 −0 Original line number Diff line number Diff line # Copyright 2022-2024 ETSI OSG/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: qkd-appservice spec: selector: matchLabels: app: qkd-appservice #replicas: 1 template: metadata: labels: app: qkd-appservice spec: terminationGracePeriodSeconds: 5 containers: - name: server image: labs.etsi.org:5050/tfs/controller/qkd_app:latest imagePullPolicy: Always ports: - containerPort: 10060 - containerPort: 9192 - containerPort: 8005 env: - name: LOG_LEVEL value: "DEBUG" - name: CRDB_DATABASE_APP value: "qkd_app" envFrom: - secretRef: name: crdb-data - secretRef: name: nats-data readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:10060"] livenessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:10060"] resources: requests: cpu: 150m memory: 128Mi limits: cpu: 500m memory: 512Mi --- apiVersion: v1 kind: Service metadata: name: qkd-appservice labels: app: qkd-appservice spec: type: ClusterIP selector: app: qkd-appservice ports: - name: grpc protocol: TCP port: 10060 targetPort: 10060 - name: metrics protocol: TCP port: 9192 targetPort: 9192 - name: http port: 8005 targetPort: 8005
my_deploy.sh +8 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,14 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene #fi # Uncomment to activate QKD App #export TFS_COMPONENTS="${TFS_COMPONENTS} app" # To manage QKD Apps, "service" requires "qkd_app" to be deployed # before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the # "qkd_app" 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} qkd_app service ${AFTER}" #fi # Set the tag you want to use for your images. Loading
proto/qkd_app.proto 0 → 100644 +53 −0 Original line number Diff line number Diff line syntax = "proto3"; package qkd_app; import "context.proto"; // Optare: Change this if you want to change App's structure or enums. // Optare: If a message (structure) is changed it must be changed in src/app/service/database enum QKDAppStatusEnum { QKDAPPSTATUS_ON = 0; QKDAPPSTATUS_DISCONNECTED = 1; QKDAPPSTATUS_OUT_OF_TIME = 2; QKDAPPSTATUS_ZOMBIE = 3; } enum QKDAppTypesEnum { QKDAPPTYPES_INTERNAL = 0; QKDAPPTYPES_CLIENT = 1; } message QKDLId { context.Uuid qkdl_uuid = 1; } message App { AppId app_id = 1; QKDAppStatusEnum app_status = 2; QKDAppTypesEnum app_type = 3; string server_app_id = 4; repeated string client_app_id = 5; repeated QKDLId backing_qkdl_id = 6; context.DeviceId local_device_id = 7; context.DeviceId remote_device_id = 8; } message AppId { context.ContextId context_id = 1; context.Uuid app_uuid = 2; } service AppService { rpc RegisterApp(App) returns (context.Empty) {} rpc ListApps (context.ContextId ) returns ( AppList ) {} } message AppList { repeated App apps = 1; }