From e5d2a49d2f3133ff437273ddbbe560b22283b9ac Mon Sep 17 00:00:00 2001 From: Chris Green <138027265+Chris-green-stfc@users.noreply.github.com> Date: Mon, 2 Feb 2026 15:39:12 +0000 Subject: [PATCH 1/2] CLUSTER_API now set in set_env.sh CLUSTER_API variable is now exported in set-env.sh as otherwise it is not set by the time bootstrap.sh is ran --- set-env.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/set-env.sh b/set-env.sh index c053abc..0febd82 100755 --- a/set-env.sh +++ b/set-env.sh @@ -60,6 +60,9 @@ echo "File downloaded successfully" set_env_vars "$DEST_URL" # export just the values that we care about into the current session +export CLUSTER_API=$CLUSTER_API +echo "Set CLUSTER_API=$CLUSTER_API" + export ADDON_VERSION=$ADDON_PROVIDER echo "Set ADDON_VERSION=$ADDON_PROVIDER" From 727ebddc73b26b78b317401107a22b88be9d25f1 Mon Sep 17 00:00:00 2001 From: Chris Green <138027265+Chris-green-stfc@users.noreply.github.com> Date: Mon, 2 Feb 2026 15:45:48 +0000 Subject: [PATCH 2/2] Updated variable names in bootstrap.sh Updated some variable names, as they were not set in set-env.sh and bootstrap.sh failed --- bootstrap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 13c7910..cc8b0ab 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -51,7 +51,7 @@ sudo microk8s status --wait-ready echo "Exporting the kubeconfig file..." mkdir -p ~/.kube/ echo "Backing up existing kubeconfig if it exists..." -if [ -f "$HOME/.kube/config" ]; then +if [ -f "$HOME/.kube/config" ]; then mv -v "$HOME/.kube/config" "$HOME/.kube/config.bak" fi @@ -62,13 +62,13 @@ sudo microk8s enable dns echo "Initialising cluster-api OpenStack provider..." echo "If this fails you may need a GITHUB_TOKEN, see https://stfc.atlassian.net/wiki/spaces/CLOUDKB/pages/211878034/Cluster+API+Setup for details" -clusterctl init --infrastructure=openstack:"${CLUSTER_API_PROVIDER_OPENSTACK}" +clusterctl init --infrastructure=openstack:"${CAPO_PROVIDER_VERSION}" echo "Importing required helm repos and packages" helm repo add capi https://azimuth-cloud.github.io/capi-helm-charts helm repo add capi-addons https://azimuth-cloud.github.io/cluster-api-addon-provider helm repo update -helm upgrade cluster-api-addon-provider capi-addons/cluster-api-addon-provider --create-namespace --install --wait -n clusters --version "${ADDON_PROVIDER}" +helm upgrade cluster-api-addon-provider capi-addons/cluster-api-addon-provider --create-namespace --install --wait -n clusters --version "${ADDON_VERSION}" kubectl apply -f "https://github.com/k-orc/openstack-resource-controller/releases/download/v${KORC}/install.yaml" echo ""