Deploy OAI 5G Core Network using Helm Charts - caprivm/virtualization GitHub Wiki
caprivm ([email protected])
Updated: February 14, 2023
The contents of the page are:
This page explains all the steps required to deploy the OAI-5GCN (OpenAirInterface 5G Core Network) using Helm Charts. As it says in the official page, "OAI 5G-CN is being designed to keep up with the latest cloud native deployment scenarios. This release of helm charts is focused on deploying each Cloud-native Network Function (CNF) individually". The software it was tested on is:
Feature | Value |
---|---|
Kubernetes Cluster | kubespray |
Kubespray Tag | v2.20.0 |
OS Used | Ubuntu 22.04.1 LTS |
vCPU | 16 |
RAM (GB) | 16 |
Disk (GB) | 250 |
Home User | idtolu |
Kubernetes Version | Client: v1.23.7, Server: v1.23.7 |
Helm Version | v3.9.4+gdbc6d8e |
Before executing the step-by-step of this guide, it is important that in the server that you have to install the cluster, you have the cluster management tools installed:
- Intall
kubectl
- Install
helm
- Install
helm spray
plugin - Kubernetes Cluster with Multus-CNI
- Longhorn PVC Provisioner
To install OAI-5GCN with Helm Charts, you have to follow an official documentation from the GitLab page. The result of this step-by-step guide is the installation of a 5G Core based on OpenAirInterface with the following architecture.
Download the repository where the Helm Charts are available, inspect the values.yaml
file and install.
git clone https://github.com/caprivm/virtualization.git ~/5g-repo
cd ~/5g-repo/oai-charts/oai-5g-basic/
cat values.yaml
Output:
mysql:
enabled: true
weight: 0
imagePullPolicy: IfNotPresent
oai5gdatabase: basic
imagePullSecrets:
- name: regcred
persistence:
enabled: false
oai-nrf:
enabled: true
weight: 0
oai-udr:
enabled: true
weight: 1
oai-udm:
enabled: true
weight: 2
oai-ausf:
enabled: true
weight: 3
oai-amf:
enabled: true
weight: 4
multus:
create: false
oai-upf:
enabled: true
weight: 5
multus:
create: false
oai-smf:
enabled: true
weight: 6
multus:
create: false
NOTE: You can create a second interface for the AMF, SMF, and UPF services. However, this functionality is still in testing as of the update date of this guide.
Install the OAI-5GCN.
cd ~/5g-repo/oai-charts/oai-5g-basic/
helm dependency update; helm spray --namespace oai-5gcn .
# Saving 8 charts
# Deleting outdated charts
# [spray] processing chart from local file or directory "."...
# [spray] deploying solution chart "." in namespace "oai-5gcn"
# [spray] processing sub-charts of weight 0
# [spray] > upgrading release "mysql": going from revision 3 (status deployed) to 4 (appVersion 8.0.31)...
# [spray] o release: "mysql" upgraded
# [spray] > upgrading release "oai-nrf": going from revision 3 (status deployed) to 4 (appVersion v1.5.0)...
# [spray] o release: "oai-nrf" upgraded
# [spray] > waiting for liveness and readiness...
# [spray] processing sub-charts of weight 1
# [spray] > upgrading release "oai-udr": going from revision 3 (status deployed) to 4 (appVersion v1.5.0)...
# [spray] o release: "oai-udr" upgraded
# [spray] > waiting for liveness and readiness...
# [spray] processing sub-charts of weight 2
# [spray] > upgrading release "oai-udm": going from revision 3 (status deployed) to 4 (appVersion v1.5.0)...
# [spray] o release: "oai-udm" upgraded
# [spray] > waiting for liveness and readiness...
# [spray] processing sub-charts of weight 3
# [spray] > upgrading release "oai-ausf": going from revision 3 (status deployed) to 4 (appVersion v1.5.0)...
# [spray] o release: "oai-ausf" upgraded
# [spray] > waiting for liveness and readiness...
# [spray] processing sub-charts of weight 4
# [spray] > upgrading release "oai-amf": going from revision 3 (status deployed) to 4 (appVersion v1.5.0)...
# [spray] o release: "oai-amf" upgraded
# [spray] > waiting for liveness and readiness...
# [spray] processing sub-charts of weight 5
# [spray] > upgrading release "oai-upf": going from revision 3 (status deployed) to 4 (appVersion v1.5.0)...
# [spray] o release: "oai-upf" upgraded
# [spray] > waiting for liveness and readiness...
# [spray] processing sub-charts of weight 6
# [spray] > upgrading release "oai-smf": going from revision 3 (status deployed) to 4 (appVersion v1.5.0)...
# [spray] o release: "oai-smf" upgraded
# [spray] > waiting for liveness and readiness...
# [spray] upgrade of solution chart "." completed in 2s
Once the installation is complete, you can check the status of the services using the following command.
kubectl -n oai-5gcn get pods
# NAME READY STATUS RESTARTS AGE
# mysql-8cf7d6c5d-2jtgt 1/1 Running 1 (30h ago) 30h
# oai-amf-847f5958dc-sff2x 2/2 Running 0 30h
# oai-ausf-55f4bddc7-vhh96 2/2 Running 0 30h
# oai-nrf-7c4c786474-pb289 2/2 Running 0 30h
# oai-smf-5f765cc5d8-mm4qw 2/2 Running 0 30h
# oai-spgwu-tiny-55d7bbf59-zv465 2/2 Running 0 30h
# oai-udm-64dd777f97-c8mr5 2/2 Running 0 30h
# oai-udr-547c977dc5-ddzxk 2/2 Running 0 30h
Check the logs smf
and upf
to see that the PFCP session is properly configured. Assume that UPF_POD_NAME=oai-spgwu-tiny-55d7bbf59-zv465
and SMF_POD_NAME=oai-smf-5f765cc5d8-mm4qw
. The output of the commands need to be greater than 1
in both cases.
kubectl -n oai-5gcn logs -c spgwu $UPF_POD_NAME | grep 'Received SX HEARTBEAT REQUEST' | wc -l
# 11159
kubectl -n oai-5gcn logs -c smf $SMF_POD_NAME | grep 'handle_receive(16 bytes)' | wc -l
# 543
In case you need to reboot OAI-5GCN, follow this procedure.
for CHART in `helm list -n oai-5gcn | awk '{print $1}' | grep -v "NAME"`; do helm -n oai-5gcn delete $CHART; done
watch kubectl -n oai-5gcn get pods # CTRL-C to get out of watch window.
Wait until all the pods are deleted. At this point, you can make modifications to the manifest files. Then, after changes, start again the OAI-5GCN:
cd ~/5g-repo/oai-charts/oai-5g-basic/
helm dependency update; helm spray --namespace oai-5gcn .
watch kubectl -n oai-5gcn get pods
Wait until all the pods are Running
.
Enjoy OAI-5GCN!