11#! /usr/bin/env bash
22
3- apt-get update && apt-get install -y curl git
4-
3+ echo " [INFO] Start apt get install base packages"
4+
5+ apt-get update \
6+ && apt-get -y install curl git vim \
7+ && apt-get -y install zip unzip \
8+ && apt-get -y install ca-certificates curl wget apt-transport-https lsb-release gnupg \
9+ && apt-get -y install jq \
10+ && apt-get satisfy " python3-pip (<= 22.1)" -y
11+ # install jq from https://stedolan.github.io/jq/download/
12+
13+ #
14+ # Github Action runner
15+ #
16+ echo " [INFO] Install github action runner"
517mkdir -p actions-runner
6- cd actions-runner
18+ cd actions-runner || exit
19+
720# from https://github.com/actions/runner/releases
821GITHUB_RUNNER_VERSION=" 2.300.2"
922GITHUB_RUNNER_VERSION_SHA=" ed5bf2799c1ef7b2dd607df66e6b676dff8c44fb359c6fedc9ebf7db53339f0c"
@@ -14,13 +27,10 @@ rm actions-runner-linux-x64-${GITHUB_RUNNER_VERSION}.tar.gz
1427
1528bash bin/installdependencies.sh
1629
17- # install zip, unip
18-
19- apt-get -y install zip unzip
20-
21- # install az cli from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#option-2-step-by-step-installation-instructions
22-
23- apt-get -y install ca-certificates curl wget apt-transport-https lsb-release gnupg
30+ #
31+ # AZCLI
32+ #
33+ echo " [INFO] Install azcli"
2434
2535curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
2636AZ_REPO=$( lsb_release -cs)
@@ -30,36 +40,31 @@ apt-get update && apt-get -y install azure-cli
3040
3141az config set extension.use_dynamic_install=yes_without_prompt
3242
33- # install python-pip
34-
35- apt-get -y install python-pip
36-
43+ #
44+ # KUBERNETES DEPENDENCIES
45+ #
3746# install kubectl from https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#install-using-native-package-management
47+ echo " [INFO] Install kubernetes"
3848
3949curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
4050echo " deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
4151
42- apt-get update && apt-get -y install kubectl
43-
4452# install helm from https://helm.sh/docs/intro/install/#from-apt-debianubuntu
45-
4653curl https://baltocdn.com/helm/signing.asc | apt-key add -
4754echo " deb https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list
4855
49- apt-get update && apt-get -y install helm
50-
51- # install jq from https://stedolan.github.io/jq/download/
52-
53- apt-get update && apt-get -y install jq
56+ apt-get update \
57+ && apt-get satisfy " kubectl (<=1.26.1)" -y \
58+ && apt-get update && apt-get satisfy " helm (<=3.12.1)" -y
5459
5560# install yq from https://github.com/mikefarah/yq#install
56-
5761YQ_VERSION=" v4.30.6"
5862YQ_BINARY=" yq_linux_amd64"
5963wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION} /${YQ_BINARY} .tar.gz -O - | tar xz && mv ${YQ_BINARY} /usr/bin/yq
6064
61- # ##
62-
65+ #
66+ # USER CONFIGURATIONS
67+ #
6368useradd github
6469mkdir -p /home/github
6570chown -R github:github /home/github
0 commit comments