Commit 62d6c3d6 authored by Carlos Manso's avatar Carlos Manso
Browse files

small fixes

parent 43844fc4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -176,7 +176,8 @@ export GRAF_EXT_PORT_HTTP=${GRAF_EXT_PORT_HTTP:-"3000"}
./deploy/tfs.sh

#Configure Subscription WS
#./deploy/subscription_ws.sh
./deploy/subscription_ws_ip.sh
./deploy/subscription_ws_e2e.sh

# Show deploy summary
./deploy/show.sh
+5 −18
Original line number Diff line number Diff line
@@ -19,13 +19,12 @@
########################################################################################################################

# If not already set, set the namespace where CockroackDB will be deployed.
export SUBSCRIPTION_WS_NAMESPACE=${SUBSCRIPTION_WS_NAMESPACE:-"tfs"}
export SUBSCRIPTION_WS_NAMESPACE=${SUBSCRIPTION_WS_NAMESPACE:-"tfs-e2e"}

# If not already set, set the external port interface will be exposed to.
export SUBSCRIPTION_WS_EXT_PORT=${SUBSCRIPTION_WS_EXT_PORT:-"8765"}
export SUBSCRIPTION_WS_EXT_PORT=${SUBSCRIPTION_WS_EXT_PORT:-"8761"}


# If not already set, set the external port interface will be exposed to.
export SUBSCRIPTION_WS_INT_PORT=${SUBSCRIPTION_WS_INT_PORT:-"8765"}
########################################################################################################################
# Automated steps start here
########################################################################################################################
@@ -34,25 +33,13 @@ export SUBSCRIPTION_WS_INT_PORT=${SUBSCRIPTION_WS_INT_PORT:-"8765"}
echo "Subscription WebSocket Port Mapping"
echo ">>> ExposeSubscription WebSocket port (${SUBSCRIPTION_WS_EXT_PORT}->${SUBSCRIPTION_WS_EXT_PORT})"
PATCH='{"data": {"'${SUBSCRIPTION_WS_EXT_PORT}'": "'${SUBSCRIPTION_WS_NAMESPACE}'/nbiservice:'${SUBSCRIPTION_WS_EXT_PORT}'"}}'
kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}"
kubectl patch configmap nginx-ingress-tcp-microk8s-conf-e2e --namespace ingress --patch "${PATCH}"

PORT_MAP='{"containerPort": '${SUBSCRIPTION_WS_EXT_PORT}', "hostPort": '${SUBSCRIPTION_WS_EXT_PORT}'}'
CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}'
PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}'
kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}"
kubectl patch daemonset nginx-ingress-microk8s-controller-e2e --namespace ingress --patch "${PATCH}"
echo


echo "Subscription WebSocket Port Mapping"
echo ">>> ExposeSubscription WebSocket port (${SUBSCRIPTION_WS_INT_PORT}->${SUBSCRIPTION_WS_INT_PORT})"
PATCH='{"data": {"'${SUBSCRIPTION_WS_INT_PORT}'": "'${SUBSCRIPTION_WS_NAMESPACE}'/nbiservice:'${SUBSCRIPTION_WS_INT_PORT}'"}}'
kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}"

PORT_MAP='{"containerPort": '${SUBSCRIPTION_WS_INT_PORT}', "hostPort": '${SUBSCRIPTION_WS_INT_PORT}'}'
CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}'
PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}'
kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}"
echo

+45 −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.


########################################################################################################################
# Read deployment settings
########################################################################################################################

# If not already set, set the namespace where CockroackDB will be deployed.
export SUBSCRIPTION_WS_NAMESPACE=${SUBSCRIPTION_WS_NAMESPACE:-"tfs-ip"}

# If not already set, set the external port interface will be exposed to.
export SUBSCRIPTION_WS_INT_PORT=${SUBSCRIPTION_WS_INT_PORT:-"8762"}
########################################################################################################################
# Automated steps start here
########################################################################################################################




echo "Subscription WebSocket Port Mapping"
echo ">>> ExposeSubscription WebSocket port (${SUBSCRIPTION_WS_INT_PORT}->${SUBSCRIPTION_WS_INT_PORT})"
PATCH='{"data": {"'${SUBSCRIPTION_WS_INT_PORT}'": "'${SUBSCRIPTION_WS_NAMESPACE}'/nbiservice:'${SUBSCRIPTION_WS_INT_PORT}'"}}'
kubectl patch configmap nginx-ingress-tcp-microk8s-conf-ip --namespace ingress --patch "${PATCH}"

PORT_MAP='{"containerPort": '${SUBSCRIPTION_WS_INT_PORT}', "hostPort": '${SUBSCRIPTION_WS_INT_PORT}'}'
CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}'
PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}'
kubectl patch daemonset nginx-ingress-microk8s-controller-ip --namespace ingress --patch "${PATCH}"
echo


+4 −5
Original line number Diff line number Diff line
@@ -24,8 +24,7 @@ spec:
  template:
    metadata:
      annotations:
        config.linkerd.io/skip-outbound-ports: "8765"
        config.linkerd.io/skip-inbound-ports: "8765"
        config.linkerd.io/skip-outbound-ports: "8761"
      labels:
        app: e2e-orchestratorservice
    spec:
@@ -37,7 +36,7 @@ spec:
          ports:
            - containerPort: 10050
            - containerPort: 9192
            - containerPort: 8765
            - containerPort: 8761
          env:
            - name: LOG_LEVEL
              value: "DEBUG"
@@ -73,5 +72,5 @@ spec:
      port: 9192
      targetPort: 9192
    - name: ws
      port: 8765
      targetPort: 8765
      port: 8761
      targetPort: 8761
+18 −6
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ spec:
  template:
    metadata:
      annotations:
        config.linkerd.io/skip-outbound-ports: "8765"
        config.linkerd.io/skip-inbound-ports: "8765"
        config.linkerd.io/skip-inbound-ports: "8762"
        config.linkerd.io/skip-outbound-ports: "8762"
      labels:
        app: nbiservice
    spec:
@@ -38,7 +38,7 @@ spec:
            - containerPort: 8080
            - containerPort: 9090
            - containerPort: 9192
            - containerPort: 8765
            - containerPort: 8762
          env:
            - name: LOG_LEVEL
              value: "INFO"
@@ -79,7 +79,19 @@ spec:
      protocol: TCP
      port: 9192
      targetPort: 9192
    - name: websocket
    - name: ws
      protocol: TCP
      port: 8765
      targetPort: 8765
      port: 8762
      targetPort: 8762
---
apiVersion: v1
kind: Service
metadata:
  name: remote-teraflow
spec:
  type: ExternalName
  externalName: nbiservice.asdf.svc.cluster.local
  ports:
  - name: ws
    protocol: TCP
    port: 8762
Loading