A 24min video on how to deploy the near-RT RIC, connect an E2 node (gNB simulator) to it and how to deploy an xApp using the DMS CLI: ric_demo_2021_11_05_720p_part1.mp4 and ric_demo_2021_11_05_720p_part2.mp4 . Repeating the steps in the video you can reproduce similar results in your own setup.
A shorter (8min) version of the video above that just show how things generally work: SHORT_ric_demo_2021_11_05_720p.mp4
14 Comments
Mohammad Sadegh Ghasrizadeh
Hello,
I'm trying to implement these videos step by step, but I couldn't pull and run image for gNB simulator.
Is there any way to access this image?
Any help would be appreciated.
Thoralf Czichy
there's a short demo on deploying the F release today (2022-05-24). You might want to attend.
Both demos (F and Dawn) use a non-public simulator. There's a public simulator in the repo sim/e2-interface. Subhash & co recently updated the simulator to use E2APv2.0 and provided instructions here:
[1] https://wiki.o-ran-sc.org/display/SIM/E2+Simulator#E2Simulator-Buildingdockerimageandrunningsimulatorinstance
[2] https://gerrit.o-ran-sc.org/r/c/sim/e2-interface/+/8344/1/e2sim/README.md#100
Thoralf Czichy
Also ric-dep has recently been updated and deploying a F-release RIC should be as easy as:
Note that the yaml in stage 6 to be used for the F release will eventually become "example_recipe_oran_f_release.yaml", but for this to happen we first need to release the F release during June. Until then the "example_recipe...refs_to_staging.yaml" has references to the staging repo (https://nexus3.o-ran-sc.org/#browse/browse:docker.staging). The final one will only have references to the release repo (https://nexus3.o-ran-sc.org/#browse/browse:docker.release).
I haven't tried, but my best guess is that the above 6 steps also work for the D release and E release, Obviously using the recipe...yaml files for these releases.
Mohammad Sadegh Ghasrizadeh
Thoralf Czichy Thank you very much..Finally, I connected a gnb to ricplt by deploying E2 Simulator as you mentioned in your previous response.
When I tried "curl -s -X GET http://e2mgr_serviceIP:3800/v1/nodeb/states |jq ." it returned gnb in the "CONNECTED" state.
But unfortunately, after about 30 seconds, it was changed to a "DISCONNECTED" state.
Also, when I restart the pod of E2sim, again it returns to the "CONNECTED" state, but after 30 seconds it goes to "DISCONNECTED" state.
I don't know why this happens and how to prevent it from going to "DISCONNECTED" state.
These images are parts of e2mgr logs:
you can see from the first image that gnb is connected successfully:
and from the below image you can see gnb is disconnected automatically:
Thank you very much.
Thoralf Czichy
What's happening right before the disconnect in the logs of E2Term? You might also look at the pcap of the messages exchanged between E2Term and the simulator.
It could be related to the simulator started using multi-homing (many IP addresses). You could double-check that by looking at the PCAP of the SCTP Init (if it includes multiple IP addresses, this is what might cause the issue).
Mohammad Sadegh Ghasrizadeh
Thoralf Czichy I apologize for taking so long to respond. You can see captured packets in the below image (taken from wireshark environment and pod IP is found from "kubectl get pods -A -o wide" command and service IP is found from "kubectl get svc -A | grep sctp") :
In the above image:
- New E2Sim pod IP = IP of E2Sim pod after restarting the E2Sim pod
- Previous E2Sim pod IP = IP of E2Sim pod before restarting the E2Sim pod
For E2term Logs, nothing is changed. It contains just rmr messages and I couldn't find any change after restarting the E2Sim pod. I have attached the logs of E2Term to this message.
The installation is on ubuntu server 18.04 LTS;
The Dawn Release is installed;
The used E2Sim repo is: https://github.com/o-ran-sc/sim-e2-interface.git
Thank you very much.
Thoralf Czichy
the PCAP looks pretty straightforward. The old E2SIM (10.244.0.216) sending SCTP shutdown shouldn't really disturb the new connection. The new connection (10.244.0.217) seems to succeed and heartbeats seem to be correctly handled. So overall I don't see anything weird in the PCAP.
I am not sure what the D release behavior is when there's a E2 node connecting that has the same name as the an existing E2 node (accept the new one (and disconnect the old one), or keep only the old one). The PCAP might suggest that this is what you run into.
Is the behavior that you see only reproducible with two E2sim instances? You might also try to see if and how this works in the latest F release.
Mohammad Sadegh Ghasrizadeh
Thank you very much. The problem was solved by switching to the F release. I also followed the instructions that you have shown on the demo video for the F release (this link) to install E2Sim. Now I guess there is no problem in connecting gnb to the ric platform.
Mohammed Hameed
Hi Guys,
I am trying to implement the steps one after other for the begining.
We I try to install k8s and helm from the below command as per the Installation Guide said
The below messages appear , appreciate your help
*********************************************************************************************************
+ KUBEV=1.16.0
+ KUBECNIV=0.7.5
+ HELMV=3.5.4
+ DOCKERV=20.10.12
+ echo running ./install_k8s_and_helm.sh
running ./install_k8s_and_helm.sh
+ getopts :k:d:e:n:c o
+ [[ 3.5.4 == 2.* ]]
+ set -x
+ export DEBIAN_FRONTEND=noninteractive
+ DEBIAN_FRONTEND=noninteractive
++ hostname -I
++ hostname
+ echo '172.25.94.104 DESKTOP-B3OO8UU'
+ printenv
SHELL=/bin/bash
WSL_DISTRO_NAME=Ubuntu
NAME=DESKTOP-B3OO8UU
PWD=/home/mohammed/ric-dep/bin
LOGNAME=mohammed
HOME=/home/mohammed
LANG=C.UTF-8
WSL_INTEROP=/run/WSL/4387_interop
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
LESSCLOSE=/usr/bin/lesspipe %s %s
TERM=xterm-256color
LESSOPEN=| /usr/bin/lesspipe %s
USER=mohammed
SHLVL=2
WSLENV=
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Program Files/dotnet/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/MATLAB/R2022a/runtime/win64:/mnt/c/Program Files/MATLAB/R2022a/bin:/mnt/c/Program Files (x86)/Pulse Secure/VC142.CRT/X64/:/mnt/c/Program Files (x86)/Pulse Secure/VC142.CRT/X86/:/mnt/c/Program Files (x86)/Common Files/Pulse Secure/TNC Client Plugin/:/mnt/c/Users/PC/Downloads/helm-v3.9.2-windows-amd64/windows-amd64:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Users/PC/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/PC/AppData/Local/Programs/MiKTeX/miktex/bin/x64/:/mnt/c/Program Files/Multipass/bin:/mnt/c/Program Files/MicroK8s:/snap/bin
HOSTTYPE=x86_64
DEBIAN_FRONTEND=noninteractive
OLDPWD=/home/mohammed
_=/usr/bin/printenv
+ IPV6IF=
+ rm -rf /opt/config
+ mkdir -p /opt/config
mkdir: cannot create directory ‘/opt/config’: Permission denied
+ echo ''
./install_k8s_and_helm.sh: line 104: /opt/config/docker_version.txt: No such file or directory
+ echo 1.16.0
./install_k8s_and_helm.sh: line 105: /opt/config/k8s_version.txt: No such file or directory
+ echo 0.7.5
./install_k8s_and_helm.sh: line 106: /opt/config/k8s_cni_version.txt: No such file or directory
+ echo 3.5.4
./install_k8s_and_helm.sh: line 107: /opt/config/helm_version.txt: No such file or directory
++ hostname -I
+ echo '172.25.94.104 '
./install_k8s_and_helm.sh: line 108: /opt/config/host_private_ip_addr.txt: No such file or directory
++ curl ifconfig.co
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14 100 14 0 0 159 0 --:--:-- --:--:-- --:--:-- 159
+ echo 194.80.232.17
./install_k8s_and_helm.sh: line 109: /opt/config/k8s_mst_floating_ip_addr.txt: No such file or directory
++ hostname -I
+ echo '172.25.94.104 '
./install_k8s_and_helm.sh: line 110: /opt/config/k8s_mst_private_ip_addr.txt: No such file or directory
+ echo __mtu__
./install_k8s_and_helm.sh: line 111: /opt/config/mtu.txt: No such file or directory
+ echo __cinder_volume_id__
./install_k8s_and_helm.sh: line 112: /opt/config/cinder_volume_id.txt: No such file or directory
++ hostname
+ echo DESKTOP-B3OO8UU
./install_k8s_and_helm.sh: line 113: /opt/config/stack_name.txt: No such file or directory
+ ISAUX=false
++ cat /opt/config/stack_name.txt
cat: /opt/config/stack_name.txt: No such file or directory
+ [[ '' == *aux* ]]
+ modprobe -- ip_vs
modprobe: FATAL: Module ip_vs not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- ip_vs_rr
modprobe: FATAL: Module ip_vs_rr not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- ip_vs_wrr
modprobe: FATAL: Module ip_vs_wrr not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- ip_vs_sh
modprobe: FATAL: Module ip_vs_sh not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- nf_conntrack_ipv4
modprobe: FATAL: Module nf_conntrack_ipv4 not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- nf_conntrack_ipv6
modprobe: FATAL: Module nf_conntrack_ipv6 not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- nf_conntrack_proto_sctp
modprobe: FATAL: Module nf_conntrack_proto_sctp not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ '[' '!' -z '' ']'
++ grep swap /etc/fstab
++ sed '/^[ \t]*#/ d'
++ sed 's/[\t ]/ /g'
++ tr -s ' '
++ cut -f1 '-d '
+ SWAPFILES=
+ '[' '!' -z ']'
+ echo '### Docker version = 20.10.12'
### Docker version = 20.10.12
+ echo '### k8s version = 1.16.0'
### k8s version = 1.16.0
+ echo '### helm version = 3.5.4'
### helm version = 3.5.4
+ echo '### k8s cni version = 0.7.5'
### k8s cni version = 0.7.5
+ KUBEVERSION=1.16.0-00
+ CNIVERSION=0.7.5-00
+ DOCKERVERSION=20.10.12
++ lsb_release -r
++ sed 's/^[a-zA-Z:\t ]\+//g'
+ UBUNTU_RELEASE=20.04
+ [[ 20.04 == 16.* ]]
+ [[ 20.04 == 18.* ]]
+ [[ 20.04 == 20.* ]]
+ echo 'Installing on Ubuntu 20.04 (Focal Fossal)'
Installing on Ubuntu 20.04 (Focal Fossal)
+ '[' '!' -z 20.10.12 ']'
+ DOCKERVERSION=20.10.12-0ubuntu2~20.04.1
+ echo 'docker version to use = 20.10.12-0ubuntu2~20.04.1'
docker version to use = 20.10.12-0ubuntu2~20.04.1
+ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg
+ apt-key add -
E: This command can only be used by root.
(23) Failed writing body
+ echo 'deb http://apt.kubernetes.io/ kubernetes-xenial main'
./install_k8s_and_helm.sh: line 182: /etc/apt/sources.list.d/kubernetes.list: Permission denied
+ mkdir -p /etc/apt/apt.conf.d
+ echo 'APT::Acquire::Retries "3";'
./install_k8s_and_helm.sh: line 185: /etc/apt/apt.conf.d/80-retries: Permission denied
+ apt-get update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
++ apt-get install -y curl jq netcat make ipset moreutils
+ RES='E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?'
+ [[ E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? == */var/lib/dpkg/lock* ]]
+ echo 'Fail to get dpkg lock. Wait for any other package installation'
Fail to get dpkg lock. Wait for any other package installation
+ echo 'process to finish, then rerun this script'
process to finish, then rerun this script
+ exit -1
***********************************************************************************************************
Thoralf Czichy
I would recommend to use the F release (E2AP2.0). The problem you see is most probably cause by running the scripts under a non-root account. Try running them from the root account
Mohammed Hameed
Thanks Thoralf Czichy ,
It works partially , after changing to root account I tried to use the same command "./install_k8s_and_helm.sh" some installations done and other not yet ,
could you help me with the below please ? and sorry to copy all the screen but to make everything clear
*************************************************************************************************************
root@DESKTOP-B3OO8UU:~/ric-dep/bin# ./install_k8s_and_helm.sh
+ KUBEV=1.16.0
+ KUBECNIV=0.7.5
+ HELMV=3.5.4
+ DOCKERV=20.10.12
+ echo running ./install_k8s_and_helm.sh
running ./install_k8s_and_helm.sh
+ getopts :k:d:e:n:c o
+ [[ 3.5.4 == 2.* ]]
+ set -x
+ export DEBIAN_FRONTEND=noninteractive
+ DEBIAN_FRONTEND=noninteractive
++ hostname -I
++ hostname
+ echo '172.25.81.248 DESKTOP-B3OO8UU'
+ printenv
SHELL=/bin/bash
SUDO_GID=1000
SUDO_COMMAND=/bin/bash
SUDO_USER=mohammed
PWD=/root/ric-dep/bin
LOGNAME=root
MOTD_SHOWN=update-motd
HOME=/root
LANG=C.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
LESSCLOSE=/usr/bin/lesspipe %s %s
TERM=xterm-256color
LESSOPEN=| /usr/bin/lesspipe %s
USER=root
SHLVL=2
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
SUDO_UID=1000
MAIL=/var/mail/root
DEBIAN_FRONTEND=noninteractive
OLDPWD=/root
_=/usr/bin/printenv
+ IPV6IF=
+ rm -rf /opt/config
+ mkdir -p /opt/config
+ echo ''
+ echo 1.16.0
+ echo 0.7.5
+ echo 3.5.4
++ hostname -I
+ echo '172.25.81.248 '
++ curl ifconfig.co
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14 100 14 0 0 205 0 --:--:-- --:--:-- --:--:-- 205
+ echo 194.80.232.17
++ hostname -I
+ echo '172.25.81.248 '
+ echo __mtu__
+ echo __cinder_volume_id__
++ hostname
+ echo DESKTOP-B3OO8UU
+ ISAUX=false
++ cat /opt/config/stack_name.txt
+ [[ DESKTOP-B3OO8UU == *aux* ]]
+ modprobe -- ip_vs
modprobe: FATAL: Module ip_vs not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- ip_vs_rr
modprobe: FATAL: Module ip_vs_rr not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- ip_vs_wrr
modprobe: FATAL: Module ip_vs_wrr not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- ip_vs_sh
modprobe: FATAL: Module ip_vs_sh not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- nf_conntrack_ipv4
modprobe: FATAL: Module nf_conntrack_ipv4 not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- nf_conntrack_ipv6
modprobe: FATAL: Module nf_conntrack_ipv6 not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ modprobe -- nf_conntrack_proto_sctp
modprobe: FATAL: Module nf_conntrack_proto_sctp not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
+ '[' '!' -z '' ']'
++ grep swap /etc/fstab
++ sed '/^[ \t]*#/ d'
++ sed 's/[\t ]/ /g'
++ tr -s ' '
++ cut -f1 '-d '
+ SWAPFILES=
+ '[' '!' -z ']'
+ echo '### Docker version = 20.10.12'
### Docker version = 20.10.12
+ echo '### k8s version = 1.16.0'
### k8s version = 1.16.0
+ echo '### helm version = 3.5.4'
### helm version = 3.5.4
+ echo '### k8s cni version = 0.7.5'
### k8s cni version = 0.7.5
+ KUBEVERSION=1.16.0-00
+ CNIVERSION=0.7.5-00
+ DOCKERVERSION=20.10.12
++ lsb_release -r
++ sed 's/^[a-zA-Z:\t ]\+//g'
+ UBUNTU_RELEASE=20.04
+ [[ 20.04 == 16.* ]]
+ [[ 20.04 == 18.* ]]
+ [[ 20.04 == 20.* ]]
+ echo 'Installing on Ubuntu 20.04 (Focal Fossal)'
Installing on Ubuntu 20.04 (Focal Fossal)
+ '[' '!' -z 20.10.12 ']'
+ DOCKERVERSION=20.10.12-0ubuntu2~20.04.1
+ echo 'docker version to use = 20.10.12-0ubuntu2~20.04.1'
docker version to use = 20.10.12-0ubuntu2~20.04.1
+ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg
+ apt-key add -
OK
+ echo 'deb http://apt.kubernetes.io/ kubernetes-xenial main'
+ mkdir -p /etc/apt/apt.conf.d
+ echo 'APT::Acquire::Retries "3";'
+ apt-get update
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:1 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
Reading package lists... Done
++ apt-get install -y curl jq netcat make ipset moreutils
+ RES='Reading package lists...
Building dependency tree...
Reading state information...
make is already the newest version (4.2.1-1.2).
moreutils is already the newest version (0.63-1).
netcat is already the newest version (1.206-1ubuntu1).
curl is already the newest version (7.68.0-1ubuntu2.12).
ipset is already the newest version (7.5-1ubuntu0.20.04.1).
jq is already the newest version (1.6-1ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 113 not upgraded.'
+ [[ Reading package lists...
Building dependency tree...
Reading state information...
make is already the newest version (4.2.1-1.2).
moreutils is already the newest version (0.63-1).
netcat is already the newest version (1.206-1ubuntu1).
curl is already the newest version (7.68.0-1ubuntu2.12).
ipset is already the newest version (7.5-1ubuntu0.20.04.1).
jq is already the newest version (1.6-1ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 113 not upgraded. == */var/lib/dpkg/lock* ]]
+ APTOPTS='--allow-downgrades --allow-change-held-packages --allow-unauthenticated --ignore-hold '
+ for PKG in kubeadm docker.io
++ dpkg --list
++ grep kubeadm
++ tr -s ' '
++ cut -f3 -d ' '
+ INSTALLED_VERSION=1.16.0-00
+ '[' '!' -z 1.16.0-00 ']'
+ '[' kubeadm == kubeadm ']'
+ kubeadm reset -f
[preflight] Running pre-flight checks
W0803 12:43:15.979699 6396 removeetcdmember.go:79] [reset] No kubeadm config, using etcd pod spec to get data directory
[reset] No etcd config found. Assuming external etcd
[reset] Please, manually reset etcd to prevent further issues
[reset] Stopping the kubelet service
W0803 12:43:15.983995 6396 cleanupnode.go:65] [reset] The kubelet service could not be stopped by kubeadm: [exit status 1]
W0803 12:43:15.984035 6396 cleanupnode.go:66] [reset] Please ensure kubelet is stopped manually
[reset] Unmounting mounted directories in "/var/lib/kubelet"
W0803 12:43:15.984086 6396 cleanupnode.go:99] [reset] Failed to evaluate the "/var/lib/kubelet" directory. Skipping its unmount and cleanup: lstat /var/lib/kubelet: no such file or directory
W0803 12:43:16.022640 6396 cleanupnode.go:81] [reset] Failed to remove containers: exit status 1
[reset] Deleting contents of config directories: [/etc/kubernetes/manifests /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]
[reset] Deleting contents of stateful directories: [/etc/cni/net.d /var/lib/dockershim /var/run/kubernetes /var/lib/cni]
The reset process does not reset or clean up iptables rules or IPVS tables.
If you wish to reset iptables, you must do so manually by using the "iptables" command.
If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
to reset your system's IPVS tables.
The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
+ rm -rf /root/.kube
+ apt-get -y --allow-downgrades --allow-change-held-packages --allow-unauthenticated --ignore-hold remove kubeadm kubelet kubectl kubernetes-cni
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
conntrack cri-tools ebtables socat
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
kubeadm kubectl kubelet kubernetes-cni
The following held packages will be changed:
kubeadm kubectl kubelet kubernetes-cni
0 upgraded, 0 newly installed, 4 to remove and 109 not upgraded.
After this operation, 264 MB disk space will be freed.
(Reading database ... 33129 files and directories currently installed.)
Removing kubeadm (1.16.0-00) ...
Removing kubectl (1.16.0-00) ...
Removing kubelet (1.16.0-00) ...
Removing kubernetes-cni (0.7.5-00) ...
dpkg: warning: while removing kubernetes-cni, directory '/opt' not empty so not removed
+ for PKG in kubeadm docker.io
++ dpkg --list
++ grep docker.io
++ tr -s ' '
++ cut -f3 -d ' '
+ INSTALLED_VERSION=20.10.12-0ubuntu2~20.04.1
+ '[' '!' -z 20.10.12-0ubuntu2~20.04.1 ']'
+ '[' docker.io == kubeadm ']'
+ apt-get -y --allow-downgrades --allow-change-held-packages --allow-unauthenticated --ignore-hold remove docker.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
bridge-utils conntrack containerd cri-tools dns-root-data dnsmasq-base ebtables libidn11 pigz runc socat ubuntu-fan
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
docker.io
The following held packages will be changed:
docker.io
0 upgraded, 0 newly installed, 1 to remove and 109 not upgraded.
After this operation, 163 MB disk space will be freed.
(Reading database ... 33109 files and directories currently installed.)
Removing docker.io (20.10.12-0ubuntu2~20.04.1) ...
invoke-rc.d: unknown initscript, /etc/init.d/docker not found.
invoke-rc.d: could not determine current runlevel
Processing triggers for man-db (2.9.1-1) ...
+ apt-get -y autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
bridge-utils conntrack containerd cri-tools dns-root-data dnsmasq-base ebtables libidn11 pigz runc socat ubuntu-fan
0 upgraded, 0 newly installed, 12 to remove and 109 not upgraded.
After this operation, 206 MB disk space will be freed.
(Reading database ... 32903 files and directories currently installed.)
Removing ubuntu-fan (0.12.13ubuntu0.1) ...
invoke-rc.d: could not determine current runlevel
$Stopping Ubuntu FAN network bridge: OK
ubuntu-fan: removing default /etc/network/fan configuration
Removing bridge-utils (1.6-2ubuntu1) ...
Removing conntrack (1:1.4.5-2) ...
Removing containerd (1.5.9-0ubuntu1~20.04.4) ...
Removing cri-tools (1.24.2-00) ...
Removing dns-root-data (2019052802) ...
Removing dnsmasq-base (2.80-1.1ubuntu1.5) ...
Removing ebtables (2.0.11-3build1) ...
Removing libidn11:amd64 (1.33-2.2ubuntu2) ...
Removing pigz (2.4-1) ...
Removing runc (1.1.0-0ubuntu1~20.04.1) ...
Removing socat (1.7.3.3-2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link
+ '[' -z 20.10.12-0ubuntu2~20.04.1 ']'
+ apt-get install -y --allow-downgrades --allow-change-held-packages --allow-unauthenticated --ignore-hold docker.io=20.10.12-0ubuntu2~20.04.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
bridge-utils containerd dns-root-data dnsmasq-base libidn11 pigz runc ubuntu-fan
Suggested packages:
ifupdown aufs-tools cgroupfs-mount | cgroup-lite debootstrap docker-doc rinse zfs-fuse | zfsutils
The following NEW packages will be installed:
bridge-utils containerd dns-root-data dnsmasq-base docker.io libidn11 pigz runc ubuntu-fan
0 upgraded, 9 newly installed, 0 to remove and 109 not upgraded.
Need to get 0 B/69.2 MB of archives.
After this operation, 334 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package pigz.
(Reading database ... 32701 files and directories currently installed.)
Preparing to unpack .../0-pigz_2.4-1_amd64.deb ...
Unpacking pigz (2.4-1) ...
Selecting previously unselected package bridge-utils.
Preparing to unpack .../1-bridge-utils_1.6-2ubuntu1_amd64.deb ...
Unpacking bridge-utils (1.6-2ubuntu1) ...
Selecting previously unselected package runc.
Preparing to unpack .../2-runc_1.1.0-0ubuntu1~20.04.1_amd64.deb ...
Unpacking runc (1.1.0-0ubuntu1~20.04.1) ...
Selecting previously unselected package containerd.
Preparing to unpack .../3-containerd_1.5.9-0ubuntu1~20.04.4_amd64.deb ...
Unpacking containerd (1.5.9-0ubuntu1~20.04.4) ...
Selecting previously unselected package dns-root-data.
Preparing to unpack .../4-dns-root-data_2019052802_all.deb ...
Unpacking dns-root-data (2019052802) ...
Selecting previously unselected package libidn11:amd64.
Preparing to unpack .../5-libidn11_1.33-2.2ubuntu2_amd64.deb ...
Unpacking libidn11:amd64 (1.33-2.2ubuntu2) ...
Selecting previously unselected package dnsmasq-base.
Preparing to unpack .../6-dnsmasq-base_2.80-1.1ubuntu1.5_amd64.deb ...
Unpacking dnsmasq-base (2.80-1.1ubuntu1.5) ...
Selecting previously unselected package docker.io.
Preparing to unpack .../7-docker.io_20.10.12-0ubuntu2~20.04.1_amd64.deb ...
Unpacking docker.io (20.10.12-0ubuntu2~20.04.1) ...
Selecting previously unselected package ubuntu-fan.
Preparing to unpack .../8-ubuntu-fan_0.12.13ubuntu0.1_all.deb ...
Unpacking ubuntu-fan (0.12.13ubuntu0.1) ...
Setting up runc (1.1.0-0ubuntu1~20.04.1) ...
Setting up dns-root-data (2019052802) ...
Setting up libidn11:amd64 (1.33-2.2ubuntu2) ...
Setting up bridge-utils (1.6-2ubuntu1) ...
Setting up pigz (2.4-1) ...
Setting up containerd (1.5.9-0ubuntu1~20.04.4) ...
Setting up docker.io (20.10.12-0ubuntu2~20.04.1) ...
invoke-rc.d: unknown initscript, /etc/init.d/docker not found.
invoke-rc.d: could not determine current runlevel
Setting up dnsmasq-base (2.80-1.1ubuntu1.5) ...
Setting up ubuntu-fan (0.12.13ubuntu0.1) ...
invoke-rc.d: could not determine current runlevel
Processing triggers for systemd (245.4-4ubuntu3.15) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link
+ cat
+ mkdir -p /etc/systemd/system/docker.service.d
+ systemctl enable docker.service
+ systemctl daemon-reload
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
+ systemctl restart docker
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
+ '[' -z 0.7.5-00 ']'
+ apt-get install -y --allow-downgrades --allow-change-held-packages --allow-unauthenticated --ignore-hold kubernetes-cni=0.7.5-00
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
kubernetes-cni
0 upgraded, 1 newly installed, 0 to remove and 109 not upgraded.
Need to get 0 B/6473 kB of archives.
After this operation, 50.2 MB of additional disk space will be used.
Selecting previously unselected package kubernetes-cni.
(Reading database ... 33041 files and directories currently installed.)
Preparing to unpack .../kubernetes-cni_0.7.5-00_amd64.deb ...
Unpacking kubernetes-cni (0.7.5-00) ...
Setting up kubernetes-cni (0.7.5-00) ...
+ '[' -z 1.16.0-00 ']'
+ apt-get install -y --allow-downgrades --allow-change-held-packages --allow-unauthenticated --ignore-hold kubeadm=1.16.0-00 kubelet=1.16.0-00 kubectl=1.16.0-00
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
conntrack cri-tools ebtables socat
Suggested packages:
nftables
The following NEW packages will be installed:
conntrack cri-tools ebtables kubeadm kubectl kubelet socat
0 upgraded, 7 newly installed, 0 to remove and 110 not upgraded.
Need to get 0 B/51.4 MB of archives.
After this operation, 249 MB of additional disk space will be used.
Selecting previously unselected package conntrack.
(Reading database ... 33057 files and directories currently installed.)
Preparing to unpack .../0-conntrack_1%3a1.4.5-2_amd64.deb ...
Unpacking conntrack (1:1.4.5-2) ...
Selecting previously unselected package cri-tools.
Preparing to unpack .../1-cri-tools_1.24.2-00_amd64.deb ...
Unpacking cri-tools (1.24.2-00) ...
Selecting previously unselected package ebtables.
Preparing to unpack .../2-ebtables_2.0.11-3build1_amd64.deb ...
Unpacking ebtables (2.0.11-3build1) ...
Selecting previously unselected package socat.
Preparing to unpack .../3-socat_1.7.3.3-2_amd64.deb ...
Unpacking socat (1.7.3.3-2) ...
Selecting previously unselected package kubelet.
Preparing to unpack .../4-kubelet_1.16.0-00_amd64.deb ...
Unpacking kubelet (1.16.0-00) ...
Selecting previously unselected package kubectl.
Preparing to unpack .../5-kubectl_1.16.0-00_amd64.deb ...
Unpacking kubectl (1.16.0-00) ...
Selecting previously unselected package kubeadm.
Preparing to unpack .../6-kubeadm_1.16.0-00_amd64.deb ...
Unpacking kubeadm (1.16.0-00) ...
Setting up conntrack (1:1.4.5-2) ...
Setting up kubectl (1.16.0-00) ...
Setting up ebtables (2.0.11-3build1) ...
Setting up socat (1.7.3.3-2) ...
Setting up cri-tools (1.24.2-00) ...
Setting up kubelet (1.16.0-00) ...
Setting up kubeadm (1.16.0-00) ...
Processing triggers for man-db (2.9.1-1) ...
+ apt-mark hold docker.io kubernetes-cni kubelet kubeadm kubectl
docker.io set on hold.
kubernetes-cni set on hold.
kubelet set on hold.
kubeadm set on hold.
kubectl set on hold.
+ kubeadm config images pull --kubernetes-version=1.16.0
failed to pull image "k8s.gcr.io/kube-apiserver:v1.16.0": output: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
, error: exit status 1
To see the stack trace of this error execute with --v=5 or higher
+ NODETYPE=master
+ '[' master == master ']'
+ [[ 1.16.0 == 1.13.* ]]
+ [[ 1.16.0 == 1.14.* ]]
+ [[ 1.16.0 == 1.15.* ]]
+ [[ 1.16.0 == 1.16.* ]]
+ cat
+ cat
+ kubeadm init --config /root/config.yaml
[init] Using Kubernetes version: v1.16.0
[preflight] Running pre-flight checks
[preflight] The system verification failed. Printing the output from the verification:
KERNEL_VERSION: 5.10.16.3-microsoft-standard-WSL2
CONFIG_NAMESPACES: enabled
CONFIG_NET_NS: enabled
CONFIG_PID_NS: enabled
CONFIG_IPC_NS: enabled
CONFIG_UTS_NS: enabled
CONFIG_CGROUPS: enabled
CONFIG_CGROUP_CPUACCT: enabled
CONFIG_CGROUP_DEVICE: enabled
CONFIG_CGROUP_FREEZER: enabled
CONFIG_CGROUP_SCHED: enabled
CONFIG_CPUSETS: enabled
CONFIG_MEMCG: enabled
CONFIG_INET: enabled
CONFIG_EXT4_FS: enabled
CONFIG_PROC_FS: enabled
CONFIG_NETFILTER_XT_TARGET_REDIRECT: enabled
CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled
CONFIG_OVERLAY_FS: enabled
CONFIG_AUFS_FS: not set - Required for aufs.
CONFIG_BLK_DEV_DM: enabled
DOCKER_VERSION:
OS: Linux
CGROUPS_CPU: enabled
CGROUPS_CPUACCT: enabled
CGROUPS_CPUSET: enabled
CGROUPS_DEVICES: enabled
CGROUPS_FREEZER: enabled
CGROUPS_MEMORY: enabled
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR Port-6443]: Port 6443 is in use
[ERROR CRI]: container runtime is not running: output: Client:
Context: default
Debug Mode: false
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
, error: exit status 1
[ERROR Service-Docker]: docker service is not active, please run 'systemctl start docker.service'
[ERROR IsDockerSystemdCheck]: cannot execute 'docker info': exit status 2
[ERROR Swap]: running with swap on is not supported. Please disable swap
[ERROR SystemVerification]: unsupported docker version:
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
+ cd /root
+ rm -rf .kube
+ mkdir -p .kube
+ cp -i /etc/kubernetes/admin.conf /root/.kube/config
cp: cannot stat '/etc/kubernetes/admin.conf': No such file or directory
+ chown root:root /root/.kube/config
chown: cannot access '/root/.kube/config': No such file or directory
+ export KUBECONFIG=/root/.kube/config
+ KUBECONFIG=/root/.kube/config
+ echo KUBECONFIG=/root/.kube/config
+ kubectl get pods --all-namespaces
W0803 12:43:52.041967 7897 loader.go:223] Config not found: /root/.kube/config
The connection to the server localhost:8080 was refused - did you specify the right host or port?
+ kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
W0803 12:43:52.090174 7908 loader.go:223] Config not found: /root/.kube/config
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
+ wait_for_pods_running 8 kube-system
+ NS=kube-system
+ CMD='kubectl get pods --all-namespaces '
+ '[' kube-system '!=' all-namespaces ']'
+ CMD='kubectl get pods -n kube-system '
+ KEYWORD=Running
+ '[' 2 == 3 ']'
+ CMD2='kubectl get pods -n kube-system | grep "Running" | wc -l'
++ eval 'kubectl get pods -n kube-system | grep "Running" | wc -l'
+++ kubectl get pods -n kube-system
+++ grep Running
+++ wc -l
W0803 12:43:52.371061 7923 loader.go:223] Config not found: /root/.kube/config
The connection to the server localhost:8080 was refused - did you specify the right host or port?
+ NUMPODS=0
+ echo 'waiting for 0/8 pods running in namespace [kube-system] with keyword [Running]'
waiting for 0/8 pods running in namespace [kube-system] with keyword [Running]
+ '[' 0 -lt 8 ']'
+ sleep 5
Mohammed Hameed
Can I use any other commands instead of this command to install the K8s and helm ?
Thoralf Czichy
Thoralf Czichy
> modprobe: FATAL: Module ip_vs not found in directory /lib/modules/5.10.16.3-microsoft-standard-WSL2
>...
> System has not been booted with systemd as init system (PID 1). Can't operate.
This looks like another base image than "Ubuntu 20.04 (no k8s, no docker, no helm"). You might be able to do the equivalent steps one by one, but maybe it's easier to start with a more canonical Ubuntu installation or VM instead..
unable to recognize "https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
This line suggest there's no direct Internet access, i.e., you might have to set up proxies correctly.
Mohammed Hameed
Mohammad Sadegh Ghasrizadeh