From 145472a364b1b8ac1b104a847dd70395c9e53860 Mon Sep 17 00:00:00 2001 From: "aravind.est" Date: Thu, 2 Oct 2025 14:05:48 +0100 Subject: [PATCH] Optimize SMO installation time Couple of waits removed as the further scripts have the initcontainers/wait in place. Helm repo add moved to one place so does the helm repo update. Issue-ID: NONRTRIC-1076 Change-Id: I0739a328e06c2a36789bb1d3f0443dcf4de1e564 Signed-off-by: aravind.est --- smo-install/scripts/layer-2/2-install-oran.sh | 2 ++ smo-install/scripts/sub-scripts/install-onap.sh | 5 +---- smo-install/scripts/sub-scripts/postconfigure-smo.sh | 8 ++++++++ smo-install/scripts/sub-scripts/preconfigure-smo.sh | 11 +++-------- smo-install/scripts/sub-scripts/servicemanager-preload.sh | 9 --------- 5 files changed, 14 insertions(+), 21 deletions(-) diff --git a/smo-install/scripts/layer-2/2-install-oran.sh b/smo-install/scripts/layer-2/2-install-oran.sh index e06844d8..58e5c1a6 100755 --- a/smo-install/scripts/layer-2/2-install-oran.sh +++ b/smo-install/scripts/layer-2/2-install-oran.sh @@ -80,6 +80,8 @@ timestamp=$(date +%s) helm repo add oran-snapshot https://nexus3.o-ran-sc.org/repository/helm.snapshot/ helm repo add oran-release https://nexus3.o-ran-sc.org/repository/helm.release/ helm repo add strimzi https://strimzi.io/charts/ +helm repo add openebs https://openebs.github.io/openebs +helm repo add mariadb-operator https://helm.mariadb.com/mariadb-operator TARGET_HELM_REPO="oran-snapshot" # This should be changed to oran-release once the release charts are published diff --git a/smo-install/scripts/sub-scripts/install-onap.sh b/smo-install/scripts/sub-scripts/install-onap.sh index 1d3a64a4..3f27fdff 100755 --- a/smo-install/scripts/sub-scripts/install-onap.sh +++ b/smo-install/scripts/sub-scripts/install-onap.sh @@ -44,10 +44,7 @@ if [ "$INSTALL_STRIMZI" == "true" ]; then fi echo "### Installing Strimzi Kafka Operator (From Helm repo $STRIMZI_HELM_REPO) ###" - helm upgrade --install strimzi-kafka-operator "$STRIMZI_HELM_REPO"/strimzi-kafka-operator --namespace strimzi-system --version 0.45.0 --set watchAnyNamespace=true --create-namespace - - echo "Waiting for Strimzi Kafka Operator to be ready..." - kubectl wait --for=condition=available --timeout=600s deployment/strimzi-cluster-operator -n strimzi-system + helm upgrade --install strimzi-kafka-operator "$STRIMZI_HELM_REPO"/strimzi-kafka-operator --namespace strimzi-system --version 0.45.0 --set watchAnyNamespace=true --create-namespace & fi kubectl create namespace onap diff --git a/smo-install/scripts/sub-scripts/postconfigure-smo.sh b/smo-install/scripts/sub-scripts/postconfigure-smo.sh index f6f254f4..ab053e0a 100755 --- a/smo-install/scripts/sub-scripts/postconfigure-smo.sh +++ b/smo-install/scripts/sub-scripts/postconfigure-smo.sh @@ -50,6 +50,14 @@ if [ "$INSTALL_SERVICEMANAGER" == "true" ]; then fi if [ "$INSTALL_SERVICEMANAGER" == "true" ]; then + echo "Waiting for capifcore deployment" + kubectl wait --for=condition=Available -n nonrtric --timeout=300s deploy/capifcore + + echo "Waiting for servicemanager deployment" + kubectl wait --for=condition=Available -n nonrtric --timeout=300s deploy/servicemanager + + echo "Waiting for kong deployment" + kubectl wait --for=condition=Available -n nonrtric --timeout=300s deploy/oran-nonrtric-kong # Send stderr to /dev/null to turn off chatty logging ../sub-scripts/servicemanager-preload.sh ../packages/post-configuration/servicemanager-preconfig-nonrtric.yaml 2>/dev/null ../sub-scripts/servicemanager-preload.sh ../packages/post-configuration/servicemanager-preconfig-smo.yaml 2>/dev/null diff --git a/smo-install/scripts/sub-scripts/preconfigure-smo.sh b/smo-install/scripts/sub-scripts/preconfigure-smo.sh index 641fcf5a..8b7cbf03 100755 --- a/smo-install/scripts/sub-scripts/preconfigure-smo.sh +++ b/smo-install/scripts/sub-scripts/preconfigure-smo.sh @@ -25,9 +25,7 @@ OVERRIDEYAML=$1 NEXUS_PROXY_DOCKER_IO_REPO="nexus3.o-ran-sc.org:10001" # OpenEBS installation -helm repo add openebs https://openebs.github.io/openebs -helm repo update -helm upgrade --install openebs --namespace openebs openebs/openebs --version 4.3.0 --create-namespace --set engines.replicated.mayastor.enabled=false --set engines.local.lvm.enabled=false --set engines.local.zfs.enabled=false --set loki.enabled=false --set alloy.enabled=false --set global.imageRegistry=$NEXUS_PROXY_DOCKER_IO_REPO --wait +helm upgrade --install openebs --namespace openebs openebs/openebs --version 4.3.0 --create-namespace --set engines.replicated.mayastor.enabled=false --set engines.local.lvm.enabled=false --set engines.local.zfs.enabled=false --set loki.enabled=false --set alloy.enabled=false --set global.imageRegistry=$NEXUS_PROXY_DOCKER_IO_REPO & # Create storage class for smo kubectl apply -f ../packages/pre-configuration/smo-sc.yaml @@ -41,11 +39,8 @@ if [ "$INSTALL_MARIADB" == "true" ]; then echo "Installing MariaDB operator..." # Mariadb operator installation kubectl create ns mariadb-operator - helm repo add mariadb-operator https://helm.mariadb.com/mariadb-operator - helm repo update - helm upgrade --install mariadb-operator-crds mariadb-operator/mariadb-operator-crds -n mariadb-operator - helm upgrade --install mariadb-operator mariadb-operator/mariadb-operator -n mariadb-operator - kubectl wait deployment mariadb-operator -n mariadb-operator --for=condition=available --timeout=120s + helm upgrade --install mariadb-operator-crds mariadb-operator/mariadb-operator-crds -n mariadb-operator & + helm upgrade --install mariadb-operator mariadb-operator/mariadb-operator -n mariadb-operator & else echo "Skipping MariaDB operator installation as per configuration." fi diff --git a/smo-install/scripts/sub-scripts/servicemanager-preload.sh b/smo-install/scripts/sub-scripts/servicemanager-preload.sh index eeb62823..43560715 100755 --- a/smo-install/scripts/sub-scripts/servicemanager-preload.sh +++ b/smo-install/scripts/sub-scripts/servicemanager-preload.sh @@ -375,15 +375,6 @@ echo "Preloading Service Manager from ${yaml_file}" first_node_ip=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}') servicemanager_node_port=$(kubectl get service servicemanager -n nonrtric -o jsonpath='{.spec.ports[0].nodePort}') -echo "Waiting for capifcore deployment" -kubectl wait --for=condition=Available -n nonrtric --timeout=300s deploy/capifcore - -echo "Waiting for servicemanager deployment" -kubectl wait --for=condition=Available -n nonrtric --timeout=300s deploy/servicemanager - -echo "Waiting for kong deployment" -kubectl wait --for=condition=Available -n nonrtric --timeout=300s deploy/oran-nonrtric-kong - publish_services_from_config echo "Service Manager preload completed for ${yaml_file}" -- 2.16.6