Move service manager preload scripts to smo-install directory 95/14795/1
authoraravind.est <aravindhan.a@est.tech>
Wed, 6 Aug 2025 14:46:36 +0000 (15:46 +0100)
committeraravind.est <aravindhan.a@est.tech>
Wed, 6 Aug 2025 14:56:26 +0000 (15:56 +0100)
SMO Installation uses service manager preload scripts from nonrtric directory.
As the NONRTRIC directory is being deprecated, the service manager preload scripts are moved to the smo-install directory.
This commit updates the paths in the deploy and undeploy scripts accordingly and modifies the post-configuration script to use

Issue-ID: NONRTRIC-1082
Change-Id: Ib80eb27b252ad9a8432a40ebacd579fd187e5384
Signed-off-by: aravind.est <aravindhan.a@est.tech>
bin/deploy-nonrtric
bin/undeploy-nonrtric
smo-install/ServiceManager-Preload-README.md [moved from nonrtric/servicemanager-preload/README.md with 98% similarity]
smo-install/scripts/packages/post-configuration/servicemanager-preconfig-nonrtric.yaml [moved from nonrtric/servicemanager-preload/config-nonrtric.yaml with 99% similarity]
smo-install/scripts/packages/post-configuration/servicemanager-preconfig-smo.yaml [moved from nonrtric/servicemanager-preload/config-smo.yaml with 99% similarity]
smo-install/scripts/sub-scripts/postconfigure-smo.sh
smo-install/scripts/sub-scripts/servicemanager-preload.sh [moved from nonrtric/servicemanager-preload/servicemanager-preload.sh with 99% similarity]

index 504403d..db22a9f 100755 (executable)
@@ -186,11 +186,4 @@ kubectl create configmap -n ${NONRTRIC_NAMESPACE:-nonrtric} nonrtric-recipe --fr
 echo "Deploying NONRTRIC"
 
 echo "helm install -f $OVERRIDEYAML --namespace ${NONRTRIC_NAMESPACE:-nonrtric} ${HELM_NAME_OPT} ${RELEASE_PREFIX} $ROOT_DIR/../nonrtric/helm/nonrtric"
-helm install -f $OVERRIDEYAML -n "${NONRTRIC_NAMESPACE:-nonrtric}" ${HELM_NAME_OPT} "${RELEASE_PREFIX}" "$ROOT_DIR/../nonrtric/helm/nonrtric"
-
-if [ "$INSTALL_SERVICEMANAGER" == "true" ]; then
-    pushd "$ROOT_DIR/../nonrtric/servicemanager-preload"
-    # Send stderr to null to turn off chatty logging
-    ./servicemanager-preload.sh config-nonrtric.yaml 2>/dev/null
-    popd
-fi
+helm install -f $OVERRIDEYAML -n "${NONRTRIC_NAMESPACE:-nonrtric}" ${HELM_NAME_OPT} "${RELEASE_PREFIX}" "$ROOT_DIR/../nonrtric/helm/nonrtric"
\ No newline at end of file
index 1753a25..46fad2e 100755 (executable)
@@ -49,13 +49,6 @@ RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}')
 INSTALL_KONG=$(cat /tmp/recipe.yaml | awk '/^  installKong:/{print $2}')
 
 if [ "$INSTALL_KONG" = true ];then
-  echo "Warning - deleting Kong routes and services for ServiceManager"
-  SERVICEMANAGER_POD=$(kubectl get pods -o custom-columns=NAME:.metadata.name -l app=nonrtric-servicemanager --no-headers -n ${NONRTRIC_NAMESPACE:-nonrtric})
-  if [[ -n $SERVICEMANAGER_POD ]]; then
-    kubectl exec $SERVICEMANAGER_POD -n ${NONRTRIC_NAMESPACE:-nonrtric} -- ./kongclearup
-  else
-      echo "Error - Servicemanager pod not found, didn't delete Kong routes and services for ServiceManager"
-  fi
   echo "Uninstalling kongstorage"
   helm delete kongstorage -n "${NONRTRIC_NAMESPACE:-nonrtric}"
   echo "Uninstalling Kong"
similarity index 98%
rename from nonrtric/servicemanager-preload/README.md
rename to smo-install/ServiceManager-Preload-README.md
index 7fcfac0..0696a36 100644 (file)
@@ -1,6 +1,6 @@
 <!---
 
-Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
 
 Licensed under the Creative Commons License, Attribution 4.0 Intl.
 (the"Documentation License"); you may not use this documentation
@@ -1,5 +1,5 @@
 ################################################################################
-#   Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.       #
+#   Copyright (C) 2024-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.           #
@@ -1,5 +1,5 @@
 ################################################################################
-#   Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.       #
+#   Copyright (C) 2024-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.           #
index e9f619d..f6f254f 100755 (executable)
@@ -50,9 +50,7 @@ if [ "$INSTALL_SERVICEMANAGER" == "true" ]; then
 fi
 
 if [ "$INSTALL_SERVICEMANAGER" == "true" ]; then
-    pushd ../../../nonrtric/servicemanager-preload
     # Send stderr to /dev/null to turn off chatty logging
-    ./servicemanager-preload.sh config-nonrtric.yaml 2>/dev/null
-    ./servicemanager-preload.sh config-smo.yaml 2>/dev/null
-    popd
+    ../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
 fi
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 ################################################################################
-#   Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.       #
+#   Copyright (C) 2024-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.           #