Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Some parts of this page are now out of date. Use together with more recent page: Release J - Run in Kubernetes

This article helps you to deploy the nonrtric components in your local VM in minikube environment.

...

After initializing helm you can call helm version and you should see below response,

Install Nonrtric

...

Clone IT/dep repo and go to /dep/bin and run below command,

Code Block
languagebash
themeMidnight
titleInstall nonrtric
./deploy-nonrtric -f ../nonrtric/RECIPE_EXAMPLE/example_recipe.yaml


If the deployment is successful, you could below logs,

Image Modified


Note: It may take a while for A1 controller image to be downloaded. 

Kubectl -n nonrtric get pod, will show pod status

Image Modified

Troubleshoot

...

https://ubuntu.com/download/desktop

This article helps you to deploy the nonrtric components in your local VM in minikube environment.

Table of Contents

Prerequisite

  • Docker

Install Minikube

Login into your vm and run the below command as sudo user in the terminal. This will install the latest version of minikube in your vm.

...

languagebash
themeMidnight
titleminikube install



Alternative to Deploy NONRTRIC in Minikube


There is an alternative way, described in the procedure below to run NonRT-RIC kubenetes cluster in Minikube running on Oracle Virtual Box with Ubuntu 22.04.

Via an installation script that brings up Minikube and allow to deploy NonRT-RIC cluster on it. Besides, the Kubernetes GUI could be started to see overall deployment.


Prerequisite

VirtualBox version 6.1. (Can be downloaded from this page Download VirtualBox)

Install Ubuntu 22.04

Ubuntu version 22.04. (Can be downloaded from this page Download Ubuntu)


Basic configuration of Ubuntu on Virtual Box can be found below.

Image Added



Code Block
languagebash
titleInstall Curl and Git
linenumberstrue
###Install Curl###
$ sudo apt install curl
 
###Install Git###
$ sudo apt install git


Install Minikube


Code Block
languagebash
titleMinikube installer on Ubuntu 22.04
linenumberstrue
#!/bin/bash
 
# Script to run as root in Ubuntu 22.04 running on Oracle Virtual Box.
# This will bring up MiniKube running. For further Non-RT RIC installation, the related block must uncomment and run.
# NOTE: Do 'sudo su' before running the script
# NOTE: Before start to installation, ensure that Curl, Git and Wget are ready to use!
 
###Log all cmds to stdout###
set -x
 
###Fetch and install Docker###
curl -fsSL https://get.docker.com -o get-docker.sh
 
sh get-docker.sh
 
###Install Conntrack###
apt-get install conntrack
 
###Install Socat###
apt install socat
 
###Install GO Lang###
wget https://storage.googleapis.com/golang/getgo/installer_linux
chmod +x ./installer_linux
./installer_linux
source ~/.bash_profile
 
###Install cri-dockerd###
git clone https://github.com/Mirantis/cri-dockerd.git
cd cri-dockerd
mkdir bin
go build -o bin/cri-dockerd
mkdir -p /usr/local/bin
install -o root -g root -m 0755 bin/cri-dockerd /usr/local/bin/cri-dockerd
cp -a packaging/systemd/* /etc/systemd/system
sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service
systemctl daemon-reload
systemctl enable cri-docker.service
systemctl enable --now cri-docker.socket
cd ..
 
###Install Crictl###
VERSION="v1.25.0"
wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz
sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin
rm -f crictl-$VERSION-linux-amd64.tar.gz
 
###Fetch and install Minikube###
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
  && chmod +x minikube

sudo
mkdir -p /usr/local/bin/
sudo
install minikube /usr/local/bin/

Start minikube

You can start the minikube with the below command. Check Troubleshoot section for any potential errors.

Code Block
languagebash
themeMidnight
titlestart minikube
sudo minikube start --vm-driver=none

If the above command is successful, you should see the below logs in your terminal,

Image Removed

If there are no issues then you could see below success message,

Image Removed

Install Kubectl

Kubectl command enables us to run commands against k8's cluster.

Code Block
languagebash
themeMidnight
titleinstall kubectl

 
###Fetch and install Kubectl###
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl

chmod +x ./kubectl

sudo
mv ./kubectl /usr/local/bin/kubectl

kubectl version --client #Just Clientprint Version:the version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:52:00Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

Install Helm

Run the below command to install helm version 2.16,

Code Block
languagebash
themeMidnight
titleinstall Helm
curl -L https://git.io
 
###Fetch Helm 3###
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh | bash

Run the below command to install latest helm, Create yaml file to define the service account & cluster role binding for helm,

Code Block
languagebash
themeMidnight
titlehelm tiller
cat > tiller-serviceaccount.yaml << EOF
apiVersion: v1
kind: ServiceAccount
metadata:
  name: tiller
  namespace: kube-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: tiller-clusterrolebinding
subjects:
- kind: ServiceAccount
  name: tiller
  namespace: kube-system
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: ""
EOF
Code Block
languagebash
themeMidnight
titleCreate ServiceAccount
sudo kubectl create -f tiller-serviceaccount.yaml
Code Block
languagebash
themeMidnight
titlehelm init
helm init --service-account tiller --upgrade

After initializing helm you can call helm version and you should see below response,

Image Removed

Install Nonrtric

Clone IT/dep repo and go to /dep/bin and run below command,

Code Block
languagebash
themeMidnight
titleInstall nonrtric

 
###exit root###
exit
 
###Add user to docker group###
sudo usermod -aG docker $USER && newgrp docker
 
 
##################################################################################
## Clone dep repo and deploy Non-RT RIC components                             ###
## Uncomment the following lines to install Non-RT RIC (can also be done later)###
##################################################################################
#git clone "https://gerrit.o-ran-sc.org/r/it/dep"
#cd dep/bin
#sudo ./deploy-nonrtric -f ../nonrtric/RECIPE_EXAMPLE/example_recipe.yaml

If the deployment is successful, you could below logs,

Image Removed

Note: It may take a while for A1 controller image to be downloaded. 

Kubectl -n nonrtric get pod, will show pod status

Image Removed

Troubleshoot

Install Conntrack

  1. When you run minikube start you may get below error. Basically this is connection tracking module needed for kubernetes.

Image Removed

Install conntrack,

Start Minikube


Code Block
languagebash
themetitleMidnightStart Minikube
titlelinenumbersinstall conntrack
sudo apt-get install conntrack

Turn off swap

Once k8's commands are installed , minikube will start the initialization process and you may get below error,

Image Removed 

Simply turn off the swap,

Code Block
languagebash
themeMidnight
titleswap-turnoff
sudo swapoff -a

Increase the CPU

You need to increase the processors of the VM. To this go to the virtual box settings and increase it to 2.

Image Removed

Image Removed

Install socat

...

true
###Start minikube###
minikube start
 
###Check status###
$ minikube status
$ kubectl get pods -n kube-system

Image Added


Open the Kubernetes Dashboard


Code Block
languagebash
themeMidnight
titleInstall socat
apt install socat

Version Details

  • docker - 19.03
  • helm - 2.16
  • minikube - 1.11
  • kubernetes - 1.18

Setup

All the above setup is done in Oracle Virtual box VM and you can try it in different OS's and feel free to update this page

You have Oracle Virtual box installed with Ubuntu VM.

For more information, refer 

https://www.virtualbox.org/

...

titleOpen the Kubernetes Dashboard
linenumberstrue
###Start dashboard###
$ minikube dashboard

Image Added