This tutorila illustrates an example on how to build kube5g and deploy LTE-OAI network on kubernets.
This tutorila illustrates how to build kube5g and deploy mosaic5g operaor, which is built using [Openshift operator SDK](https://github.com/operator-framework/operator-sdk). This tutorial will use [microk8s](https://microk8s.io/) to use [kubernetes](https://kubernetes.io/). For more information on the operator, please visite the official site of [openshift operator](https://www.openshift.com/learn/topics/operators).
More tutorials are availables on [kube5g-tutorials](https://gitlab.eurecom.fr/osama.arouk/kube5g/wikis/home)
# How to deploy OAI-LTE using Kubernetes
# How to deploy OAI-LTE in Kubernetes using mosaic5g-operator
## Requirements
The following requirements shall be met to sucessfully deploy 4G network using docker:
...
...
@@ -16,7 +16,7 @@ The following requirements shall be met to sucessfully deploy 4G network using d
For this tutorial we use the following:
- GigaByte Box with ubuntu 16.04 and 16 BG RAM
- microk8s version: v1.14.10
- microk8s version: v1.14
- kubectl version: 1.17.3
- USRP: B210 mini
- Phone: Google pixel 2
...
...
@@ -26,44 +26,101 @@ The following figure illustrates the network that we will deploy. It is composed

## kube5g setup
*
* Use the build_m5g script to install the requirements of kube5g
```bash
$ ./build_m5g --install-kube5g-req
````
* Use the build_m5g script to build kube5g:
* Build kube5g using build_m5g script:
```bash
$ ./build_m5g -k
````
```
* Add ```--allow-privileged=true``` to both kubelet and kube-apiserver the microk8s, and then restart the services
- Edit the files
* Install the requirements of kube5g
- Either using the build_m5g script:
```bash
$ ./build_m5g -i
```
- Or using the script of mosaic5g-operator:
1. go to the following directory ```mosaic5g_DIR/kube5g/openshift/m5g-operator``` (it is assumed that you are already in the directory ```mosaic5g_DIR```)
```bash
$ cd kube5g/openshift/m5g-operator
```
2. Install the requirements of mosaic5g-operator by:
```bash
$ ./m5goperator.sh -i
```
* Make sure that everything is fine by checking the status of ```microk8s````
```bash
$ microk8s.status
microk8s is running
addons:
rbac: disabled
ingress: disabled
dns: enabled
metrics-server: disabled
linkerd: disabled
prometheus: disabled
istio: disabled
jaeger: disabled
fluentd: disabled
gpu: disabled
storage: disabled
dashboard: disabled
registry: disabled
```
* Run mosaic5g-operator as a pod in kubernetes
- Go to ```mosaic5g_DIR/kube5g/openshift/m5g-operator```:
```bash
$ cd kube5g/openshift/m5g-operator
```
- You can discover the capability provided by the script ```m5g-operator.sh````
```bash
# kubelet config. Note that you can you your favirite editor, f.g. vim, nano, etc.
sudo vim /var/snap/microk8s/current/args/kubelet
$ ./m5goperator.sh
This program installs the requirements to run kubernets on one machine,
and run mosaic5g-operator as a pod inside kubernetes in order to manage
the deployments and services of 4G/5G networks in cloud native environment.
This program also allows to run mosaic5g-operator locally as Golang app.
Options:
-i | --install
Install and run microk8s kubectl, then deploy operator on it"
-n | --init
Apply CRD to k8s cluster (Required for Operator)"
-l | --local
Run Operator as a Golang app at local"
container [start|stop]
Run Operator as a POD inside Kubernetes"
-c | --clean
Remove CRD from cluster"
-r | --remove
remove the snap of kubectl and microk8s
Usage:
./m5goperator.sh -i
./m5goperator.sh container start
```
- Apply the Custom Resource Defintion (CRD) to k8s cluster
```bash
#kube-apiserver config. Note that you can you your favirite editor, f.g. vim, nano, etc.
sudo vim /var/snap/microk8s/current/args/kube-apiserver