Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions set-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:]'
Expand Down