5.[Optional: Testing with OAI gNB RFsimulator and NR-UE](#5-testing-with-oai-gnb-rfsimulator-and-nr-ue)
6.[Extra](#6-extra)
## 1. Description
The helm charts can be used on any production grade kubernetes cluster or even vanilla kubernetes we tested on a single node 4 CPU minikube cluster with docker virtualization environment. In our testing environment we deploy these charts on our inhouse Openshift cluster the cluster information can be found below.
The helm charts can be used on any production grade kubernetes cluster or even vanilla kubernetes. We have also tested on a single node 4 CPU minikube cluster with docker virtualization environment. In our testing environment we deploy these charts on our inhouse Openshift cluster the cluster information can be found below.
@@ -42,7 +43,7 @@ The helm charts can be used on any production grade kubernetes cluster or even v
| Kubernetes Version | Kubernetes Version: v1.22.5+5c84e52 |
| helm | v3.6.2+5.el8 |
| helm-spray (plugin) | v4.0.10 |
| Base images of Network functions| Ubuntu 18.04/UBI 8 (CoreOS RHEL) |
| Base images of Network functions| Ubuntu 18.04/UBI 8(RHEL) |
We are deploying the helm charts using `helm spray` plugin of `helm` as the network functions have dependency and they are required to be deployed in a certain order. To get more information on helm spray you can follow this [link](https://github.com/ThalesGroup/helm-spray).
...
...
@@ -83,9 +84,9 @@ testing-pod.yaml
All the OAI core network charts are present in `oai-5g-core` folder, there you can find charts of individual network functions and for the above described three different deployment settings.
1. Folder `oai-5g-mini` is for minimilist deployment
2. Folder `oai-5g-basic` is for basic deployment
3. Folder `oai-5g-slicing` is for slicing deployment
1. Folder `oai-5g-mini` is for [minimilist deployment](../charts/oai-5g-core/oai-5g-mini)
2. Folder `oai-5g-basic` is for [basic deployment](../charts/oai-5g-core/oai-5g-basic)
3. Folder `oai-5g-slicing` is for [slicing deployment](../charts/oai-5g-core/oai-5g-slicing)
These charts are configured keeping in mind 5G service based architecture, if you want to deploy using reference based architecture then you need to make certain changes.
...
...
@@ -101,7 +102,7 @@ oai-5g-basic/
In the `values.yaml` file we have put only those configuration parameters which we think are really necessary and they should be changed based on PLMN, DNN and sim card information. In case you want to change some other parameters we suggest you go in the helm charts of the network function and do the change there.
Helm chart of every network function looks similar and has the below structure. Only the chart of mysql database is different and the NRF
Helm chart of every network function looks similar and has the below structure. Only the chart of mysql database is different and the AMF
```
Network_function/
...
...
@@ -144,6 +145,7 @@ or
$: oc new-project oai
```
**NOTE**: Any changes done in the parent chart (Mini, basic, slicing scenario helm charts) will overwrite the sub charts.
### 3.1 Networking related information
...
...
@@ -151,17 +153,28 @@ Network function discovers each-other using NRF and instead of using the ip-addr
*For example: AMF registers with NRF using NRF FQDN (`oai-nrf-svc.oai.svc.cluster.local`). This way we can get rid of any static ip-address configuration. Though we are still keeping the fields where we are mentioning ip-addresses for example `nrfIpv4Addr` in amf values.yaml but that is not being used if `USE_FQDN_DNS` is set to `true`*
To reduce the complexity of this tutorial we will provide only one interface for every network function. This type of setting is not encouraged for testing the core network. Generally AMF, SMF and UPF require multiple interface those interfaces can be configured using multus CNI.
To reduce the complexity of this tutorial we will provide only one interface for every network function. This type of setting is not encouraged for testing the core network. Generally AMF, SMF and UPF require multiple interface those interfaces can be configured using multus CNI. You can configure the extra interfaces inside parent charts of basic, mini or slicing scenario or inside individual network function.
**Note**: AMF, SMF and UPF (oai-spgwu-tiny) can be configured with multiple interfaces using multus CNI if needed. In the `values.yaml` of each network function there are appropriate comments. There is a section `multus` in the value.yaml of these network functions.
```
## Example from ../charts/oai-amf/values.yaml
## Example from charts/oai-5g-core/oai-amf/values.yaml
multus:
create: false
n4IPadd: "192.168.18.178"
n4Netmask: "24"
n4Gw: "192.168.18.129"
n1IPadd: "172.21.10.6"
n1Netmask: "22"
n1Gateway: "172.21.11.254"
hostInterface: "ens2f0np0" # Interface of the host machine on which this pod will be scheduled
## If you change in a parent chart basic, mini or slicing you don't have to change in the network function chart
## Example from charts/oai-5g-core/oai-5g-basic
multus:
create: false
n1IPadd: "172.21.10.6"
n1Netmask: "22"
n1Gateway: "172.21.11.254"
hostInterface: "ens2f0np0" # Interface of the host machine on which this pod will be scheduled
```
### 3.2 Network function Images
...
...
@@ -246,7 +259,7 @@ Once the configuration is finished the charts can be deployed with a user who ha
``` shell
$: helm spray .
[spray] processing chart from local file or directory "."...
1. Get the application name by running these commands:
export GNB_POD_NAME=$(kubectl get pods --namespacedefault-l"app.kubernetes.io/name=oai-gnb,app.kubernetes.io/instance=gnb"-ojsonpath="{.items[0].metadata.name}")
export GNB_eth0_IP=$(kubectl get pods --namespacedefault-l"app.kubernetes.io/name=oai-gnb,app.kubernetes.io/instance=gnb"-ojsonpath="{.items[*].status.podIP}")
export GNB_POD_NAME=$(kubectl get pods --namespaceoai-l"app.kubernetes.io/name=oai-gnb,app.kubernetes.io/instance=gnb"-ojsonpath="{.items[0].metadata.name}")
export GNB_eth0_IP=$(kubectl get pods --namespaceoai-l"app.kubernetes.io/name=oai-gnb,app.kubernetes.io/instance=gnb"-ojsonpath="{.items[*].status.podIP}")
2. Note: This helm chart of OAI-gNB is only tested in RF-simulator mode not tested with hardware on Openshift/Kubernetes Cluster
$:export GNB_POD_NAME=$(kubectl get pods --namespace oa -l"app.kubernetes.io/name=oai-gnb,app.kubernetes.io/instance=gnb"-ojsonpath="{.items[0].metadata.name}")
$:export GNB_eth0_IP=$(kubectl get pods --namespacedefault-l"app.kubernetes.io/name=oai-gnb,app.kubernetes.io/instance=gnb"-ojsonpath="{.items[*].status.podIP}")
$:export GNB_POD_NAME=$(kubectl get pods --namespace oai-l"app.kubernetes.io/name=oai-gnb,app.kubernetes.io/instance=gnb"-ojsonpath="{.items[0].metadata.name}")
$:export GNB_eth0_IP=$(kubectl get pods --namespaceoai-l"app.kubernetes.io/name=oai-gnb,app.kubernetes.io/instance=gnb"-ojsonpath="{.items[*].status.podIP}")
```
...
...
@@ -384,7 +397,7 @@ config:
dnn: "oai"
nssaiSst: "1" # configure according to gnb and amf, smf and upf
1. Get the application name by running these commands:
export NR_UE_POD_NAME=$(kubectl get pods --namespacedefault-l"app.kubernetes.io/name=oai-nr-ue,app.kubernetes.io/instance=nrue"-ojsonpath="{.items[0].metadata.name}")
export NR_UE_POD_NAME=$(kubectl get pods --namespaceoai-l"app.kubernetes.io/name=oai-nr-ue,app.kubernetes.io/instance=nrue"-ojsonpath="{.items[0].metadata.name}")
2. Note: This helm chart of OAI-NR-UE is only tested in RF-simulator mode not tested with hardware on Openshift/Kubernetes Cluster
$:export NR_UE_POD_NAME=$(kubectl get pods --namespacedefault-l"app.kubernetes.io/name=oai-nr-ue,app.kubernetes.io/instance=nrue"-ojsonpath="{.items[0].metadata.name}")
$:export NR_UE_POD_NAME=$(kubectl get pods --namespaceoai-l"app.kubernetes.io/name=oai-nr-ue,app.kubernetes.io/instance=nrue"-ojsonpath="{.items[0].metadata.name}")
```
Now at this time you would have received an ip-address, you can confirm that ue properly got attached via AMF logs or SMF logs. We recommend that you read the logs to understand the message exchanges between different entities.
Now you are start reading the logs of amf, smf and other network function to understand the message flow. Once the pdu session establishment procedure is finished you will receive an ip-address. You can start performing some testing.
### 5.6 Performing some traffic testing
Inside the nr-ue pod there is an extra tcdump container which can be use to perform traffic testing via iperf3 or
PING google.fr (172.217.19.131) 56(84) bytes of data.
64 bytes from par03s12-in-f131.1e100.net (172.217.19.131): icmp_seq=1 ttl=116 time=27.4 ms
64 bytes from par03s12-in-f131.1e100.net (172.217.19.131): icmp_seq=2 ttl=116 time=12.5 ms
...
...
@@ -431,7 +442,17 @@ rtt min/avg/max/mdev = 12.513/21.352/29.042/7.031 ms
## incase above doesn't work try with 8.8.8.8 instead of dns. If that works then probably you have't configure dns properly in SMF.
```
## 6. Changes for Vanila Kubernetes
### 5.7 Uninstall the helm charts
You can remove them one by one or you can use this command
``` shell
$ helm uninstall -n oai $(helm list -aq-n oai)
```
## 6. Extra
### 6.1 Changes for Vanila Kubernetes
All the OAI containers run the network function process as they are root inside the container in the docker engine this is not a problem because by default user is root inside container. But incase of podman in openshift, the containers run as non root users. Some containers like SPGWU, gnb and nr-ue and the tcpdump container to capture packets are privileged containers. In this case in `specs` of these pods the `privilaged` flag should be true.