Skip to content
Snippets Groups Projects
Commit c8d67ce2 authored by Sagar Arora's avatar Sagar Arora :bicyclist_tone1:
Browse files

[added] helm charts tutorial

- Added helm charts tutorial
- change the onap-0.1.0 tag from all Charts.yaml
- updated building images
parent 13e221c7
No related branches found
No related tags found
1 merge request!7Merging tutorials
...@@ -20,7 +20,7 @@ version: 0.1.0 ...@@ -20,7 +20,7 @@ version: 0.1.0
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. # incremented each time you make changes to the application.
appVersion: onap-0.1.0 appVersion: 0.1.0
keywords: keywords:
- 5GCN - 5GCN
......
...@@ -80,7 +80,7 @@ config: ...@@ -80,7 +80,7 @@ config:
smfIpv4Addr0: "0.0.0.0" smfIpv4Addr0: "0.0.0.0"
smfHttpVersion0: "v1" smfHttpVersion0: "v1"
smfInstanceId1: "2" smfInstanceId1: "2"
smfIpv4Addr1: "oai-smf-sa" smfIpv4Addr1: "127.0.0.1"
smfHttpVersion1: "v1" smfHttpVersion1: "v1"
nrfIpv4Addr: "192.168.18.178" nrfIpv4Addr: "192.168.18.178"
nrfPort: 80 nrfPort: 80
......
...@@ -20,7 +20,7 @@ version: 0.1.0 ...@@ -20,7 +20,7 @@ version: 0.1.0
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. # incremented each time you make changes to the application.
appVersion: onap-0.1.0 appVersion: 0.1.0
keywords: keywords:
- 5GCN - 5GCN
......
...@@ -20,7 +20,7 @@ version: 0.1.0 ...@@ -20,7 +20,7 @@ version: 0.1.0
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. # incremented each time you make changes to the application.
appVersion: onap-0.1.0 appVersion: 0.1.0
keywords: keywords:
- Core Network - Core Network
......
...@@ -20,7 +20,7 @@ version: 0.1.1 ...@@ -20,7 +20,7 @@ version: 0.1.1
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. # incremented each time you make changes to the application.
appVersion: onap-0.1.0 appVersion: 0.1.1
# TODO # TODO
#dependencies: #dependencies:
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
# 1. Retrieve the correct network function branches # # 1. Retrieve the correct network function branches #
| CNF Name | Branch Name | Commit at time of writing | Ubuntu 18.04 | RHEL8 | | CNF Name | Branch Name | Commit at time of writing | Ubuntu 18.04 | RHEL8 (UBI8) |
| ----------- |:----------------------- | ------------------------------------------ | ------------ | ---------------| | ----------- |:----------------------- | ------------------------------------------ | ------------ | ----------------|
| AMF | `develop` | `82ca64fe8d79dbadbb1a495124ee26352f81bd7a` | X | Releasing soon | | AMF | `develop` | `1a9f65c6a1e1846b13b82ad337a965596565fdfe` | X | X |
| SMF | `develop` | `0dba68d6a01e1dad050f47437647f62d40acaec6` | X | Releasing soon | | SMF | `develop` | `11d6375c4ac408805f294172cc789cd196a75dc6` | X | X |
| NRF | `develop` | `0e877cb5b80a9c74fa6abca60b95e2d3d22f7a52` | X | Releasing soon | | NRF | `develop` | `a221f39c9d9729d0652042aee918c81b23d95de6` | X | X |
| SPGW-U-TINY | `gtp_extension_header` | `b628036d2e6060da8ba77c5e4cdde35bf18a62a5` | X | Releasing soon | | SPGW-U-TINY | `gtp_extension_header` | `3898c773f91bb21451d8a9d4ef8e3d06ab184e1d` | X | - |
```bash ```bash
$ git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git $ git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git
...@@ -89,6 +89,21 @@ oai-amf develop f478bafd7a06 1 minute ago ...@@ -89,6 +89,21 @@ oai-amf develop f478bafd7a06 1 minute ago
... ...
``` ```
## 3.2 On a RHEL8 Host ##
RHEL base images generally needs a subscription to access the package repository. For that the base image needs ca and entitlement .pem files. Copy the ca and entitlement .pem files in the oai-amf repository in a new folder name tmp before building the image.
```bash
$ sudo podman build --target oai-amf --tag oai-amf:develop \
--file component/oai-amf/docker/Dockerfile.amf.rhel8.2 \
--build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \
component/oai-amf
...
```
The above command is with podman, incase of docker it can be changed with its docker equivalent.
# 4. Build SMF Image # # 4. Build SMF Image #
## 4.1 On a Ubuntu 18.04 Host ## ## 4.1 On a Ubuntu 18.04 Host ##
...@@ -104,6 +119,22 @@ oai-smf develop f478bafd7a06 1 minute ago ...@@ -104,6 +119,22 @@ oai-smf develop f478bafd7a06 1 minute ago
... ...
``` ```
## 4.2 On a RHEL8 Host ##
RHEL base images generally needs a subscription to access the package repository. For that the base image needs ca and entitlement .pem files. Copy the ca and entitlement .pem files in the oai-smf repository in a new folder name tmp before building the image.
```bash
$ sudo podman build --target oai-smf --tag oai-smf:develop \
--file component/oai-smf/docker/Dockerfile.smf.rhel8.2 \
--build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \
component/oai-smf
...
```
The above command is with podman, incase of docker it can be changed with its docker equivalent.
# 5. Build NRF Image # # 5. Build NRF Image #
## 5.1 On a Ubuntu 18.04 Host ## ## 5.1 On a Ubuntu 18.04 Host ##
...@@ -118,6 +149,21 @@ oai-nrf develop 04334b29e103 1 minute ago ...@@ -118,6 +149,21 @@ oai-nrf develop 04334b29e103 1 minute ago
... ...
``` ```
## 5.2 On a RHEL8 Host ##
RHEL base images generally needs a subscription to access the package repository. For that the base image needs ca and entitlement .pem files. Copy the ca and entitlement .pem files in the oai-nrf repository in a new folder name tmp before building the image.
```bash
$ sudo podman build --target oai-nrf --tag oai-nrf:develop \
--file component/oai-nrf/docker/Dockerfile.nrf.rhel8.2 \
--build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \
component/oai-nrf
...
```
The above command is with podman, incase of docker it can be changed with its docker equivalent.
# 6. Build SPGW-U Image # # 6. Build SPGW-U Image #
...@@ -133,4 +179,18 @@ oai-spgwu-tiny gtp-ext-header dec6311cef3b 1 minute ...@@ -133,4 +179,18 @@ oai-spgwu-tiny gtp-ext-header dec6311cef3b 1 minute
... ...
``` ```
You are ready to [Configure the Containers](./CONFIGURE_CONTAINERS.md). ## 6.2 On a RHEL8 Host ##
RHEL base images generally needs a subscription to access the package repository. For that the base image needs ca and entitlement .pem files. Copy the ca and entitlement .pem files in the oai-spgwu repository in a new folder name tmp before building the image.
```bash
$ sudo podman build --target oai-spgwu-tiny --tag oai-spgwu-tiny:develop \
--file component/oai-spgwu-tiny/docker/Dockerfile.centos8 \
--build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \
component/oai-upf-equivalent
...
```
The above command is with podman, incase of docker it can be changed with its docker equivalent.
You are ready to [Configure the Containers](./CONFIGURE_CONTAINERS.md) or deploying the images using [helm-charts] (./DEPLOY_SA5G_HC.md)
...@@ -18,4 +18,5 @@ ...@@ -18,4 +18,5 @@
1. [Pre-requisites](./DEPLOY_PRE_REQUESITES.md) 1. [Pre-requisites](./DEPLOY_PRE_REQUESITES.md)
2. [Building the Docker Images](./BUILD_IMAGES.md) 2. [Building the Docker Images](./BUILD_IMAGES.md)
3. [Configuring the Containers](./CONFIGURE_CONTAINERS.md) 3. [Configuring the Containers](./CONFIGURE_CONTAINERS.md)
4. [Tutorial: 5G Core Network Deployment and Testing with dsTest](./DEPLOY_SA5G_WITH_DS_TESTER.md) 4. [Tutorial: 5G Core Network Deployment and Testing with dsTest](./DEPLOY_SA5G_WITH_DS_TESTER.md)
\ No newline at end of file 5. [Tutorial: 5G Core Network Deployment using Helm Charts](./DEPLOY_SA5G_HC.md)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OpenAirInterface 5G Core Network Deployment using Helm Charts</font></b>
</td>
</tr>
</table>
**TABLE OF CONTENTS**
1. [Description](#1-description)
3. [Building Images](#2-building-images)
3. [Configuring Helm Charts](#3-configuring-helm-charts)
4. [Deploying Helm Charts](#4-deploying-helm-charts)
## 1. Description
The helm charts can be used on any production grade kubernetes cluster. Currently they are only tested on our inhouse Openshift cluster the cluster information can be found below.
| Software | Version |
|:------------------------ |:----------------------------------- |
| Openshift Client Version | 4.4.10 |
| Kubernetes Version | Kubernetes Version: v1.17.1+45f8ddb |
| helm | v3.5.3 |
### Pre-requisite
The cluster on which these helm charts will be deployed should have RBAC and [Multus CNI](https://github.com/k8snetworkplumbingwg/multus-cni). Multus is necessary to provide multiple interfaces not network functions.
## 2. Building Images
The base image used by network function is dependent on the operating system it will be running on. If it is a debian (ubuntu) based cluster then build base image will be ubuntu. If it is a rpm (core-os) based cluster then build base images will ubi. Follow the links to build images depending on the cluster/worker-node operating system.
## 3. Configuring Helm Charts
Clone the helm chart repository from gitlab currently it is present in helm-chart branch but soon it will be merged in master.
```
$ git clone -b helm-charts https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git
$ cd charts
$ ls charts
mysql oai-amf oai-nrf oai-smf oai-spgwu-tiny
```
Helm chart of every network function looks similar and has the below structure. Only the chart of mysql database is different.
```
Network_function/
├── Chart.yaml
├── templates
│ ├── configmap.yaml
│ ├── deployment.yaml
│ ├── _helpers.tpl
│ ├── multus.yaml
│ ├── NOTES.txt
│ ├── rbac.yaml
│ ├── serviceaccount.yaml
│ └── service.yaml
└── values.yaml
1 directory, 10 files
```
All the configurable parameters for a particular commit/release are mentioned in the `values.yaml` file. These parameters will keep on changing in the future depending on the nature of development and features. **If there is a need to edit a specific configuration parameter then it has to be changed at the time of building images.**
Depending on the namespace where these charts will be instantiated change the value of `namespace` parameter in `values.yaml`. All the network function related configurable parameters are in the sections `config` of the `values.yaml`
### 3.1 Networking related information
The current networking configuration and static ip-address for the network functions is based on what we are using on our openshift cluster for testing. The ip-address should be configured in a way that
- AMF pod is able to reach NRF, SMF and Mysql pod,
- UPF(SPGWU) pod should be able to reach NRF and SMF pod and
- SMF pod should be able to reach AMF, NRF and UPF(SPGWU).
**Through NRF AMF, SMF and UPF can discover each other.**
Refer the below diagram to understand the networking,
![Helm Chart Deployment](helm_diag.png)
NOTE: Kubernetes service name (FQDN) can not be used in place of ip-address. It is recommend to give ip-address.
### 3.2 Configuring AMF
Based on the information in gNB these parameters should be configured.
```
mcc: "208"
mnc: "95"
regionId: "128"
amfsetId: "1"
servedGuamiMcc0: "208"
servedGuamiMnc0: "95"
servedGuamiRegionId0: "128"
servedGuamiAmfSetId0: "1"
servedGuamiMcc1: "460"
servedGuamiMnc1: "11"
servedGuamiRegionId1: "10"
servedGuamiAmfSetId1: "1"
plmnSupportMcc: "208"
plmnSupportMnc: "95"
plmnSupportTac: "0xa000"
sst0: "222"
sd0: "123"
sst1: "1"
sd1: "12"
```
The mysql database is pre-configured with some subscriber information. If there is new subscriber information then it should be configured in the mysql database. The subscriber PLMN information should match with gNB and AMF.
```
mySqlServer: "mysql"
mySqlUser: "root"
mySqlPass: "linux"
mySqlDb: "oai_db"
operatorKey: "63bfa50ee6523365ff14c1f45f88737d" (should be the same in mysql)
```
### 3.3 Configuring SMF
Dns configuration based on the network
```
dnsIpv4Address: ""
dnsSecIpv4Address: ""
```
Currenly APN related information and UE network related information can only be changed at the time of building the SMF network function. Refer [Configure the Containers](./CONFIGURE_CONTAINERS.md) to understand how it can be done.
## 4. Deploying Helm Charts
Helm charts have an order of deployment for the proper configuration of core network.
`mysql --> amf --> nrf --> smf --> upf(spgwu)`
Once the configuration is finished the charts can be deployed with a user who has the rights to
1. Create RBAC
2. Run pod with privileged scc
3. Create multus binds
```
$ helm install mysql mysql/
# wait for the pod to come up
$ helm install amf oai-amf/
# wait for the pod to come up
$ helm install nrf oai-nrf/
# wait for the pod to come up
$ helm install smf oai-smf/
# wait for the pod to come up
$ helm install spgwu oai-spgwu-tiny/
# wait for the pod to come up
$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
amf oai-5g-develop 1 2021-05-12 12:07:36.345877418 +0200 CEST deployed oai-amf-0.1.0 0.1.0
mysql oai-5g-develop 1 2021-05-12 11:09:32.597525506 +0200 CEST deployed mysql-1.6.9 5.7.30
nrf oai-5g-develop 1 2021-05-12 11:32:43.648706741 +0200 CEST deployed oai-nrf-0.1.0 0.1.0
smf oai-5g-develop 1 2021-05-12 12:05:38.251220635 +0200 CEST deployed oai-smf-0.1.0 0.1.0
spgwu oai-5g-develop 1 2021-05-12 12:08:31.408369994 +0200 CEST deployed oai-spgwu-tiny-0.1.1 0.1.1
```
\ No newline at end of file
docs/images/helm_diag.png

37.8 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment