Near RealTime RIC
1. Installation
1.1. Containerd and kubernetes (skip if already installed)
First things first install containerd, kubeadm and kubectl. The cluster configuration passed to kubeadm is available here and the only required modification is under the "CertSANs" option you should change to the hostname of your machine. This modification ensures that the self-signed certificates generated by kubeadm will remain valid for your machine after a change in IP address, which is common for us, as long as you as acessing it using its hostname.
Note: This will install kubernetes using containerd instead of docker, so the
cli for your containers is ctr
and the namespace used by kubernetes is
k8s.io
1.2. Step by step kubernetes setup
Create the kubernetes cluster using the config.yaml provided.
kubeadm init --config config.yaml
Install flannel for networking to work
kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
Create namespaces in kubernetes
kubectl create ns ricplt
kubectl create ns ricxapp
Remove master taint so everything can run on the same machine
kubectl taint nodes --all node-role.kubernetes.io/control-plane-
1.3. Installing the Near-RT RIC
Clone O-RAN SCs ric-dep
repository
git clone "https://gerrit.o-ran-sc.org/r/ric-plt/ric-dep"
Start a chartsmuseum instance (this is a repository for helm charts).
chartmuseum --debug --port 6873 --storage local --storage-local-rootdir $HOME/helm/chartsmuseum/
Add a plugin to allow helm to push charts to its chartmuseums
helm plugin install https://github.com/chartmuseum/helm-push
Add the local museum to helm
helm repo add local http://localhost:6873/
helm repo list
Build the helm charts and upload them to the local chartsmuseum
cd helm/charts
make nearrtric
Install the RIC using the provided in the ric-dep repository
helm install nearrtric -n ricplt local/nearrtric -f RECIPE_EXAMPLE/example_recipe_oran_h_release.yaml
2. Building xApps
Here are the instructions to build the modified version of the bouncer xApp used in tests (the one that works with srsRAN 23.10.1). First clone the repository:
git clone https://github.com/gckopper/bouncer-xapp -b srsRAN-E2 --depth 1
-b
flag allows you to clone a specific branch, in this case the
srsRAN-E2
branch, and the --depth 1
flag tells git to only clone the latest
commit.
Then there is a script inside the repository that builds the container image using docker and saves it to containerd internal repository. Building images with ctr is not possible at the moment. Once the image has finished build it is time to deploy it.
3. Deploying and managing xApps
To deploy the container image, first clone the official appmgr repository from O-RAN.
git clone https://gerrit.o-ran-sc.org/r/ric-plt/appmgr
This application is used to manage xApps. So lets build it and install it. First we need to go inside the correct folder
cd appmgr/xapp_orchestrater/dev/xapp_onboarder
Create a python virtual environmente to isolate the dependencies of the xApp Onboarder from your system. Just remember that to use this application you'll need to activate the environment using the second command.
python3 -m venv venv3
source venv/bin/activate
pip install -r requirements.txt
deativate
.
Onboard the xApp. Keep in mind that the typo in shcema
is necessary.
CHART_REPO_URL=http://localhost:6873 dms_cli onboard --config-file-path <path-to-bouncer-xapp>/Bouncer/init/config-file.json --shcema_file_path <path-to-bouncer-xapp>/Bouncer/init/schema.json
Download the chart you've just created.
CHART_REPO_URL=http://localhost:6873 dms_cli download_helm_chart bouncer-xapp 2.0.0
Install the xApp with helm.
helm install bouncer-xapp -n ricxapp bouncer-xapp-2.0.0.tgz
Once installed you can start and stop the application by scaling its deployment in kubernetes.
# start xapp
kubectl scale --replicas=1 -n ricxapp deployment ricxapp-bouncer-xapp
# stop xapp
kubectl scale --replicas=0 -n ricxapp deployment ricxapp-bouncer-xapp
Note: When developing or changing the code for the xApp you may need to update the running version of the container image. To do so re-build the image using the script as that will update the image in your local containerd repository. Then simply scale the xApp deployment down and up and the new version should be running. This will only work if the version stays the same.