- RAM:20G RAM
- CPU:8 core (Can not only 1 CPU!!!)
- Disk:60GB
- Ubuntu 20.04 LTS (Focal Fossa)
Note: All the commands need to be executed as root.
sudo -i
apt-get update
apt-get install -y git vim curl net-tools openssh-server python3-pip nfs-common
cd ~
git clone https://gerrit.o-ran-sc.org/r/ric-plt/ric-dep -b h-release
URL: https://gerrit.o-ran-sc.org/r/gitweb?p=ric-plt%2Fric-dep.git;a=shortlog;h=refs%2Fheads%2Fg-release
If you want to change the version, you should use this command:
cd ric-dep/bin
vim install_k8s_and_helm.sh
cd ric-dep/bin
./install_k8s_and_helm.sh
kubectl get pods -A
| version | command | |
|---|---|---|
| Helm | 3.5.4 | helm version |
| Kubernetes | 1.16.0 | kubectl version |
| Kubecniv | 0.7.5 | kubectl version |
| Docker | 20.10.21 | docker version |
Note: In the D and E version, 2.1 is in the
./deploy-ric-platform ../RECIPE_EXAMPLE/PLATFORM/example_recipe_oran_dawn_release.yamlscript file to install.
./install_common_templates_to_helm.sh
NOTE: How many '
servecm not yet running. sleeping for 2 seconds' it is depends on your download speed. Because it will wait to download download chartmuseum.
./setup-ric-common-template
kubectl create ns ricinfra
helm repo add stable https://charts.helm.sh/stable
helm install nfs-release-1 stable/nfs-server-provisioner --namespace ricinfra
kubectl patch storageclass nfs -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
sudo apt install nfs-common
Find your IP of VM:
ip a
Modify the IP of RIC and AUX:
vim ~/ric-dep/RECIPE_EXAMPLE/example_recipe_oran_h_release.yaml
Deploy the RIC Platform:
cd ~/ric-dep/bin
./install -f ../RECIPE_EXAMPLE/example_recipe_oran_h_release.yaml -c "jaegeradapter influxdb"
- Results similar to the output shown below indicate a complete and successful deployment, all are either “Completed” or “Running”, and that none are “Error”, “Pending”, “Evicted”,or “ImagePullBackOff”.
- The status of pods “PodInitializing” & “Init” & “ContainerCreating” mean that the pods are creating now, you need to wait for deploying.
kubectl get pods -A
- If inflexdb2 is pending, you can refer Issues 1.
- If tiller is Error,you can skip it.
Customized Setting:
cd ~
echo "env:
open:
STORAGE: local
CONTEXT_PATH: /charts
DISABLE_API: false
persistence:
enabled: true
accessMode: ReadWriteOnce
size: 8Gi
storageClass: nfs
service:
type: NodePort" > chart.yaml
Install Chatmuseum:
helm install r4-chartmuseum stable/chartmuseum -f chart.yaml --namespace ricinfra
Verify the IP and Port:
export NODE_PORT=$(sudo kubectl get --namespace ricinfra -o jsonpath="{.spec.ports[0].nodePort}" services r4-chartmuseum-chartmuseum)
export NODE_IP=$(sudo kubectl get nodes --namespace ricinfra -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/
Prepare source code:
docker run --rm -u 0 -it -d -p 8080:8080 -e DEBUG=1 -e STORAGE=local -e STORAGE_LOCAL_ROOTDIR=/chart -v $(pwd)/charts:/charts chartmuseum/chartmuseum:latest
export CHART_REPO_URL=http://0.0.0.0:8090
git clone https://gerrit.o-ran-sc.org/r/ric-plt/appmgr -b h-release
Install DMS tool:
cd appmgr/xapp_orchestrater/dev/xapp_onboarder
apt-get install python3-pip
pip3 uninstall xapp_onboarder
pip3 install ./
chmod 755 /usr/local/bin/dms_cli
ls -la /usr/local/lib/python3.8
chmod -R 755 /usr/local/lib/python3.8
Issue 1:Pod is Crashbackoff
Warning FailedMount 110s kubelet MountVolume.SetUp failed for volume "pvc-759e2292-6938-4b8e-b6e3-67bbf9b7b904" : mount failed: exit status 32
- Solution:Re-install the dependent tools
apt-get install -y nfs-common
Issue 2:Unauthorized
- If the xApp need to access the InfluxDB, it maybe need to login-in by using user/password
Error: raise InfluxDBClientError(err_msg, response.status_code) influxdb.exceptions.InfluxDBClientError: 401: {"code":"unauthorized","message":"Unauthorized"}
- Solution:Modify the user/password in the xApp code Step 1:Enter the secret of InfluxDB
kubectl get secret -n ricplt
kubectl edit secret -n ricplt <InfluxDB secret>
Step 2:Decode the user/password
echo 'amYzOTJoZjc4MmhmOTMyaAo=' | base64 --decode
Step 3:Modify the InfluxDB user/password in the xApp using the decoded user/password
https://ithelp.ithome.com.tw/articles/10262330
kubectl delete pod --all -n <namespace>
cd ~/ric-dep/bin
./uninstall
sudo -i
touch Deploy_RIC-Platform_H-Release.sh
chmod +x Deploy_RIC-Platform_H-Release.sh
vim Deploy_RIC-Platform_H-Release.sh
# Install the Dependent Tools
#-------------------------------------------------------------------------------
echo "------------------ Install the Dependent Tools ----------------------"
apt-get update
apt-get install -y git vim curl net-tools openssh-server python3-pip nfs-common
# Download the source code of RIC Platform
#-------------------------------------------------------------------------------
echo "------------ Download the source code of RIC Platform ---------------"
cd ~
git clone https://gerrit.o-ran-sc.org/r/ric-plt/ric-dep -b h-release
# Execute the Installation Script of the Docker, Kubernetes and Helm 3
#-------------------------------------------------------------------------------
echo "--------------Install Docker, Kubernetes and Helm 3------------------"
cd ric-dep/bin
./install_k8s_and_helm.sh
# Add the ric-common templates
#-------------------------------------------------------------------------------
echo "--------------------Install the Dependent Tools----------------------"
./install_common_templates_to_helm.sh
./setup-ric-common-template
cd ../..
# Install nfs for InfluxDB
#-------------------------------------------------------------------------------
echo "------------------Install the Dependent Tools------------------------"
kubectl create ns ricinfra
helm repo add stable https://charts.helm.sh/stable
helm install nfs-release-1 stable/nfs-server-provisioner --namespace ricinfra
kubectl patch storageclass nfs -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
sudo apt install nfs-common
# Deploy the RIC Platform
echo "------------------Install the Dependent Tools------------------------"
cd ~/ric-dep/bin
./install -f ../RECIPE_EXAMPLE/example_recipe_oran_h_release.yaml -c "jaegeradapter influxdb"
kubectl get pods -A
cd ../..
echo "----------wait:30s---------"
for i in 10 20 30
do
echo "----------$i s---------"
sleep 10
done
# check the bug of influxdb
echo "-------------------------check the influxdb--------------------------"
z=$(kubectl get pods -n ricplt | grep "influxdb" | awk '{print $3}')
if [ $z = "Running" ]
then
echo "------->already Running"
else
echo "------->still Pending"
cd ~
echo "apiVersion: v1
kind: PersistentVolume
metadata:
name: r4-influxdb
labels:
name: r4-influxdb
spec:
storageClassName: nfs
capacity:
storage: 50Gi
accessModes:
- ReadWriteOnce
hostPath:
type: DirectoryOrCreate
path: /mnt/ricplt-influxdb-data" > influxdb-pv.yaml
kubectl apply -f influxdb-pv.yaml
fi
echo "----------wait:30s---------"
for i in 10 20 30
do
echo "----------$i s---------"
sleep 10
done
# Install the DMS Tool
echo "-------------------------Install the DMS Tool--------------------------"
cd ~
echo "env:
open:
STORAGE: local
CONTEXT_PATH: /charts
DISABLE_API: false
persistence:
enabled: true
accessMode: ReadWriteOnce
size: 8Gi
storageClass: nfs
service:
type: NodePort" > chart.yaml
helm install r4-chartmuseum stable/chartmuseum -f chart.yaml --namespace ricinfra
export NODE_PORT=$(kubectl get --namespace ricinfra -o jsonpath="{.spec.ports[0].nodePort}" services r4-chartmuseum-chartmuseum)
export NODE_IP=$(kubectl get nodes --namespace ricinfra -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/
docker run --rm -u 0 -it -d -p 8090:8080 -e DEBUG=1 -e STORAGE=local -e STORAGE_LOCAL_ROOTDIR=/chart -v $(pwd)/charts:/charts chartmuseum/chartmuseum:latest
export CHART_REPO_URL=http://0.0.0.0:8090
git clone https://gerrit.o-ran-sc.org/r/ric-plt/appmgr -b h-release
cd appmgr/xapp_orchestrater/dev/xapp_onboarder
apt-get install python3-pip
pip3 uninstall xapp_onboarder
pip3 install ./
chmod 755 /usr/local/bin/dms_cli
ls -la /usr/local/lib/ptyhon3.8
chmod -R 755 /usr/local/lib/python3.8
./Deploy_RIC-Platform_H-Release.sh
kubectl describe pods -n ricplt r4-influxdb-influxdb2-0
kubectl get pvc -A
- We can found that influxdb was pending, so its pod was pending
kubectl describe pods -n ricplt r4-influxdb-influxdb2-0
- We can found that we didn't give it a volume.
kubectl get pv -A
- We can found that we really didn't give it a volume. ::: :::success - solution
cd ~
echo "apiVersion: v1
kind: PersistentVolume
metadata:
name: r4-influxdb
labels:
name: r4-influxdb-influxdb2
spec:
storageClassName: "nfs"
capacity:
storage: 50Gi
accessModes:
- ReadWriteOnce
hostPath:
type: DirectoryOrCreate
path: /mnt/ricplt-influxdb-data" > influxdb-pv.yaml
kubectl apply -f influxdb-pv.yaml
:::
- It have some problem about authorized
- original
git clone https://gerrit.o-ran-sc.org/r/ric-plt/appmgr -b h-release
cd ~/appmgr/xapp_orchestrater/dev/xapp_onboarder
pip3 install ./
- Change
docker run --rm -u 0 -it -d -p 8090:8080 -e DEBUG=1 -e STORAGE=local -e STORAGE_LOCAL_ROOTDIR=/chart -v $(pwd)/charts:/charts chartmuseum/chartmuseum:latest
export CHART_REPO_URL=http://0.0.0.0:8090
git clone https://gerrit.o-ran-sc.org/r/ric-plt/appmgr -b h-release
cd appmgr/xapp_orchestrater/dev/xapp_onboarder
apt-get install python3-pip
pip3 uninstall xapp_onboarder
pip3 install ./
chmod 755 /usr/local/bin/dms_cli
ls -la /usr/local/lib/ptyhon3.8
chmod -R 755 /usr/local/lib/python3.8
:::info
- When I ran this command
./install_k8s_and_helm.sh, it appeared this error - Can't find this docker version 20.10.12-0ubuntu2~20.04.1
- Command
apt-get install -y --allow-downgrades --allow-change-held-packages --allow-unauthenticated --ignore-hold docker.io=20.10.12-0ubuntu2~20.04.1 - error
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '20.10.12-0ubuntu2~20.04.1' for 'docker.io' was not found:::
:::success
- solution
- Install master version
git clone https://gerrit.o-ran-sc.org/r/ric-plt/ric-dep -b master
- Because the version of docker becomes 20.10.12-0ubuntu1~20.04.1 :::
- If you install this branch(or above) and Improve E2term's log-level, it will occur an error
- solution
- Don't revise this file
vim ~/ric-dep/helm/e2term/templates/deployment.yaml, because this branch already improve the log-level.


























