Move yq and jq installation to pre-configuration stage and Increase timeout for kong 21/14621/2
authoraravind.est <aravindhan.a@est.tech>
Mon, 30 Jun 2025 14:29:14 +0000 (15:29 +0100)
committeraravind.est <aravindhan.a@est.tech>
Mon, 30 Jun 2025 15:08:00 +0000 (16:08 +0100)
Jq and Yq installation moved to common pre-configuration file.
NONRTRIC Kong deployment waiting timeout increased

Issue-ID: INT-170
Change-Id: Ic622bcf8b15db99a7322d27ee1210f0433dc0eea
Signed-off-by: aravind.est <aravindhan.a@est.tech>
smo-install/scripts/sub-scripts/install-nonrtric.sh
smo-install/scripts/sub-scripts/install-smo.sh
smo-install/scripts/sub-scripts/postconfigure-smo.sh
smo-install/scripts/sub-scripts/preconfigure-smo.sh

index 12756f4..6cf836c 100755 (executable)
@@ -28,14 +28,6 @@ echo  '### Installing ORAN NONRTRIC part ###'
 
 OVERRIDEYAML=$1
 
-if ! command -v yq > /dev/null 2>&1; then
-    ARCH=$(case $(uname -m) in x86_64) echo "amd64";; aarch64) echo "arm64";; *) uname -m;; esac)
-    VERSION="v4.45.4"
-    echo "yq is not installed. Installing yq..."
-    wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_${ARCH} -O /usr/local/bin/yq
-    chmod +x /usr/local/bin/yq
-fi
-
 MODE=$2
 
 defaultSc=$(kubectl get storageclass -o jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")].metadata.name}')
@@ -97,4 +89,5 @@ else
 fi
 
 # Wait for the Kong deployment to be ready
-kubectl wait --for=condition=available deployment/oran-nonrtric-kong -n nonrtric
\ No newline at end of file
+echo "Waiting for the Kong deployment to be ready..."
+kubectl wait --for=condition=available deployment/oran-nonrtric-kong -n nonrtric --timeout=15m
\ No newline at end of file
index 131d009..0d3c696 100755 (executable)
 echo  '### Installing ORAN SMO part ###'
 kubectl create namespace smo
 
-if ! command -v yq > /dev/null 2>&1; then
-    ARCH=$(case $(uname -m) in x86_64) echo "amd64";; aarch64) echo "arm64";; *) uname -m;; esac)
-    VERSION="v4.45.4"
-    echo "yq is not installed. Installing yq..."
-    wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_${ARCH} -O /usr/local/bin/yq
-    chmod +x /usr/local/bin/yq
-fi
-
 OVERRIDEYAML=$1
 MODE=$2
 
index 2d0a289..e9f619d 100755 (executable)
 #
 
 # Configure service manager with the installed services
-if ! command -v yq > /dev/null 2>&1; then
-    ARCH=$(case $(uname -m) in x86_64) echo "amd64";; aarch64) echo "arm64";; *) uname -m;; esac)
-    VERSION="v4.45.4"
-    echo "yq is not installed. Installing yq..."
-    wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_${ARCH} -O /usr/local/bin/yq
-    chmod +x /usr/local/bin/yq
-fi
 
 OVERRIDEYAML=$1
 
index bf6725f..d939ec2 100755 (executable)
 # ============LICENSE_END============================================
 #
 
+if ! command -v yq > /dev/null 2>&1; then
+    ARCH=$(case $(uname -m) in x86_64) echo "amd64";; aarch64) echo "arm64";; *) uname -m;; esac)
+    VERSION="v4.45.4"
+    echo "yq is not installed. Installing yq..."
+    sudo wget https://github.com/mikefarah/yq/releases/download/${VERSION}/yq_linux_${ARCH} -O /usr/local/bin/yq
+    sudo chmod +x /usr/local/bin/yq
+fi
+
+if ! command -v jq > /dev/null 2>&1; then
+    echo "jq is not installed. Installing jq..."
+    sudo apt-get install jq -y
+fi
+
 # OpenEBS installation
 helm repo add openebs https://openebs.github.io/openebs
 helm repo update