Add Release mode oran installation 33/14333/1
authoraravind.est <aravindhan.a@est.tech>
Tue, 22 Apr 2025 15:33:06 +0000 (16:33 +0100)
committeraravind.est <aravindhan.a@est.tech>
Tue, 22 Apr 2025 15:33:06 +0000 (16:33 +0100)
o-ran installation expects the charts to be built in local before the installation.
This release mode doesn't expect the charts to be built in local instead it uses the charts from the respective remote helm repository.
This installation is configured now to use release mode by default.
It provides a possibility of running the locally built chart as well. It's called dev mode now.
Instructions are added for release mode and dev mode based installations.

Issue-ID: NONRTRIC-1020
Change-Id: I364219ced7d1ff8d8e62f869dffa31aa21e2b5e7
Signed-off-by: aravind.est <aravindhan.a@est.tech>
smo-install/README.md
smo-install/scripts/layer-2/2-install-oran.sh
smo-install/scripts/sub-scripts/install-nonrtric.sh
smo-install/scripts/sub-scripts/install-onap.sh
smo-install/scripts/sub-scripts/install-smo.sh
smo-install/scripts/sub-scripts/uninstall-onap.sh

index 405f19d..c417b0b 100644 (file)
@@ -4,234 +4,66 @@ This project uses different helm charts from different Linux Foundation projects
 <p>The ONAP and ORAN project helm charts are built and then configured by using "helm override" so that it represents a valid ORAN SMO installation.</p>
 <p>It contains also provisioning scripts that can be used to bootstrap the platform and execute test use cases, network simulators, a1 simulators, cnf network simulators, etc ...</p>
 
-<strong>Note:</strong>
-The CNF part is still a "work in progress" so not well documented, it's a DU/RU/topology server deployment done by ONAP SO instantiation.
-It has been created out of the ONAP vfirewall use case.
+# Quick Installation on existing kubernetes
+## Release Mode Installation
 
-## Quick Installation on blank node
-* Setup a VM with 40GB Memory, 6VCPU, 60GB of disk space.
-* Install an ubuntu live server 20.04 LTS (https://releases.ubuntu.com/20.04/ubuntu-20.04.3-live-server-amd64.iso)
-* Install snap and restart the shell session: sudo apt-get install snapd -y
-* Execute the following commands being logged as root:
+This is the default mode of installation. Building the charts are not required in release mode.
+Release mode uses the helm charts from the nexus helm repositories as pointed below,
+* ONAP: nexus3.onap.org/repository/onap-helm-testing/
+* Strimzi: strimzi.io/charts/
+* NONRTRIC: ??? (nexus3.o-ran-sc.org/repository/o-ran-sc-helm/)
+* SMO: ??? (nexus3.o-ran-sc.org/repository/o-ran-sc-helm/)
 
+### Pre-requisites:
+* Helm 3.12.0 or later
+* Kubernetes 1.26 or later
+* Helm deploy/undeploy plugin
+* Helm cm-push plugin
 
-       ```git clone --recursive https://github.com/sebdet/oran-deployment.git```
+### Installation
 
-       ```./dep/smo-install/scripts/layer-0/0-setup-microk8s.sh```
+Clone the repository using the command below,
 
-       ```./dep/smo-install/scripts/layer-0/0-setup-charts-museum.sh```
+```git clone --recursive "https://gerrit.o-ran-sc.org/r/it/dep"```
 
-       ```./dep/smo-install/scripts/layer-0/0-setup-helm3.sh```
+Once the pre-requisites are available, The below command can be used for the smo deployment.
 
-       ```./dep/smo-install/scripts/layer-1/1-build-all-charts.sh```
-
-       ```./dep/smo-install/scripts/layer-2/2-install-oran.sh```
-
-       Verify pods:
-
-       ```kubectl get pods -n onap && kubectl get pods -n nonrtric && kubectl get pods -n smo```
-
-       When all pods in "onap" , "smo" and "nonrtric" namespaces are well up & running:
-
-       ```./dep/smo-install/scripts/layer-2/2-install-simulators.sh```
-
-## Quick Installation on existing kubernetes
-* Ensure you have at least 20GB Memory, 6VCPU, 60GB of disk space.
-
-        ```git clone --recursive "https://gerrit.o-ran-sc.org/r/it/dep"```
-
-        ```./dep/smo-install/scripts/layer-0/0-setup-charts-museum.sh```
-
-        ```./dep/smo-install/scripts/layer-0/0-setup-helm3.sh```
-
-        ```./dep/smo-install/scripts/layer-1/1-build-all-charts.sh```
-
-        ```./dep/smo-install/scripts/layer-2/2-install-oran.sh```
-
-        Verify pods:
-
-        ```kubectl get pods -n onap && kubectl get pods -n nonrtric && kubectl get pods -n smo```
-
-        When all pods in "onap" and "nonrtric" namespaces are well up & running:
-
-        ```./smo-install/scripts/layer-2/2-install-simulators.sh```
-
-       Verify pods:
-
-       ```kubectl get pods -n onap && kubectl get pods -n nonrtric```
-
-       When all pods in "onap" , "smo" and "nonrtric" namespaces are well up & running:
-
-       ```./dep/smo-install/scripts/layer-2/2-install-simulators.sh```
-
-
-## Structure
-The user entry point is located in the <strong>scripts</strong> folder
-
-```
-.
-├── cnf                          <-- CNF packages that can be deployed by ONAP (Work In Progress, so not yet well documented)
-│   └── du-ru-simulators             <--- The CNF package containing DU/RU/Topology server simulators
-├── helm-override                <-- The Configuration of the different HELM charts used in SMO package
-│   ├── network-simulators-override.yaml             <--- Standard config for the network simulators
-│   ├── network-simulators-topology-override.yaml    <--- Network simulator topology example that can be changed
-│   ├── onap-override-cnf.yaml               <--- A medium ONAP config ready for CNF deployment
-│   ├── onap-override.yaml           <--- A minimal ONAP config for SMO package
-│   └── oran-override.yaml           <--- A minimal ORAN config for SMO package
-├── LICENSE
-├── multicloud-k8s               <-- Git SUBMODULE required for KUD installation
-├── onap_oom                     <-- Git SUBMODULE required for ONAP installation
-├── oran_oom                     <-- ORAN Charts
-│   ├── a1controller
-│   ├── a1simulator
-│   ├── aux-common
-│   ├── controlpanel
-│   ├── dist
-│   ├── dmaapadapterservice
-│   ├── du-simulator
-│   ├── enrichmentservice
-│   ├── Makefile             <-- ORAN Makefile to build all ORAN Charts
-│   ├── nonrtric
-│   ├── nonrtric-common
-│   ├── nonrtricgateway
-│   ├── oru-app
-│   ├── policymanagementservice
-│   ├── rappcatalogueservice
-│   ├── ric-common
-│   ├── ru-du-simulators
-│   ├── ru-simulator
-│   ├── smo
-│   ├── topology
-│   └── topology-server
-├── README.md
-├── scripts                      <-- All installation scripts (USER ENTRY POINT)
-│   ├── layer-0                              <--- Scripts to setup Node
-│   │   ├── 0-setup-charts-museum.sh             <--- Setup ChartMuseum
-│   │   └── 0-setup-kud-node.sh                  <--- Setup K8S node with ONAP Multicloud KUD installation
-│   │   └── 0-setup-microk8s.sh          <--- Setup K8S node with MicroK8S installation
-│   │   └── 0-setup-helm3.sh                     <--- Setup HELM3
-│   ├── layer-1                              <--- Scripts to prepare for the SMO installation
-│   │   └── 1-build-all-charts.sh                <--- Build all HELM charts and upload them to ChartMuseum
-│   ├── layer-2                              <--- Scripts to install SMO package
-│   │   ├── 2-install-nonrtric-only.sh           <--- Install SMO NONRTRIC k8s namespace only
-│   │   ├── 2-install-oran-cnf.sh                <--- Install SMO full with ONAP CNF features
-│   │   ├── 2-install-oran.sh                    <--- Install SMO minimal
-│   │   └── 2-install-simulators.sh              <--- Install Network simulator (RU/DU/Topology Server)
-│   │   └── 2-upgrade-simulators.sh              <--- Upgrade the simulators install at runtime when changes are done on override files
-│   ├── sub-scripts                  <--- Sub-Scripts used by the main layer-0, layer-1, layer-2
-│   │   ├── clean-up.sh
-│   │   ├── install-nonrtric.sh
-│   │   ├── install-onap.sh
-│   │   ├── install-smo.sh
-│   │   ├── install-simulators.sh
-│   │   ├── uninstall-nonrtric.sh
-│   │   ├── uninstall-onap.sh
-│   │   ├── uninstall-smo.sh
-│   │   └── uninstall-simulators.sh
-│   └── uninstall-all.sh             <--- Uninstall ALL SMO K8S namespaces and cleanup K8S
-└── test                 <-- Scripts to test the SMO installation (Work In Progress, so not yet well documented)
-    ├── a1-validation                    <--- Test nonrtric A1 interface (https://wiki.o-ran-sc.org/display/RICNR/Testing+End+to+End+call+in+release+D)
-    │   ├── data
-    │   ├── subscripts
-    │   └── validate-a1.sh
-    ├── apex-policy-test         <--- Test apex policy (https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=35881325, it requires simulators to be up)
-    │   ├── apex-policy-test.sh
-    │   └── data
-    ├── enable-sim-fault-report          <--- Enable the fault reporting of the network simulators by SDNC
-    │   ├── data
-    │   └── enable-network-sim-fault-reporting.sh
-    └── pythonsdk                        <--- Test based on ONAP Python SDK to validate O1 and A1
-        ├── oran-tests.xml
-        ├── Pipfile.lock
-        ├── README.md
-        ├── src
-        ├── test.json
-        ├── tox.ini
-        └── unit-tests
-
-```
-## Download:
-Use git clone to get it on your server (github ssh key config is required):
-
-```git clone --recursive git@github.com:gmngueko/oran-deployment.git```
-
-
-<strong>Note:</strong> The current repository has multiple sub git submodules, therefore the <strong>--recursive</strong> flag is absolutely <strong>REQUIRED</strong>
-
-## Requirements:
-* K8S node setup with Helm 3 and Kubectl properly configured (tested with <strong>K8S v1.21.5</strong> and <strong>HELM v3.5.4</strong>).
-  FOR K8S installation, multiple options are available:
-       - MicroK8S standalone deployment:
-
-               ```./dep/smo-install/scripts/layer-0/0-setup-microk8s.sh```
-
-               OR this wiki can help to setup it (<strong>Section 1, 2 and 3</strong>): https://wiki.onap.org/display/DW/Deploy+OOM+and+SDC+%28or+ONAP%29+on+a+single+VM+with+microk8s+-+Honolulu+Setup
-
-       - KubeSpray using ONAP multicloud KUD (https://git.onap.org/multicloud/k8s/tree/kud) installation by executing(this is required for ONAP CNF deployments):
-
-           ```./dep/smo-install/scripts/layer-0/0-setup-kud-node.sh```
-
-
-       - Use an existing K8S installation (Cloud, etc ...).
-       - ....
-
-* ChartMuseum to store the HELM charts on the server, multiple options are available:
-       - Execute the install script:
-
-               ```./dep/smo-install/scripts/layer-0/0-setup-charts-museum.sh```
-
-               ```./dep/smo-install/scripts/layer-0/0-setup-helm3.sh```
-
-       - Install chartmuseum manually on port 18080 (https://chartmuseum.com/#Instructions, https://github.com/helm/chartmuseum)
-
-## Configuration:
-In the ./helm-override/ folder the helm config that are used by the SMO installation.
-<p>Different flavors are preconfigured, and should NOT be changed unless you intentionally want to updates some configurations.
-
-## Installation:
-* Build ONAP/ORAN charts
+```./dep/smo-install/scripts/layer-2/2-install-oran.sh```
 
-       ```./dep/smo-install/scripts/layer-1/1-build-all-charts.sh```
+Verify pods:
 
-* Choose the installation:
-       - ONAP + ORAN "nonrtric" <strong>(RECOMMENDED ONE)</strong>:
+```kubectl get pods -n onap && kubectl get pods -n nonrtric && kubectl get pods -n smo```
 
-               ```./dep/smo-install/scripts/layer-2/2-install-oran.sh```
-       - ORAN "nonrtric" part only(To work with ONAP):
+## Dev Mode Installation
 
-               ```./dep/smo-install/scripts/layer-2/2-install-nonrtric-only.sh```
+In this mode, the released helm charts are not used. Instead, the charts are built from the source code and installed.
 
-       - ORAN "nonrtric" standalone:
+### Pre-requisites:
+* Kubernetes 1.26 or later
 
-               ```./dep/smo-install/scripts/layer-2/2-install-nonrtric-only.sh standalone-nonrtric```
+### Installation
 
-       - ONAP CNF + ORAN "nonrtric" (This must still be documented properly):
+Clone the repository using the command below,
 
-               ```./dep/smo-install/scripts/layer-2/2-install-oran-cnf.sh```
+```git clone --recursive "https://gerrit.o-ran-sc.org/r/it/dep"```
 
+Use the below command to setup chartmuseum and helm
 
+```./dep/smo-install/scripts/layer-0/0-setup-charts-museum.sh```
 
-* Install the network simulators (DU/RU/Topo):
-       - When all pods in "onap" and "nonrtric" namespaces are well up & running:
+```./dep/smo-install/scripts/layer-0/0-setup-helm3.sh```
 
-               ```kubectl get pods -n onap && kubectl get pods -n nonrtric```
+Charts can be build using the below command,
 
-       - Execute the install script:
+```./dep/smo-install/scripts/layer-1/1-build-all-charts.sh```
 
-               ```./dep/smo-install/scripts/layer-2/2-install-simulators.sh```
+The below command can be used for the smo deployment.
 
-       - Check the simulators status:
+```./dep/smo-install/scripts/layer-2/2-install-oran.sh dev```
 
-               ```kubectl get pods -n network```
+Verify pods:
 
-       Note: The simulators topology can be customized in the file ./smo-install/helm-override/network-simulators-topology-override.yaml
-
-## Platform access points:
-* SDNR WEB:
-       https://<K8SServerIP>:30205/odlux/index.html
-* NONRTRIC Dashboard:
-       http://<K8SServerIP>:30091/
-  More to come ...
+```kubectl get pods -n onap && kubectl get pods -n nonrtric && kubectl get pods -n smo```
 
 ## Uninstallation:
 * Execute
index 70e7fb3..4a84b03 100755 (executable)
@@ -6,7 +6,7 @@
 # ================================================================================
 # Copyright (C) 2021 AT&T Intellectual Property. All rights
 #                             reserved.
-# Modifcation Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+# Modifcation 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.
@@ -29,18 +29,25 @@ 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)
 
 echo "Starting ONAP & NONRTRIC namespaces ..."
-../sub-scripts/install-onap.sh ../../helm-override/$FLAVOUR/onap-override.yaml $timestamp
-../sub-scripts/install-nonrtric.sh ../../helm-override/$FLAVOUR/oran-override.yaml $timestamp
-../sub-scripts/install-smo.sh ../../helm-override/$FLAVOUR/oran-override.yaml $timestamp
+../sub-scripts/install-onap.sh ../../helm-override/$FLAVOUR/onap-override.yaml $MODE $timestamp
+../sub-scripts/install-nonrtric.sh ../../helm-override/$FLAVOUR/oran-override.yaml $MODE $timestamp
+../sub-scripts/install-smo.sh ../../helm-override/$FLAVOUR/oran-override.yaml $MODE $timestamp
 
 kubectl get pods -n onap
 kubectl get pods -n nonrtric
index c40027a..d734250 100755 (executable)
@@ -5,7 +5,7 @@
 # ORAN SMO Package
 # =================================================================================
 # Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
-# Modification Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+# Modification 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.
@@ -62,7 +62,20 @@ if [ "$INSTALL_SERVICEMANAGER" == "true" ]; then
     fi
 fi
 
-helm install --debug oran-nonrtric local/nonrtric --namespace nonrtric -f $OVERRIDEYAML --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$2"
+MODE=$2
+
+if [ MODE == "dev" ]; then
+    echo "Installing NONRTRIC in dev mode"
+    helm install --debug oran-nonrtric local/nonrtric --namespace nonrtric -f $OVERRIDEYAML --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$3"
+else
+    echo "Installing NONRTRIC in release mode"
+    # This following should be modified once the charts are uploaded and available in the nexus repository
+    # Till then, we are using the local chart
+        # helm repo add nonrtric https://nexus3.o-ran-sc.org/repository/smo-helm-snapshots/
+        # helm repo update
+        # helm install oran-nonrtric nonrtric/nonrtric --namespace nonrtric -f $OVERRIDEYAML --create-namespace
+    helm install --debug oran-nonrtric local/nonrtric --namespace nonrtric -f $OVERRIDEYAML --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$3"
+fi
 
 # Copying kafka secrets from onap namespace
 # SMO installation uses ONAP strimzi kafka
index 118621d..39dbf41 100755 (executable)
@@ -28,10 +28,31 @@ SCRIPT=$(readlink -f "$0")
 SCRIPT_PATH=$(dirname "$SCRIPT")
 cd $SCRIPT_PATH
 
-helm cm-push ../packages/strimzi-kafka-operator-helm-3-chart-0.44.0.tgz local
-helm repo update
-helm install strimzi-kafka-operator local/strimzi-kafka-operator --namespace strimzi-system --version 0.44.0 --set watchAnyNamespace=true --create-namespace
+MODE=$2
 
-kubectl create namespace onap
-echo '### Installing ONAP part ###'
-helm deploy --debug onap local/onap --namespace onap -f $1 --set global.persistence.mountPath="/dockerdata-nfs/deployment-$2" --set dmaap.message-router.message-router-zookeeper.persistence.mountPath="/dockerdata-nfs/deployment-$2" --set dmaap.message-router.message-router-kafka.persistence.mountPath="/dockerdata-nfs/deployment-$2"
+if [ MODE == "dev" ]; then
+    echo "### Installing Strimzi Kafka Operator (Dev Mode) ###"
+    helm cm-push ../packages/strimzi-kafka-operator-helm-3-chart-0.44.0.tgz local
+    helm repo update
+    helm install strimzi-kafka-operator local/strimzi-kafka-operator --namespace strimzi-system --version 0.44.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
+
+    kubectl create namespace onap
+    echo '### Installing ONAP part (Dev Mode) ###'
+    helm deploy --debug onap local/onap --namespace onap -f $1 --set global.persistence.mountPath="/dockerdata-nfs/deployment-$3" --set dmaap.message-router.message-router-zookeeper.persistence.mountPath="/dockerdata-nfs/deployment-$3" --set dmaap.message-router.message-router-kafka.persistence.mountPath="/dockerdata-nfs/deployment-$3"
+else
+    echo "### Installing Strimzi Kafka Operator (Release Mode) ###"
+    helm repo add strimzi https://strimzi.io/charts/
+    helm repo update
+
+    helm install strimzi-kafka-operator strimzi/strimzi-kafka-operator --namespace strimzi-system --version 0.44.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
+
+    echo '### Installing ONAP part (Release Mode) ###'
+    helm repo add onap https://nexus3.onap.org/repository/onap-helm-testing/
+    helm repo update
+
+    helm deploy --debug onap onap/onap --namespace onap -f $1 --create-namespace
+fi
\ No newline at end of file
index 1b64dec..bcb32a5 100755 (executable)
@@ -25,8 +25,20 @@ if ! command -v yq > /dev/null 2>&1; then
 fi
 
 OVERRIDEYAML=$1
+MODE=$2
 
-helm install oran-smo local/smo --namespace smo -f $OVERRIDEYAML
+if [ MODE == "dev" ]; then
+    echo "Installing SMO in dev mode"
+    helm install --debug oran-smo local/smo --namespace smo -f $OVERRIDEYAML
+else
+    echo "Installing SMO in release mode"
+    # This following should be modified once the charts are uploaded and available in the nexus repository
+    # Till then, we are using the local chart
+        # helm repo add smo https://nexus3.o-ran-sc.org/repository/smo-helm-snapshots/
+        # helm repo update
+        # helm install oran-smo smo/smo --namespace nonrtric -f $OVERRIDEYAML --create-namespace
+    helm install --debug oran-smo local/smo --namespace smo -f $OVERRIDEYAML
+fi
 
 check_for_secrets() {
     try=0
index cd80195..32ccb79 100755 (executable)
@@ -6,6 +6,7 @@
 # ================================================================================
 # Copyright (C) 2021 AT&T Intellectual Property. All rights
 #                             reserved.
+# 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.
@@ -23,6 +24,8 @@
 # 
 ###
 
+# Delete all the kafka topics in the onap namespace
+kubectl delete kafkatopics --all -n onap
 kubectl delete namespace onap
 kubectl delete namespace strimzi-system
 kubectl get pv | grep Released | awk '$1 {print$1}' | while read vol; do kubectl delete pv/${vol}; done