diff --git a/images/linux/scripts/installers/1604/basic.sh b/images/linux/scripts/installers/1604/basic.sh index e579e1c01..ef6bac321 100644 --- a/images/linux/scripts/installers/1604/basic.sh +++ b/images/linux/scripts/installers/1604/basic.sh @@ -40,7 +40,7 @@ apt-fast install -y --no-install-recommends \ zip \ zstd -# Electron / VSCode / GitHub Desktop prereqs +# Electron / VSCode / GitHub Desktop / kubectl prereqs apt-fast install -y --no-install-recommends \ libxkbfile-dev \ pkg-config \ @@ -57,7 +57,8 @@ apt-fast install -y --no-install-recommends \ rpm \ xz-utils \ xorriso \ - zsync + zsync \ + gnupg2 # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" @@ -99,3 +100,4 @@ DocumentInstalledItemIndent "upx" DocumentInstalledItemIndent "wget" DocumentInstalledItemIndent "zip" DocumentInstalledItemIndent "zstd" +DocumentInstalledItemIndent "gnupg2" diff --git a/images/linux/scripts/installers/1604/kubernetes-tools.sh b/images/linux/scripts/installers/1604/kubernetes-tools.sh deleted file mode 100644 index 4855dc716..000000000 --- a/images/linux/scripts/installers/1604/kubernetes-tools.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -################################################################################ -## File: kubernetes-tools.sh -## Desc: Installs kubectl, helm -################################################################################ - -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh -source $HELPER_SCRIPTS/apt.sh - -## Install kubectl -apt-get install -y apt-transport-https -curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - -touch /etc/apt/sources.list.d/kubernetes.list -echo "deb http://apt.kubernetes.io/ kubernetes-$(lsb_release -cs) main" | tee -a /etc/apt/sources.list.d/kubernetes.list -apt-get update -apt-get install -y kubectl - -# Install Helm -curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash - -# Run tests to determine that the software installed as expected -echo "Testing to make sure that script performed as expected, and basic scenarios work" -if ! command -v kubectl; then - echo "kubectl was not installed" - exit 1 -fi - -if ! command -v helm; then - echo "helm was not installed" - exit 1 -fi - -echo "Initializing helm" -helm init --client-only - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "kubectl ($(kubectl version --short |& head -n 1))" -DocumentInstalledItem "helm ($(helm version --short |& head -n 1))" diff --git a/images/linux/scripts/installers/1804/basic.sh b/images/linux/scripts/installers/1804/basic.sh index 29cb15b40..2b8c00181 100644 --- a/images/linux/scripts/installers/1804/basic.sh +++ b/images/linux/scripts/installers/1804/basic.sh @@ -130,6 +130,9 @@ apt-get install -y --no-install-recommends curl echo "Install parallel" apt-get install -y --no-install-recommends parallel +echo "Install gnupg2" +apt-get install -y --no-install-recommends gnupg2 + # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" for cmd in curl file ftp jq netcat ssh parallel rsync shellcheck sudo telnet time unzip wget zip; do @@ -168,3 +171,4 @@ DocumentInstalledItemIndent "upx" DocumentInstalledItemIndent "wget" DocumentInstalledItemIndent "zip" DocumentInstalledItemIndent "zstd" +DocumentInstalledItemIndent "gnupg2" diff --git a/images/linux/scripts/installers/1804/kubernetes-tools.sh b/images/linux/scripts/installers/kubernetes-tools.sh similarity index 79% rename from images/linux/scripts/installers/1804/kubernetes-tools.sh rename to images/linux/scripts/installers/kubernetes-tools.sh index 38659028f..6fcdb4c02 100644 --- a/images/linux/scripts/installers/1804/kubernetes-tools.sh +++ b/images/linux/scripts/installers/kubernetes-tools.sh @@ -9,12 +9,11 @@ source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/apt.sh ## Install kubectl -apt-get install -y apt-transport-https curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - touch /etc/apt/sources.list.d/kubernetes.list -# Based on https://kubernetes.io/docs/tasks/tools/install-kubectl/, package is still called xenial -echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list +# Based on https://kubernetes.io/docs/tasks/tools/install-kubectl/, package is xenial for both OS versions. +echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list apt-get update apt-get install -y kubectl @@ -33,10 +32,7 @@ if ! command -v helm; then exit 1 fi -echo "Initializing helm" -helm init --client-only - # Document what was added to the image echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "kubectl ($(kubectl version --short |& head -n 1))" +DocumentInstalledItem "kubectl ($(kubectl version --client --short |& head -n 1))" DocumentInstalledItem "helm ($(helm version --short |& head -n 1))" diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index a4f138db7..b4c1846c3 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -204,7 +204,7 @@ "{{template_dir}}/scripts/installers/image-magick.sh", "{{template_dir}}/scripts/installers/java-tools.sh", "{{template_dir}}/scripts/installers/kind.sh", - "{{template_dir}}/scripts/installers/1604/kubernetes-tools.sh", + "{{template_dir}}/scripts/installers/kubernetes-tools.sh", "{{template_dir}}/scripts/installers/leiningen.sh", "{{template_dir}}/scripts/installers/1604/mercurial.sh", "{{template_dir}}/scripts/installers/miniconda.sh", diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index f72233e61..51a6ff9ab 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -207,7 +207,7 @@ "{{template_dir}}/scripts/installers/image-magick.sh", "{{template_dir}}/scripts/installers/java-tools.sh", "{{template_dir}}/scripts/installers/kind.sh", - "{{template_dir}}/scripts/installers/1804/kubernetes-tools.sh", + "{{template_dir}}/scripts/installers/kubernetes-tools.sh", "{{template_dir}}/scripts/installers/leiningen.sh", "{{template_dir}}/scripts/installers/1804/mercurial.sh", "{{template_dir}}/scripts/installers/miniconda.sh",