diff --git a/Makefile b/Makefile index d06cc3c..bf89e2d 100644 --- a/Makefile +++ b/Makefile @@ -62,4 +62,7 @@ install: --snapshot \ --skip=validate \ --output /tmp/hcloud-k8s-ctl - sudo mv /tmp/hcloud-k8s-ctl /usr/local/bin/hcloud-k8s-ctl \ No newline at end of file + sudo mv /tmp/hcloud-k8s-ctl /usr/local/bin/hcloud-k8s-ctl + +ubuntu-versions: + docker run -v `pwd`:/app -it ubuntu:20.04 /app/scripts/ubuntu-versions.sh \ No newline at end of file diff --git a/scripts/common-install.sh b/scripts/common-install.sh index 54dd456..661e206 100755 --- a/scripts/common-install.sh +++ b/scripts/common-install.sh @@ -22,7 +22,7 @@ export PAUSE_CONTAINER="{{ .Values.serverComponents.containerd.pausecontainer }} # https://containerd.io/releases/#kubernetes-support # to select all available versions, run -# apt-cache madison docker-ce containerd.io kubelet +# make make ubuntu-versions export DEBIAN_FRONTEND=noninteractive export HOME=/root/ diff --git a/scripts/ubuntu-versions.sh b/scripts/ubuntu-versions.sh new file mode 100755 index 0000000..a0aaf8b --- /dev/null +++ b/scripts/ubuntu-versions.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# Copyright paskal.maksim@gmail.com +# +# Licensed under the Apache License, Version 2.0 (the "License") +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -ex +export DEBIAN_FRONTEND=noninteractive + +apt update +apt install -y apt-transport-https ca-certificates curl software-properties-common + +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg +curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/kubernetes-archive-keyring.gpg + +cat </etc/apt/sources.list.d/kubernetes.list +deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main +EOF +cat </etc/apt/sources.list.d/docker.list +deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable +EOF + +apt update +apt-cache madison docker-ce containerd.io kubelet \ No newline at end of file