From d3519b4bfe5738298651f7229cfa80bd107c0134 Mon Sep 17 00:00:00 2001 From: "aravind.est" Date: Thu, 23 Oct 2025 12:02:00 +0100 Subject: [PATCH] Installation mode support for Simulators Simulators installation script modified to support the mode (dev/snapshot/release) Issue-ID: NONRTRIC-1082 Change-Id: Id0c02811bc956fad85b9766cf620235d656881b3 Signed-off-by: aravind.est --- smo-install/scripts/layer-2/2-install-simulators.sh | 20 +++++++++++++++++++- .../scripts/sub-scripts/install-simulators.sh | 9 ++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/smo-install/scripts/layer-2/2-install-simulators.sh b/smo-install/scripts/layer-2/2-install-simulators.sh index dca6c9a1..c3ad577d 100755 --- a/smo-install/scripts/layer-2/2-install-simulators.sh +++ b/smo-install/scripts/layer-2/2-install-simulators.sh @@ -6,6 +6,7 @@ # ================================================================================ # Copyright (C) 2021 AT&T Intellectual Property. All rights # reserved. +# Modification Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,14 +29,31 @@ SCRIPT_PATH=$(dirname "$SCRIPT") cd $SCRIPT_PATH FLAVOUR=$1 +MODE=$2 if [ -z "$1" ] then echo "No helm override flavour supplied, going to default" FLAVOUR="default" fi +if [ -z "$2" ] + then + echo "No mode supplied, going to release" + MODE="release" +fi + +timestamp=$(date +%s) + +TARGET_HELM_REPO="oran-snapshot" # This should be changed to oran-release once the release charts are published + +if [ "$MODE" == "dev" ]; then + TARGET_HELM_REPO="local" +elif [ "$MODE" == "snapshot" ]; then + TARGET_HELM_REPO="oran-snapshot" +fi + echo "Starting Network Simulators namespace ..." -../sub-scripts/install-simulators.sh ../../helm-override/$FLAVOUR/network-simulators-override.yaml ../../helm-override/$FLAVOUR/network-simulators-topology-override.yaml +../sub-scripts/install-simulators.sh ../../helm-override/$FLAVOUR/network-simulators-override.yaml ../../helm-override/$FLAVOUR/network-simulators-topology-override.yaml "$TARGET_HELM_REPO" kubectl get pods -n network kubectl get namespaces diff --git a/smo-install/scripts/sub-scripts/install-simulators.sh b/smo-install/scripts/sub-scripts/install-simulators.sh index ac395c06..d4601219 100755 --- a/smo-install/scripts/sub-scripts/install-simulators.sh +++ b/smo-install/scripts/sub-scripts/install-simulators.sh @@ -6,6 +6,7 @@ # ================================================================================ # Copyright (C) 2021 AT&T Intellectual Property. All rights # reserved. +# Modification Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,4 +26,10 @@ kubectl create namespace network echo '### Installing ORAN SIMULATORS part ###' -helm upgrade --install --debug oran-simulator local/ru-du-simulators --namespace network -f $1 -f $2 + +OVERRIDEYAML1=$1 +OVERRIDEYAML2=$2 +HELM_REPO=$3 + +echo "Installing SIMULATORS from HELM Repo : $HELM_REPO" +helm upgrade --install --debug oran-simulator "$HELM_REPO"/ru-du-simulators --namespace network -f "$OVERRIDEYAML1" -f "$OVERRIDEYAML2" -- 2.16.6