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

ECOC F5GA Telemetry Demo:

- Updated deploy scripts
parent b1de78eb
Loading
Loading
Loading
Loading
+0 −44
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2022-2025 ETSI 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.

# Build SIMAP Server
cd ~/tfs-ctrl/src/tests/tools/simap_server
docker buildx build -t simap-server:mock -f Dockerfile .

# Build NCE-FAN Controller
cd ~/tfs-ctrl/src/tests/tools/mock_nce_ctrl
docker buildx build -t nce-fan-ctrl:mock -f Dockerfile .

# Build NCE-T Controller
cd ~/tfs-ctrl/src/tests/tools/mock_ietf_actn_sdn_ctrl
docker buildx build -t nce-t-ctrl:mock -f Dockerfile .


# Cleanup
docker rm --force simap-server
docker rm --force nce-fan-ctrl
docker rm --force nce-t-ctrl

# Create SIMAP Server, NCE-FAN Controller, NCE-T Controller
docker run --detach --name simap-server --publish 8080:8080 simap-server:mock
docker run --detach --name nce-fan-ctrl --publish 8443:8443 nce-fan-ctrl:mock
docker run --detach --name nce-t-ctrl   --publish 8444:8443 nce-t-ctrl:mock

sleep 2

# Dump Docker containers
docker ps -a

echo "Bye!"
+0 −28
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2022-2025 ETSI 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.

# Assuming the instances are named as tfs-e2e-ctrl, tfs-agg-ctrl, and tfs-ip-ctrl
#CTRL_NAME=$(hostname | cut -d'-' -f2)
#echo "Deploying: ${CTRL_NAME}"

#source ~/tfs-ctrl/src/tests/ecoc25-f5ga-telemetry/deploy-specs-${CTRL_NAME}.sh
source ~/tfs-ctrl/src/tests/ecoc25-f5ga-telemetry/deploy-specs-ip.sh
./deploy/all.sh

echo "Waiting for NATS connection..."
while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done
kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server

echo "Ready!"
+84 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2022-2025 ETSI 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.


# Assuming the instances are named as: simap-server, tfs-e2e-ctrl, tfs-agg-ctrl, tfs-ip-ctrl

# Get the current hostname
HOSTNAME=$(hostname)
echo "Deploying in ${HOSTNAME}..."


case "$HOSTNAME" in
    simap-server)
        echo "Building SIMAP Server..."
        cd ~/tfs-ctrl/src/tests/tools/simap_server
        docker buildx build -t simap-server:mock -f Dockerfile .

        echo "Building NCE-FAN Controller..."
        cd ~/tfs-ctrl/src/tests/tools/mock_nce_ctrl
        docker buildx build -t nce-fan-ctrl:mock -f Dockerfile .

        echo "Building NCE-T Controller..."
        cd ~/tfs-ctrl/src/tests/tools/mock_ietf_actn_sdn_ctrl
        docker buildx build -t nce-t-ctrl:mock -f Dockerfile .

        echo "Cleaning up..."
        docker rm --force simap-server
        docker rm --force nce-fan-ctrl
        docker rm --force nce-t-ctrl

        echo "Deploying support services..."
        docker run --detach --name simap-server --publish 8080:8080 simap-server:mock
        docker run --detach --name nce-fan-ctrl --publish 8443:8443 nce-fan-ctrl:mock
        docker run --detach --name nce-t-ctrl   --publish 8444:8443 nce-t-ctrl:mock

        sleep 2
        docker ps -a
        ;;
    tfs-e2e-ctrl)
        echo "Deploying TFS E2E Controller..."
        source ~/tfs-ctrl/src/tests/ecoc25-f5ga-telemetry/deploy-specs-e2e.sh
        ./deploy/all.sh

        echo "Waiting for NATS connection..."
        while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done
        kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server
        ;;
    tfs-agg-ctrl)
        echo "Deploying TFS Agg Controller..."
        source ~/tfs-ctrl/src/tests/ecoc25-f5ga-telemetry/deploy-specs-agg.sh
        ./deploy/all.sh

        echo "Waiting for NATS connection..."
        while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done
        kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server
        ;;
    tfs-ip-ctrl)
        echo "Deploying TFS IP Controller..."
        source ~/tfs-ctrl/src/tests/ecoc25-f5ga-telemetry/deploy-specs-ip.sh
        ./deploy/all.sh

        echo "Waiting for NATS connection..."
        while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done
        kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server
        ;;
    *)
        echo "Unknown host: $HOSTNAME"
        echo "No commands to run."
        ;;
esac

echo "Ready!"