From 98880bdc1c3e2d81ef30d887ba247953f539c036 Mon Sep 17 00:00:00 2001 From: AnishMudaraddi Date: Wed, 4 Feb 2026 12:56:06 +0000 Subject: [PATCH 1/2] install yq for set-env because we now run set-env.sh first, we need to install yq in set-env.sh so it works --- set-env.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/set-env.sh b/set-env.sh index 0febd82..4a28a7c 100755 --- a/set-env.sh +++ b/set-env.sh @@ -4,6 +4,10 @@ # if we do this and run into any errors it will kill the user's # current shell (e.g. a typo) +echo "Installing required tools..." +export PATH=$PATH:/snap/bin +sudo snap install yq + # Function to convert dependencies to a valid environment variables sanitize_var_name() { echo "$1" | tr '-' '_' | tr '[:lower:]' '[:upper:]' From 0cb188870d0da6235fb12b3506ae346ef764e294 Mon Sep 17 00:00:00 2001 From: AnishMudaraddi Date: Thu, 5 Feb 2026 14:05:42 +0000 Subject: [PATCH 2/2] use apt to install yq instead of snap add check if yq is already installed for yq so we're not forced to initiate apt if it is already installed --- bootstrap.sh | 14 +++++++------- set-env.sh | 7 ++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index cc8b0ab..a6a72c4 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,13 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -echo "Installing required tools..." -sudo apt-get install -y snapd python3-openstackclient -export PATH=$PATH:/snap/bin -sudo snap install kubectl --classic -sudo snap install helm --classic -sudo snap install yq - echo "Updating system to apply latest security patches..." export DEBIAN_FRONTEND=noninteractive sudo apt-get update -qq @@ -17,6 +10,13 @@ sudo apt-get -o Dpkg::Options::="--force-confold" \ -o Dpkg::Options::="--force-confdef" \ -y -qq upgrade > /dev/null +echo "Installing required tools..." +sudo apt-get install -y snapd python3-openstackclient yq + +export PATH=$PATH:/snap/bin +sudo snap install kubectl --classic +sudo snap install helm --classic + # Check a clouds.yaml file exists in the same directory as the script if [ ! -f clouds.yaml ]; then echo "A clouds.yaml file is required in the same directory as this script" diff --git a/set-env.sh b/set-env.sh index 4a28a7c..540fbaa 100755 --- a/set-env.sh +++ b/set-env.sh @@ -4,9 +4,10 @@ # if we do this and run into any errors it will kill the user's # current shell (e.g. a typo) -echo "Installing required tools..." -export PATH=$PATH:/snap/bin -sudo snap install yq +if [ ! -f "/usr/bin/yq" ]; then + echo "Installing yq..." + sudo apt-get -y install yq +fi # Function to convert dependencies to a valid environment variables sanitize_var_name() {