Commit c3e31051 authored by Carlos Manso's avatar Carlos Manso
Browse files

Update

parent 86a9db7b
Loading
Loading
Loading
Loading
+96 −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: e2eorchestratorservice
spec:
  selector:
    matchLabels:
      app: e2eorchestratorservice
  template:
    metadata:
      labels:
        app: e2eorchestratorservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
      - name: server
        image: labs.etsi.org:5050/tfs/controller/e2eorchestrator:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 10040
        - containerPort: 9192
        env:
        - name: LOG_LEVEL
          value: "INFO"
        - name: REDIS_PASSWORD
          valueFrom:
            secretKeyRef:
              name: redis-secrets
              key: REDIS_PASSWORD
        readinessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10009"]
        livenessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10009"]
        resources:
          requests:
            cpu: 250m
            memory: 128Mi
          limits:
            cpu: 1000m
            memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
  name: e2eorchestratorservice
  labels:
    app: e2eorchestratorservice
spec:
  type: ClusterIP
  selector:
    app: e2eorchestratorservice
  ports:
  - name: grpc
    port: 10040
    targetPort: 10040
  - name: metrics
    port: 9192
    targetPort: 9192
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: e2eorchestratorservice-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: e2eorchestratorservice
  minReplicas: 1
  maxReplicas: 20
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 80
  #behavior:
  #  scaleDown:
  #    stabilizationWindowSeconds: 30
+5 −1
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@ export TFS_COMPONENTS="context device pathcomp service slice compute webui load_
# Uncomment to activate TE
#export TFS_COMPONENTS="${TFS_COMPONENTS} te"

# Uncomment to activate E2EOrchestrator
export TFS_COMPONENTS="${TFS_COMPONENTS} e2eorchestrator"


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

@@ -102,7 +106,7 @@ export NATS_EXT_PORT_CLIENT="4222"
export NATS_EXT_PORT_HTTP="8222"

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


# ----- QuestDB ----------------------------------------------------------------
+1 −0
Original line number Diff line number Diff line
@@ -279,6 +279,7 @@ enum ServiceTypeEnum {
  SERVICETYPE_L2NM = 2;
  SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3;
  SERVICETYPE_TE = 4;
  SERVICETYPE_E2E = 5;
}

enum ServiceStatusEnum {
+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
Loading