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.
...
Code Block |
---|
language | bash |
---|
title | Minikube installer on Ubuntu 22.04 |
---|
linenumbers | true |
---|
|
#!/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
mkdir -p /usr/local/bin/
install minikube /usr/local/bin/
###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
mv ./kubectl /usr/local/bin/kubectl
kubectl version --client #Just print the version
###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
###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 |
Start Minikube
Code Block |
---|
language | bash |
---|
title | Start Minikube |
---|
linenumbers | true |
---|
|
###Start minikube###
minikube start
###Check status###
$ minikube status
$ kubectl get pods -n kube-system |
...
Open the Kubernetes Dashboard
Code Block |
---|
language | bash |
---|
title | Open the Kubernetes Dashboard |
---|
linenumbers | true |
---|
|
###Start dashboard###
$ minikube dashboard |
...