Skip to content

Commit

Permalink
chore(makefile): add ubuntu-versions (#89)
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Paskal <[email protected]>
  • Loading branch information
maksim-paskal authored Nov 21, 2023
1 parent 3e2552b commit 86191bc
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
2 changes: 1 addition & 1 deletion scripts/common-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
33 changes: 33 additions & 0 deletions scripts/ubuntu-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

# Copyright [email protected]
#
# 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 <<EOF >/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 <<EOF >/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

0 comments on commit 86191bc

Please sign in to comment.