From 2b97f15b88de44f51c13764b9f06961e91cbe53c Mon Sep 17 00:00:00 2001 From: sandervanvugt Date: Tue, 14 Mar 2023 13:25:42 +0100 Subject: [PATCH] message --- setup-container.sh | 9 +++++++-- setup-kubetools.sh | 32 +++----------------------------- 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/setup-container.sh b/setup-container.sh index a857394..81894ef 100755 --- a/setup-container.sh +++ b/setup-container.sh @@ -2,9 +2,14 @@ # script that runs # https://kubernetes.io/docs/setup/production-environment/container-runtime +# changes March 14 2023: introduced $PLATFORM to have this work on amd64 as well as arm64 + # setting MYOS variable MYOS=$(hostnamectl | awk '/Operating/ { print $3 }') OSVERSION=$(hostnamectl | awk '/Operating/ { print $4 }') +# beta: building in ARM support +[ $(arch) = aarch64 ] && PLATFORM=arm64 +[ $(arch) = x86_64 ] && PLATFORM=amd64 if [ $MYOS = "Ubuntu" ] then @@ -36,8 +41,8 @@ then sudo systemctl stop containerd # cleanup old files from previous attempt if existing [ -d bin ] && rm -rf bin - wget https://github.com/containerd/containerd/releases/download/v1.6.15/containerd-1.6.15-linux-amd64.tar.gz - tar xvf containerd-1.6.15-linux-amd64.tar.gz + wget https://github.com/containerd/containerd/releases/download/v1.6.15/containerd-1.6.15-linux-${PLATFORM}.tar.gz + tar xvf containerd-1.6.15-linux-${PLATFORM}.tar.gz sudo mv bin/* /usr/bin/ # Configure containerd sudo mkdir -p /etc/containerd diff --git a/setup-kubetools.sh b/setup-kubetools.sh index ff41b56..854e291 100755 --- a/setup-kubetools.sh +++ b/setup-kubetools.sh @@ -2,7 +2,7 @@ # kubeadm installation instructions as on # https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ -# this script supports centos 7 and Ubuntu 20.04 only +# this script supports Ubuntu 20.04 LTS and later only # run this script with sudo if ! [ $USER = root ] @@ -15,34 +15,6 @@ fi MYOS=$(hostnamectl | awk '/Operating/ { print $3 }') OSVERSION=$(hostnamectl | awk '/Operating/ { print $4 }') -##### CentOS 7 config -if [ $MYOS = "CentOS" ] -then - echo RUNNING CENTOS CONFIG - cat <