<style> .title { color: #009933; font-weight:bold; } .highlight { color: #ff4d4d; font-weight:bold; border-bottom:2px red solid; padding-bottom:2px; } </style> <!-- <font class="highlight"> --> <!-- <font class="title"> --> <!-- 縮寫提示 --> <!-- *[O-RAN]:Open Radio Access Network --> :::warning # <center><i class="fa fa-cog fa-spin fa-1x fa-fw"></i> [F Release] Install the OSC RIC platform </center> ::: ###### tags: `study` `platform` `F` :::success **🎯 Goals:** - [x] <a href="#Module-1-Problem-with-VM-in-my-PC">- Install VM in my PC</a> - [x] <a href="#Module-2-Install-Summary-in-my-PC">- Install Near-RT RIC Platform with F-release in my PC</a> - [x] <a href="#Module-3-Connect-to-Lab-VM">- Connect to Lab VM</a> - [x] <a href="#Module-4-VM-installation-platform-in-the-lab">- VM installation platform in the Lab</a> - [x] <a href="#42-Problem---2--KUBERNETES---COREDNS-pending"> - Seniors have a more fundamental solution to the 4.2 Problem 2</a> - [x] <a href="#6-Script-to-Deploy-RIC-Platform-quickly">- Script to Deploy RIC Platform quickly</a> - [x] <a href="#Module-5-debug-tool-Log">- Debug tool (Log)</a> ::: :::info :bookmark: **Reference:** - [VM for RIC Team Summer Project](https://hackmd.io/@Yueh-Huan/r1Ti7Y0cq) ::: [toc] # 1. Problem with VM in my NoteBook ## 1.1 Insufficient memory - On the left is my memory allocation screen - On the right is the memory allocation screen suggested by the senior ![](https://i.imgur.com/BwtpAHj.jpg) :::success **solution:** 1. Allocate 6GB to the VM and leave 2GB to the original OS 2. Connect to Lab VM ::: :::warning **unsolvable problem of 1. :** Operation is rather awkward ::: ## 1.2 Encounter black screen ![](https://i.imgur.com/KeeIsBV.png =650x) - **because the system goes to sleep** :::success **solution:** Move the mouse or press any key on the keyboard to log in again ::: # 2. Install successfully in my NoteBook ## 2.1 Near-RT RIC deployed successfully ### 2.1.1 Installation result ![](https://i.imgur.com/LsgSzY6.jpg) - **Each item did not get an Error** - **First installed on 2022/07/04 (Mon.)** - **[Command History](https://mailntustedutw-my.sharepoint.com/:u:/g/personal/b10902214_ms_ntust_edu_tw/EUXf0BP9DFhAoez-z09SR5EBQvfTeP78yCTOMItSH6LaYw)** ## 2.2 DMS tools installed successfully ### 2.2.1 Installation result ![](https://i.imgur.com/l0N04sc.jpg) # 3. Connect to Lab VM ## 3.1 Successfully connected to the lab's VPN ![](https://i.imgur.com/PkcqYUs.png) ## 3.2 Problem ### 3.2.1 Don't know how to enter commands ![](https://i.imgur.com/FSYQHS1.png) - [x] **Don't know where the command should be entered in windows OS** > As long as the terminal can use the cmd of ssh windows, it can be used, of course, putty can also be used :::success - **SSH to VM Command:** ```cmd= E: cd E:\Lab VM ssh -i ric-yh.pem ubuntu@192.168.8.218 ```` ::: ### 3.2.2 Encountered error -1 - [x] **Windows SSH: Permissions for 'private-key' are too open (Permission denied)** <br> ![](https://i.imgur.com/sba4aPc.png) <br> - [Same problem link -1](https://superuser.com/questions/1296024/windows-ssh-permissions-for-private-key-are-too-open) - [Same problem link -2](https://stackoverflow.com/questions/48888365/openssh-using-private-key-on-windows-unprotected-private-key-file-error) - [✔️Same problem link -in Chinese](https://leesonhsu.blogspot.com/2021/03/ssh-key-windows-permission-denied.html) :::success <!-- ![](https://i.imgur.com/cJLWbbp.png) --> **Solution:** ![](https://i.imgur.com/Awa73pM.png) ::: **My Step:** 1. Disable inheritance -> Convert inherited permissions to explicit permissions 2. Remove All Users group 3. Rejoin the current user as full control ![](https://i.imgur.com/COhP8vx.png =500x) ![](https://i.imgur.com/KNZYe0V.png =500x) ![](https://i.imgur.com/5z3vfkB.png =500x) ![](https://i.imgur.com/NlQKFis.png =500x) <br> **🟢 Finally, a screen similar to this will appear, indicating that the setting is complete** ![](https://i.imgur.com/3n0DoZ9.png =500x) <br> **successful connection screen 🎉🎉🎉** ![](https://i.imgur.com/ldr0UpR.png =500x) # 4. VM installation platform in the lab :::info **✔️ IP of VM:** 10.0.10.205 ::: ## 4.1 Problem - 1 (CrashLoopBackOff) ### 4.1.1 ❌ Error deploying RIC platform (CrashLoopBackOff) ![](https://i.imgur.com/PivyrKj.png) - ricplt deployment-ricplt-e2term-alpha-6f97c4896d-hrfjr 0/1 <font style="color:red"> **CrashLoopBackOff** </font> 9 23m ### 4.1.2 Try Re do Deploy the RIC Platform (keep looping) - 🔄 Re do Deploy the RIC Platform: - ![](https://i.imgur.com/Fx9PvwE.png) - <font style="color:red">**Error:**</font> cannot re-use a name that is still in use - <font style="color:red">**keep looping**</font> - [Useful Link](https://blog.csdn.net/qq_42997214/article/details/120994019) :::success **Solution:** ```cmd= helm ls --all-namespaces kubectl delete namespace e2term-3.0.0 ``` ![](https://i.imgur.com/5Kixnvi.png) ::: :::danger **Error from server (NotFound): pods "e2term-3.0.0" not found** ::: ### 4.1.3 Try Redo from beginning - **[In 1.3 Execute the Installation Script of the Docker, Kubernetes and Helm 3](/@Min-xiang/SJD9Xh5c9#13-Execute-the-Installation-Script-of-the-Docker-Kubernetes-and-Helm-3)** ```cmd= cd ric-dep/bin ./install_k8s_and_helm.sh ``` - A prompt appears > [wait-control-plane] > Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can <font style="color:red">take up to **4m0s**</font> - ![](https://i.imgur.com/Bd50wh9.png) :::danger > waiting for 5/8 pods running in namespace [kube-system] with keyword [Running] > &nbsp; + '[' 5 -lt 8 ']' **keep looping for 2 hour up (from 1/8 to 5/8)** **And I have repeated the operation more than 10 times** ::: ### 4.1.4 Try reset K8S ```cmd= kubeadm reset -f kubeadm init ``` ![](https://i.imgur.com/m1GM3iN.png) ### 4.1.5 Try delet ric-dep, then restart install ```cmd= cd ~ rm -r -v ric-dep ``` ### 4.1.6 Try uninstall kubeadm ```cmd= cd ~ kubeadm reset apt-get purge kubeadm kubectl kubelet kubernetes-cni kube* apt-get autoremove rm -rf ~/.kube ``` ### 4.1.7 Try uninstall docker 1. Delete a software and all packages that are automatically installed when it is installed 2. Check docker related packages 3. Delete useless related configuration files 4. Uninstall the docker-related plug-ins that have not been deleted (combined with the actual situation of your own computer) 5. Delete the related configuration 6. Delete the directory of docker 7. Make sure docker is uninstalled ```cmd= sudo apt-get autoremove docker docker-ce docker-engine docker.io containerd runc dpkg -l | grep docker dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P sudo apt-get autoremove docker-ce-* sudo rm -rf /etc/systemd/system/docker.service.d sudo rm -rf /var/lib/docker docker --version ``` <!-- 2. Check docker related packages 3. Delete useless related configuration files ```cmd=2 dpkg -l | grep docker dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P ``` 4. Uninstall the docker-related plug-ins that have not been deleted (combined with the actual situation of your own computer) ```cmd=4 sudo apt-get autoremove docker-ce-* ``` 5. 6. Delete the related configuration & directory of docker ```cmd=5 sudo rm -rf /etc/systemd/system/docker.service.d sudo rm -rf /var/lib/docker ``` 7. Make sure docker is uninstalled ```cmd=7 docker --version ``` --> ## 4.2 Problem - 2 ( KUBERNETES - COREDNS pending) ![](https://i.imgur.com/gsQeOAI.png) - [same problem link](https://stackoverflow.com/questions/52609257/coredns-in-pending-state-in-kubernetes-cluster) :::success **Try to install Pod network add-on (Base on this [guide](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network)).** ```cmd= kubectl apply -f https://docs.projectcalico.org/v3.14/manifests/calico.yaml ``` 🎉🎉🎉**Success screen with everything running** - View current status 1. get nodes 2. get only kube-system 3. get all-namespaces ```cmd= kubectl get nodes kubectl get pods -n kube-system kubectl get pods --all-namespaces -o wide ``` ![](https://i.imgur.com/SbmtQVu.png) ::: :::warning **❕ Seniors have a more fundamental solution to the problem** - [Solution Link](/@Min-xiang/SJD9Xh5c9#13-Solve-the-problem-of-flannel-component) - Because the third-party files have been modified, the instructions originally set by the platform installation package will cause one thing to fail to be installed. - ==The reason for this problem is because that thing is not installed, so the above method does not solve the root problem.== ::: ## 4.3 Problem - 3 ( Failed post-install platform) - In the command ([according to the steps for deploying the RIC platform](https://hackmd.io/@Min-xiang/SJD9Xh5c9#25-Execute-the-Installation-Script-of-Near-RT-RIC)) : ```cmd= cd ~/ric-dep/bin ./install -f ../RECIPE_EXAMPLE/example_recipe_oran_f_release.yaml -c "jaegeradapter influxdb" ``` :::danger **❌ timed out waiting for the condition** ::: ![](https://i.imgur.com/htl46xK.png) # 5. Reinstall the lab VM OS The problem encountered in [4. (the fourth point)](#41-Problem---1-CrashLoopBackOff) , guess it may be a problem with the system, so try to reinstall the VM at this step ## 5.1 Reconnect to the lab VM via SSH ### 5.1.1 Problem - 1: Remote host ID changed! ![](https://i.imgur.com/ai6te2e.png =620x) :::success **Solution:** > USER_NAME is your OS username; - Open the **known_hosts** in the path **C:\Users\USER_NAME\.ssh** with Notepad - **Delete** the line containing the old IP <br> ![](https://i.imgur.com/faVhki9.png =400x) <br> ![](https://i.imgur.com/vlLzei0.png =400x) ::: ### 5.1.2 ✔Successfully connected to lab VM - ![](https://i.imgur.com/DoxXOiL.jpg =400x) # 6. ✔Script to Deploy RIC Platform quickly <!-- ![](https://i.imgur.com/lCy0gp9.png) --> :::spoiler **Useful quick-deploy commands provided by Tori** - [Script Link](/@Min-xiang/SJD9Xh5c9#Script-to-Deploy-RIC-Platform-quickly) - Uninstall Near-RT RIC Platform ```cmd= cd ~/ric-dep/bin ./uninstall ``` - Script to Deploy RIC Platform quickly ```cmd= sudo -i touch Deploy_RIC-Platform_F-Relese.sh chmod +x Deploy_RIC-Platform_F-Relese.sh vim Deploy_RIC-Platform_F-Relese.sh ``` ```cmd= #!/bin/sh # ----------------------------------- echo "===> Install the Dependent Tools" apt-get update apt-get install -y git vim curl net-tools openssh-server python3-pip nfs-common # ----------------------------------- echo "===> Install the Docker, Kubernetes and Helm 3" cd ~ git clone https://github.com/ToriRobert/nRT-RIC_Installation.git ric-dep cd ~/ric-dep/bin ./install_k8s_and_helm.sh kubectl get pods -n kube-system # ----------------------------------- echo "===> Install the Near-RT RIC Platform" ./install_common_templates_to_helm.sh ./setup-ric-common-template helm repo add stable https://charts.helm.sh/stable helm install nfs-release-1 stable/nfs-server-provisioner --namespace default kubectl patch storageclass nfs -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' cd ~/ric-dep/bin ./install -f ../RECIPE_EXAMPLE/example_recipe_oran_f_release.yaml -c "jaegeradapter influxdb" kubectl get pods -A # ----------------------------------- echo "===> Install the DMS Tool" cd ~/ric-dep 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/ cd ~ git clone https://gerrit.o-ran-sc.org/r/ric-plt/appmgr -b f-release cd ~/appmgr/xapp_orchestrater/dev/xapp_onboarder pip3 install ./ ``` ```cmd= ./Deploy_RIC-Platform_F-Relese.sh ``` ::: - [My Deploy LOG](https://mailntustedutw-my.sharepoint.com/:t:/g/personal/b10902214_ms_ntust_edu_tw/EeVVD0ZpSDZKmMVYCz8YE34Bc9yhxRpKP4EMHoXfFlalIQ?e=OQoOSI) :::success - **Platform successfully installed** ![](https://i.imgur.com/uyfgs41.png) ::: # Additional 1: debug tool (Log) This will be the real-time monitoring screen, you need to press **Ctrl + C or Ctrl + Z** - Log ```cmd= kubectl logs -f -n <namespace> <pod name> ``` - Describe pod ```cmd= kubectl describe pod -n <namespace> <pod name> ``` - Get all namespace & pod name ```cmd= kubectl get pod -A ``` ![](https://i.imgur.com/OVRVv0Q.jpg) ---- <!-- >**Name**: `名稱` -->