Manual pull instructions added 13/15113/6
authoraravind.est <aravindhan.a@est.tech>
Fri, 3 Oct 2025 16:53:23 +0000 (17:53 +0100)
committeraravind.est <aravindhan.a@est.tech>
Tue, 7 Oct 2025 09:47:12 +0000 (10:47 +0100)
Instructions to pull the required images added

Issue-ID: NONRTRIC-1076
Change-Id: I6a9c08655e5eccfb097e4699e9ced1459abee9c0
Signed-off-by: aravind.est <aravindhan.a@est.tech>
smo-install/README.md
smo-install/helm-override/default/onap-override.yaml
smo-install/scripts/layer-0/0-setup-helm3.sh
smo-install/scripts/layer-2/2-install-oran.sh
smo-install/scripts/sub-scripts/generate-image-list.sh [new file with mode: 0755]

index b11b8a5..bdf9f6a 100644 (file)
@@ -12,7 +12,8 @@ This project uses different helm charts from different Linux Foundation projects
     - [Release/Snapshot Mode](#releasesnapshot-mode-installation)
     - [Dev Mode](#dev-mode-installation)
 4. [Uninstallation](#uninstallation)
-5. [Troubleshooting](#troubleshooting)
+5. [Manual Image Pulling](#manual-image-pulling)
+6. [Troubleshooting](#troubleshooting)
 
 ---
 
@@ -72,7 +73,8 @@ nonrtric:
     ```bash
     ./dep/smo-install/scripts/layer-0/0-setup-helm3.sh
     ```
-3. Deploy SMO:
+3. To speed up installation, the required images can be pulled manually before starting the installation. Refer to [Manual Image Pulling](#manual-image-pulling) section for details.
+4. Deploy SMO:
     - Default flavour, release mode:
         ```bash
         ./dep/smo-install/scripts/layer-2/2-install-oran.sh
@@ -89,7 +91,7 @@ nonrtric:
         ```bash
         ./dep/smo-install/scripts/layer-2/2-install-oran.sh <FLAVOUR> snapshot
         ```
-4. Verify pods:
+5. Verify pods:
     ```bash
     kubectl get pods -n onap && kubectl get pods -n nonrtric && kubectl get pods -n smo
     ```
@@ -113,7 +115,8 @@ nonrtric:
     ```bash
     ./dep/smo-install/scripts/layer-1/1-build-all-charts.sh
     ```
-4. Deploy SMO:
+4. To speed up installation, the required images can be pulled manually before starting the installation. Refer to [Manual Image Pulling](#manual-image-pulling) section for details.
+5. Deploy SMO:
     - Default flavour:
         ```bash
         ./dep/smo-install/scripts/layer-2/2-install-oran.sh default dev
@@ -122,7 +125,7 @@ nonrtric:
         ```bash
         ./dep/smo-install/scripts/layer-2/2-install-oran.sh <FLAVOUR> dev
         ```
-5. Verify pods:
+6. Verify pods:
     ```bash
     kubectl get pods -n onap && kubectl get pods -n nonrtric && kubectl get pods -n smo
     ```
@@ -135,13 +138,41 @@ To remove all components:
 ./dep/smo-install/scripts/uninstall-all.sh
 ```
 
+---
+## Manual Image Pulling
+At times, the installation may be slower due to slow image pulls. To mitigate this, you can manually pull the required images before starting the installation.
+
+To generate the list of required images, run:
+```bash
+./dep/smo-install/scripts/sub-scripts/generate-image-list.sh <HELM_REPO>
+```
+Where `<HELM_REPO>` is either `oran-snapshot` or `oran-release` or `local` (depends on the helm repo configuration). The default is `oran-snapshot`.
+
+Command to pull the image depends on your container runtime.
+
+For example, if you are using `docker`, you can run:
+```bash
+docker pull <IMAGE_NAME>
+```
+Where `<IMAGE_NAME>` is the image uri from the generated list.
+
+If you are using `containerd`, and `crictl` is available, you can run:
+```bash
+crictl pull <IMAGE_NAME>
+```
+
+Similarly, for other container runtimes, use the appropriate command to pull the images.
+
+> [!NOTE]
+> If you are using multi node cluster, you need to pull the images on all the nodes.
+
 ---
 
 ## Troubleshooting
 > [!WARNING]
 > **ONAP mariadb pod may fail to start due to slow image pulls.**
 > - Try re-installation.
-> - Manually pull required images before installation if issues persist.
+> - Manually pull required images before installation if issues persist. Refer to [Manual Image Pulling](#manual-image-pulling) section for details.
 
 ---
 
index 94f61c2..6e17ce9 100644 (file)
@@ -37,6 +37,7 @@ global:
   # any other repository that hosts images for ONAP components.
   repository: &nexusDockerProxyRepo nexus3.onap.org:10001
   dockerHubRepository: *nexusDockerProxyRepo
+  imageRegistry: *nexusDockerProxyRepo
 
   # readiness check - temporary repo until images migrated to nexus3
   readinessRepository: oomk8s
index 52af0eb..8d967cc 100755 (executable)
@@ -87,3 +87,10 @@ else
     echo "Helm deploy plugin is not installed. Installing deploy plugin ..."
     helm plugin install ../../onap_oom/kubernetes/helm/plugins/deploy/
 fi
+
+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
+helm repo update
\ No newline at end of file
index 58e5c1a..8b2c762 100755 (executable)
@@ -77,23 +77,16 @@ fi
 
 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
 
 if [ "$MODE" == "dev" ]; then
     helm cm-push ../packages/strimzi-kafka-operator-helm-3-chart-0.45.0.tgz local
+    helm repo update
     TARGET_HELM_REPO="local"
 elif [ "$MODE" == "snapshot" ]; then
     TARGET_HELM_REPO="oran-snapshot"
 fi
 
-helm repo update
-
 echo "Pre configuring SMO ..."
 ../sub-scripts/preconfigure-smo.sh ../../helm-override/"$FLAVOUR"/onap-override.yaml
 echo "SMO pre configuration done."
diff --git a/smo-install/scripts/sub-scripts/generate-image-list.sh b/smo-install/scripts/sub-scripts/generate-image-list.sh
new file mode 100755 (executable)
index 0000000..e365d00
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# 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.
+# 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.
+# ============LICENSE_END============================================
+#
+
+SCRIPT=$(readlink -f "$0")
+SCRIPT_PATH=$(dirname "$SCRIPT")
+
+NEXUS_PROXY_DOCKER_IO_REPO="nexus3.o-ran-sc.org:10001"
+
+HELM_REPO=$1
+if [ -z "$HELM_REPO" ]; then
+  HELM_REPO="oran-snapshot"
+fi
+
+echo "Generating image list from Helm charts in repo: $HELM_REPO ..."
+ONAP_HELM_IMAGES=$(helm template onap-app "$HELM_REPO"/onap -f $SCRIPT_PATH/../../helm-override/default/onap-override.yaml | grep -v "^\s*#" | awk -F'image: ' '/image:/ {gsub(/["'\'']/, "", $2); print $2}' | sort -u)
+echo "ONAP images extracted from Helm charts: $(echo "$ONAP_HELM_IMAGES" | wc -l)"
+
+NONRTRIC_HELM_IMAGES=$(helm template nonrtric-app "$HELM_REPO"/nonrtric -f $SCRIPT_PATH/../../helm-override/default/oran-override.yaml | grep -v "^\s*#" | awk -F'image: ' '/image:/ {gsub(/["'\'']/, "", $2); print $2}' | sort -u)
+echo "NONRTRIC images extracted from Helm charts: $(echo "$NONRTRIC_HELM_IMAGES" | wc -l)"
+
+SMO_HELM_IMAGES=$(helm template smo-app "$HELM_REPO"/smo -f $SCRIPT_PATH/../../helm-override/default/oran-override.yaml | grep -v "^\s*#" | awk -F'image: ' '/image:/ {gsub(/["'\'']/, "", $2); print $2}' | sort -u)
+echo "SMO images extracted from Helm charts: $(echo "$SMO_HELM_IMAGES" | wc -l)"
+
+OPENEBS_IMAGES=$(helm template 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 --set preUpgradeHook.image.registry=$NEXUS_PROXY_DOCKER_IO_REPO --set preUpgradeHook.image.repo=bitnamilegacy/kubectl | grep -v "^\s*#" | awk -F'image: ' '/image:/ {gsub(/["'\'']/, "", $2); print $2}' | sort -u)
+echo "OpenEBS images extracted from Helm charts: $(echo "$OPENEBS_IMAGES" | wc -l)"
+
+MARIADB_OPERATOR_IMAGES=$(helm template mariadb-operator mariadb-operator/mariadb-operator | grep -v "^\s*#" | awk -F'image: ' '/image:/ {gsub(/["'\'']/, "", $2); print $2}' | sort -u)
+echo "MariaDB Operator images extracted from Helm charts: $(echo "$MARIADB_OPERATOR_IMAGES" | wc -l)"
+
+echo -e "\n------- Unique Image List -------"
+{
+    echo "$ONAP_HELM_IMAGES"
+    echo "$NONRTRIC_HELM_IMAGES"
+    echo "$SMO_HELM_IMAGES"
+    echo "$MARIADB_OPERATOR_IMAGES"
+    echo "$OPENEBS_IMAGES"
+} | sort -u