Automation of a local dev environment to learn, self-document, save time and avoid to reinvent the wheel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
debian-unattended/custom/install_rke.sh

20 lines
590 B

#!/bin/sh
# Sources:
# https://www.rancher.cn/an-introduction-to-rke
# https://devopsheaven.com/kubernetes/k8s/rke/devops/deploy/2019/10/21/install-kubernetes-locally-rke.html
if [ "$(id -u)" -ne 0 ]; then
echo "This script should be run as root. Aborting..." > /dev/stderr
exit 1
fi
echo "Downloading and installing 'rke' executable..."
wget -O rke https://github.com/rancher/rke/releases/download/v1.2.3/rke_linux-amd64 && \
chmod +x rke && \
mv rke /usr/local/bin && \
rke --version
echo "Giving access to the docker socket at the SSH user..."
usermod -aG docker "$(id -un)"