Commit a6b6d9d6 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/70-cttc-implement-end-to-end-orchestrator-component' into 'develop'

Resolve "(CTTC) Implement End-to-End Orchestrator component"

Closes #70

See merge request !178
parents ecb0e423 514dde7e
Loading
Loading
Loading
Loading
+91 −0
Original line number Diff line number Diff line
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (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: e2e-orchestratorservice
spec:
  selector:
    matchLabels:
      app: e2e-orchestratorservice
  template:
    metadata:
      labels:
        app: e2e-orchestratorservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
      - name: server
        image: labs.etsi.org:5050/tfs/controller/e2e_orchestrator:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 10050
        - containerPort: 9192
        env:
        - name: LOG_LEVEL
          value: "INFO"
        readinessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10050"]
        livenessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10050"]
        resources:
          requests:
            cpu: 250m
            memory: 128Mi
          limits:
            cpu: 1000m
            memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
  name: e2e-orchestratorservice
  labels:
    app: e2e-orchestratorservice
spec:
  type: ClusterIP
  selector:
    app: e2e-orchestratorservice
  ports:
  - name: grpc
    port: 10050
    targetPort: 10050
  - name: metrics
    port: 9192
    targetPort: 9192
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: e2e-orchestratorservice-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: e2e-orchestratorservice
  minReplicas: 1
  maxReplicas: 20
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 80
  #behavior:
  #  scaleDown:
  #    stabilizationWindowSeconds: 30
+3 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene
# Uncomment to activate Forecaster
#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster"

# Uncomment to activate E2E Orchestrator
#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator"

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

+39 −0
Original line number Diff line number Diff line
// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (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.

// protocol buffers documentation: https://developers.google.com/protocol-buffers/docs/proto3
syntax = "proto3";
package orchestrator;

import "context.proto";


service E2EOrchestratorService {
  rpc Compute(E2EOrchestratorRequest) returns (E2EOrchestratorReply) {}
}

message E2EOrchestratorRequest {
  context.Service service = 1;
}

message E2EOrchestratorReply {
  // Service requested completed with possible missing fields, and
  // sub-services required for supporting requested service on the
  // underlying layers.
  repeated context.Service services = 1;

  // Connections supporting the requested service and sub-services
  // required for the underlying layers.
  repeated context.Connection connections = 2;
}
 No newline at end of file
+27 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (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.

########################################################################################################################
# Define your deployment settings here
########################################################################################################################

# If not already set, set the name of the Kubernetes namespace to deploy to.
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}

########################################################################################################################
# Automated steps start here
########################################################################################################################

kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/e2eorchestratorservice -c server
+2 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ class ServiceNameEnum(Enum):
    CACHING                = 'caching'
    TE                     = 'te'
    FORECASTER             = 'forecaster'
    E2EORCHESTRATOR        = 'e2eorchestrator'

    # Used for test and debugging only
    DLT_GATEWAY    = 'dltgateway'
@@ -84,6 +85,7 @@ DEFAULT_SERVICE_GRPC_PORTS = {
    ServiceNameEnum.PATHCOMP               .value : 10020,
    ServiceNameEnum.TE                     .value : 10030,
    ServiceNameEnum.FORECASTER             .value : 10040,
    ServiceNameEnum.E2EORCHESTRATOR        .value : 10050,

    # Used for test and debugging only
    ServiceNameEnum.DLT_GATEWAY   .value : 50051,
Loading