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 0febd82..540fbaa 100755 --- a/set-env.sh +++ b/set-env.sh @@ -4,6 +4,11 @@ # if we do this and run into any errors it will kill the user's # current shell (e.g. a typo) +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() { echo "$1" | tr '-' '_' | tr '[:lower:]' '[:upper:]'