c927fd32ac02b7951064769e4d4708d852a9a4fc
[it/dep.git] / smo-install / README.md
1 # O-RAN SMO Package
2
3 ## Summary
4 This project uses different helm charts from different Linux Foundation projects and integrate them into a unique SMO deployment.
5 <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>
6 <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>
7
8 ## Table of Contents
9 1. [Pre-requisites](#pre-requisites)
10 2. [Installation Flavours](#installation-flavours-and-configurations)
11 3. [Installation Modes](#installation-modes)
12     - [Release/Snapshot Mode](#releasesnapshot-mode-installation)
13     - [Dev Mode](#dev-mode-installation)
14 4. [Uninstallation](#uninstallation)
15 5. [Manual Image Pulling](#manual-image-pulling)
16 6. [Troubleshooting](#troubleshooting)
17
18 ---
19
20 ## Pre-requisites
21 - VM: 64GB Memory, 20VCPU, 100GB disk
22 - Helm 3.12.0+ (< 4.0.0)
23 - Kubernetes 1.30+
24 - Helm deploy/undeploy plugin
25 - Helm cm-push plugin
26 - yq
27 - jq
28
29 ---
30
31 ## Installation Flavours and Configurations
32
33 - Flavours are directories under `smo-install/helm-override/`.
34 - The default flavour is `default` (`smo-install/helm-override/default`).
35 - The default flavour is considered as a baseline configuration for all the installations.
36 - Flavour config files:
37     - `onap-override.yaml`: ONAP components
38     - `oran-override.yaml`: O-RAN components
39 - To create a new flavour, add a directory with `onap-flavour-config.yaml` and `oran-flavour-config.yaml`.
40 - These flavour configuration files doesn't needs to have entire configuration as same as in default flavour, Instead it should contain only the configuration that needs to be overridden from the default flavour.
41 - Only override necessary config values from the default flavour.
42
43 > [!IMPORTANT]
44 > Each flavour may require its own prerequisites or additional configuration (for example: different cluster resources, storage classes, or external services). Please check the `README.md` file inside the flavour directory under `smo-install/helm-override/<FLAVOUR>/README.md` for flavour-specific prerequisites and configuration details before installing.
45
46 **Example:** To disable NONRTRIC rAppmanager in your flavour:
47 ```yaml
48 nonrtric:
49   installrAppmanager: false
50 ```
51
52 ---
53
54 ## Installation Modes
55
56 ### Release/Snapshot Mode Installation
57 - Uses pre-built charts from Nexus repositories.
58 - No chart building required.
59
60 **Repositories:**
61 - SMO Release: https://nexus3.o-ran-sc.org/repository/helm.release/
62 - SMO Snapshot: https://nexus3.o-ran-sc.org/repository/helm.snapshot/
63 - Strimzi: strimzi.io/charts/
64
65 **Steps:**
66 1. Clone the repository:
67     ```bash
68     git clone --recursive "https://gerrit.o-ran-sc.org/r/it/dep"
69     ```
70 2. Setup Helm and plugins:
71     ```bash
72     ./dep/smo-install/scripts/layer-0/0-setup-helm3.sh
73     ```
74 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.
75 4. Deploy SMO:
76     - Default flavour, release mode:
77         ```bash
78         ./dep/smo-install/scripts/layer-2/2-install-oran.sh
79         ```
80     - Default flavour, snapshot mode:
81         ```bash
82         ./dep/smo-install/scripts/layer-2/2-install-oran.sh default snapshot
83         ```
84     - Specific flavour, release mode:
85         ```bash
86         ./dep/smo-install/scripts/layer-2/2-install-oran.sh <FLAVOUR>
87         ```
88     - Specific flavour, snapshot mode:
89         ```bash
90         ./dep/smo-install/scripts/layer-2/2-install-oran.sh <FLAVOUR> snapshot
91         ```
92 5. Verify pods:
93     ```bash
94     kubectl get pods -n onap && kubectl get pods -n nonrtric && kubectl get pods -n smo
95     ```
96
97 ### Dev Mode Installation
98 - Builds charts from source.
99
100 **Steps:**
101 1. Clone the repository:
102     ```bash
103     git clone --recursive "https://gerrit.o-ran-sc.org/r/it/dep"
104     ```
105 2. Setup chartmuseum and Helm:
106     ```bash
107     ./dep/smo-install/scripts/layer-0/0-setup-charts-museum.sh
108    ```
109     ```bash
110     ./dep/smo-install/scripts/layer-0/0-setup-helm3.sh
111     ```
112 3. Build charts:
113     ```bash
114     ./dep/smo-install/scripts/layer-1/1-build-all-charts.sh
115     ```
116 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.
117 5. Deploy SMO:
118     - Default flavour:
119         ```bash
120         ./dep/smo-install/scripts/layer-2/2-install-oran.sh default dev
121         ```
122     - Specific flavour:
123         ```bash
124         ./dep/smo-install/scripts/layer-2/2-install-oran.sh <FLAVOUR> dev
125         ```
126 6. Verify pods:
127     ```bash
128     kubectl get pods -n onap && kubectl get pods -n nonrtric && kubectl get pods -n smo
129     ```
130
131 ---
132
133 ## Uninstallation
134 To remove all components:
135 ```bash
136 ./dep/smo-install/scripts/uninstall-all.sh
137 ```
138
139 ---
140 ## Manual Image Pulling
141 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.
142
143 To generate the list of required images, run:
144 ```bash
145 ./dep/smo-install/scripts/sub-scripts/generate-image-list.sh <HELM_REPO>
146 ```
147 Where `<HELM_REPO>` is either `oran-snapshot` or `oran-release` or `local` (depends on the helm repo configuration). The default is `oran-release`.
148
149 Command to pull the image depends on your container runtime.
150
151 For example, if you are using `docker`, you can run:
152 ```bash
153 docker pull <IMAGE_NAME>
154 ```
155 Where `<IMAGE_NAME>` is the image uri from the generated list.
156
157 If you are using `containerd`, and `crictl` is available, you can run:
158 ```bash
159 crictl pull <IMAGE_NAME>
160 ```
161
162 Similarly, for other container runtimes, use the appropriate command to pull the images.
163
164 > [!NOTE]
165 > If you are using multi node cluster, you need to pull the images on all the nodes.
166
167 ---
168
169 ## Troubleshooting
170 > [!WARNING]
171 > **ONAP mariadb pod may fail to start due to slow image pulls.**
172 > - Try re-installation.
173 > - Manually pull required images before installation if issues persist. Refer to [Manual Image Pulling](#manual-image-pulling) section for details.
174
175 ---