rancher / rke1-docs

1 stars 13 forks source link

Guidance for setting up RKE on arm64.. specifically on Raspberry Pi 4 nodes #7

Open wolfspyre opened 4 years ago

wolfspyre commented 4 years ago

Hi there!

First, Thank you for spending so much time and effort on your documentation. It really helps, and the love y'all put into the documentation shows.

I'd love to see a soup-to-nuts journey documented to getting a highly available rancher cluster and workload cluster up and running on a small herd of Raspberry Pis.

some of the things I encountered while trying this that I didn't see documented coherently anyplace:

root@rkepi-01:~# grep cmdline /boot/firmware/config.txt
cmdline=nobtcmd.txt

which points you to where you need to append the needful: cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1

root@rkepi-01:~# cat /boot/firmware/nobtcmd.txt
net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc

So simply append the needful to that line and reboot, and viola:

root@rkepi-01:~# cat /proc/cmdline
coherent_pool=1M 8250.nr_uarts=1 cma=64M bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DE:AD:BE:EF:00:00 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
root@rkepi-01:~#
export _newmp='srv';
for _basedir in '/var/lib/docker' '/var/lib/etcd' '/var/lib/containerd' '/var/lib/kubelet' '/var/lib/rancher' '/opt'; do
    _newtarget="/${_newmp}/${_basedir}"
    if  [[ -d ${_newtarget} ]]; then
        echo "${_newtarget} directory exists. Not creating."
    else
       echo " ${_newtarget} needs creating. doing the needful.";
       mkdir -p "${_newtarget}"; 
    fi
    if [[ ! -d ${_basedir} ]]; then
      echo "${_basedir} is not a directory, not copying content"; 
    else
       echo "========== relocating content in ${_basedir} to ${_newtarget}";
       echo;
       cd "${_basedir}"; tar cpf - . |( cd "${_newtarget}" && tar xpvf - )
       echo "moving ${_basedir} out of the way and symlinking"
       mv "${_basedir}"  "${_basedir}.relocated"
       ln -s "${_newtarget}" "${_basedir}"
       echo "${_basedir}.relocated">> /tmp/shuffledirs.scratch
    fi
done
echo "mount points shuffled. you'll want to remove the original directories listed below after rebooting"
cat /tmp/shuffledirs.scratch
rm /tmp/shuffledirs.scratch
btat commented 2 years ago

Moved to correct repo now.

wolfspyre commented 2 years ago

uhm….

hi… so….. does experimental mean something other than “work-in-progress, not for production use”?

does it not warrant guidance? or at least pointing out known pitfalls? if you’re not interested in contributing to the documentation on it, that’s one thing.

closing a request for documentation of current state because something is experimental is like saying

R&D doesn’t MAKE things, so they don’t need any resources….

btat commented 2 years ago

uhm….

hi… so….. does experimental mean something other than “work-in-progress, not for production use”?

does it not warrant guidance? or at least pointing out known pitfalls? if you’re not interested in contributing to the documentation on it, that’s one thing.

closing a request for documentation of current state because something is experimental is like saying

R&D doesn’t MAKE things, so they don’t need any resources….

Hi @wolfspyre, apologies I added the wrong comment to this one while transferring issues. It's reopened and moved to the correct repo now.

wolfspyre commented 2 years ago

Hi Billy! Thanks a ton!! Not trying to be a jerk or anything.... I just want to help others avoid unnecessary hairpulling and forehead banging, y'know? IMO ...The only thing worse than no documentation, is BAD documentation....

I hope your day's going wonderfully. ❤️🐺W