From 5fa377f9fa00e3b0ce9bb4ea7896694634d331c6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 Jul 2026 08:04:15 +0000 Subject: [PATCH] Update install instructions from guided-setup --- .../guided-setup/cloudscale-decommission.adoc | 6 +- .../guided-setup/exoscale-decommission.adoc | 143 ++++++++++++++---- 2 files changed, 114 insertions(+), 35 deletions(-) diff --git a/docs/modules/ROOT/partials/guided-setup/cloudscale-decommission.adoc b/docs/modules/ROOT/partials/guided-setup/cloudscale-decommission.adoc index 63bae3cf..0e296d26 100644 --- a/docs/modules/ROOT/partials/guided-setup/cloudscale-decommission.adoc +++ b/docs/modules/ROOT/partials/guided-setup/cloudscale-decommission.adoc @@ -319,6 +319,7 @@ This is required to access the encrypted emergency credentials. * `commodore_cluster_id` +* `commodore_api_url` ==== Outputs @@ -332,12 +333,13 @@ OUTPUT=$(mktemp) # export INPUT_passbolt_passphrase= # export INPUT_commodore_cluster_id= +# export INPUT_commodore_api_url= set -euo pipefail export KHARON_PASSBOLT_PASSPHRASE="${INPUT_passbolt_passphrase}" export KUBECONFIG="em-${INPUT_commodore_cluster_id}" -kharon update -kharon emergency-credentials "${INPUT_commodore_cluster_id}" +kharon update --lieutenant-url "${INPUT_commodore_api_url}" --inventory-file kharon-inventory.json +kharon emergency-credentials "${INPUT_commodore_cluster_id}" --inventory-file kharon-inventory.json kubectl get nodes diff --git a/docs/modules/ROOT/partials/guided-setup/exoscale-decommission.adoc b/docs/modules/ROOT/partials/guided-setup/exoscale-decommission.adoc index acb2ce6f..6cca6d36 100644 --- a/docs/modules/ROOT/partials/guided-setup/exoscale-decommission.adoc +++ b/docs/modules/ROOT/partials/guided-setup/exoscale-decommission.adoc @@ -10,19 +10,20 @@ * <> *   <> *   <> -* <> -*   <> -*   <> -*   <> -*   <> -*   <> -*   <> -*   <> -*   <> -* <> -*   <> -*   <> -*   <> +*   <> +* <> +*   <> +*   <> +*   <> +*   <> +*   <> +*   <> +*   <> +*   <> +* <> +*   <> +*   <> +*   <> [[step-1]] === Given I have all prerequisites installed @@ -324,6 +325,7 @@ This is required to access the encrypted emergency credentials. * `commodore_cluster_id` +* `commodore_api_url` ==== Outputs @@ -337,12 +339,13 @@ OUTPUT=$(mktemp) # export INPUT_passbolt_passphrase= # export INPUT_commodore_cluster_id= +# export INPUT_commodore_api_url= set -euo pipefail export KHARON_PASSBOLT_PASSPHRASE="${INPUT_passbolt_passphrase}" export KUBECONFIG="em-${INPUT_commodore_cluster_id}" -kharon update -kharon emergency-credentials "${INPUT_commodore_cluster_id}" +kharon update --lieutenant-url "${INPUT_commodore_api_url}" --inventory-file kharon-inventory.json +kharon emergency-credentials "${INPUT_commodore_cluster_id}" --inventory-file kharon-inventory.json kubectl get nodes @@ -500,6 +503,86 @@ echo '# Deleted Services. #' ---- [[step-11]] +=== And I prepare the cluster repository + +This step prepares the local cluster repository by cloning the Commodore hieradata repository +and setting up the necessary configuration for the specified cluster. + +==== Inputs + +* `commodore_api_url` +* `commodore_cluster_id` +* `commodore_tenant_id` +* `cluster_domain` +* `image_major` +* `image_minor` + +==== Script + +[source,bash] +---- +OUTPUT=$(mktemp) + +# export INPUT_commodore_api_url= +# export INPUT_commodore_cluster_id= +# export INPUT_commodore_tenant_id= +# export INPUT_cluster_domain= +# export INPUT_image_major= +# export INPUT_image_minor= + +set -euo pipefail + +export COMMODORE_API_URL="${INPUT_commodore_api_url}" + +rm -rf inventory/classes/ +mkdir -p inventory/classes/ +git clone "$(curl -sH"Authorization: Bearer $(commodore fetch-token)" "${INPUT_commodore_api_url}/tenants/${INPUT_commodore_tenant_id}" | jq -r '.gitRepo.url')" inventory/classes/${INPUT_commodore_tenant_id} + +pushd "inventory/classes/${INPUT_commodore_tenant_id}/" + +yq eval -i ".parameters.openshift.baseDomain = \"${INPUT_cluster_domain}\"" \ + ${INPUT_commodore_cluster_id}.yml + +git diff --exit-code --quiet || git commit -a -m "Configure cluster domain for ${INPUT_commodore_cluster_id}" + +if ls openshift4.y*ml 1>/dev/null 2>&1; then + yq eval -i '.classes += ".openshift4"' ${INPUT_commodore_cluster_id}.yml; + git diff --exit-code --quiet || git commit -a -m "Include openshift4 class for ${INPUT_commodore_cluster_id}" +fi + +yq eval -i '.applications += ["exoscale-cloud-controller-manager"]' ${INPUT_commodore_cluster_id}.yml +yq eval -i '.applications = (.applications | unique)' ${INPUT_commodore_cluster_id}.yml +git diff --exit-code --quiet || git commit -a -m "Deploy Exoscale cloud-controller-manager on ${INPUT_commodore_cluster_id}" + + +yq eval -i '.applications += ["cilium"]' ${INPUT_commodore_cluster_id}.yml +yq eval -i '.applications = (.applications | unique)' ${INPUT_commodore_cluster_id}.yml + +yq eval -i '.parameters.openshift.infraID = "TO_BE_DEFINED"' ${INPUT_commodore_cluster_id}.yml +yq eval -i '.parameters.openshift.clusterID = "TO_BE_DEFINED"' ${INPUT_commodore_cluster_id}.yml + +yq eval -i '.parameters.cilium.olm.generate_olm_deployment = true' ${INPUT_commodore_cluster_id}.yml + +git diff --exit-code --quiet || git commit -a -m "Add Cilium addon to ${INPUT_commodore_cluster_id}" + +git push + +popd + +commodore catalog compile ${INPUT_commodore_cluster_id} --push \ + --dynamic-fact kubernetesVersion.major=1 \ + --dynamic-fact kubernetesVersion.minor="$((INPUT_image_minor+13))" \ + --dynamic-fact openshiftVersion.Major=${INPUT_image_major} \ + --dynamic-fact openshiftVersion.Minor=${INPUT_image_minor} + + +# echo "# Outputs" +# cat "$OUTPUT" +# rm -f "$OUTPUT" + +---- + +[[step-12]] === Then I save the loadbalancer metadata This step gathers metadata on the LoadBalancer instances (such as their icinga zone and backup server), such that they can be properly decommissioned down the line. @@ -513,7 +596,6 @@ This step gathers metadata on the LoadBalancer instances (such as their icinga z * `gitlab_api_token` * `commodore_cluster_id` * `commodore_api_url` -* `rhcos_template` * `csp_region` ==== Outputs @@ -538,7 +620,6 @@ OUTPUT=$(mktemp) # export INPUT_gitlab_api_token= # export INPUT_commodore_cluster_id= # export INPUT_commodore_api_url= -# export INPUT_rhcos_template= # export INPUT_csp_region= set -euo pipefail @@ -553,7 +634,6 @@ EXOSCALE_API_KEY=${INPUT_exoscale_key} EXOSCALE_API_SECRET=${INPUT_exoscale_secret} TF_VAR_control_vshn_net_token=${INPUT_control_vshn_api_token} TF_VAR_region=${INPUT_csp_region} -TF_VAR_rhcos_template=${INPUT_rhcos_template} GIT_AUTHOR_NAME=$(git config --global user.name) GIT_AUTHOR_EMAIL=$(git config --global user.email) HIERADATA_REPO_TOKEN=${INPUT_gitlab_api_token} @@ -625,7 +705,7 @@ popd ---- -[[step-12]] +[[step-13]] === And I downtime the loadbalancers in icinga In this step you have to configure downtimes in Icinga for the cluster's load balancers. @@ -664,7 +744,7 @@ sleep 2 ---- -[[step-13]] +[[step-14]] === And I decommission Terraform resources This step decommissions all Terraform resources for the cluster. @@ -678,7 +758,6 @@ This step decommissions all Terraform resources for the cluster. * `gitlab_api_token` * `commodore_cluster_id` * `commodore_api_url` -* `rhcos_template` * `csp_region` ==== Script @@ -694,7 +773,6 @@ OUTPUT=$(mktemp) # export INPUT_gitlab_api_token= # export INPUT_commodore_cluster_id= # export INPUT_commodore_api_url= -# export INPUT_rhcos_template= # export INPUT_csp_region= set -euo pipefail @@ -709,7 +787,6 @@ EXOSCALE_API_KEY=${INPUT_exoscale_key} EXOSCALE_API_SECRET=${INPUT_exoscale_secret} TF_VAR_control_vshn_net_token=${INPUT_control_vshn_api_token} TF_VAR_region=${INPUT_csp_region} -TF_VAR_rhcos_template=${INPUT_rhcos_template} GIT_AUTHOR_NAME=$(git config --global user.name) GIT_AUTHOR_EMAIL=$(git config --global user.email) HIERADATA_REPO_TOKEN=${INPUT_gitlab_api_token} @@ -762,7 +839,7 @@ popd ---- -[[step-14]] +[[step-15]] === And I delete all S3 buckets This step deletes the cluster's associated S3 buckets from Exoscale. @@ -801,7 +878,7 @@ exo storage rb -r -f "${INPUT_commodore_cluster_id}-logstore" || true ---- -[[step-15]] +[[step-16]] === And I delete the cluster backup This step deletes the cluster's associated backup bucket from Exoscale. @@ -913,7 +990,7 @@ exo storage rb -r -f "${INPUT_commodore_cluster_id}-backup" || true ---- -[[step-16]] +[[step-17]] === And I delete the cluster's API tokens This step deletes the cluster's associated Exoscale API tokens from Exoscale. @@ -954,7 +1031,7 @@ exo iam api-key delete -f "${INPUT_commodore_cluster_id}" || true ---- -[[step-17]] +[[step-18]] === And I remove the LoadBalancers from control.vshn.net In this step you need to remove the LoadBalancer servers from control.vshn.net @@ -994,7 +1071,7 @@ sleep 2 ---- -[[step-18]] +[[step-19]] === And I decommission the LoadBalancers This step decommissions resources associated with the Puppet managed LoadBalancers. @@ -1118,7 +1195,7 @@ echo "# Deleted backups from Burp server. #" ---- -[[step-19]] +[[step-20]] === And I remove the cluster's DNS entries In this step, you must manually remove any DNS entries associated with the cluster from https://git.vshn.net/vshn/vshn_zonefiles. @@ -1145,7 +1222,7 @@ sleep 2 ---- -[[step-20]] +[[step-21]] === Then I delete the cluster's Vault secrets This step cleans up all the cluster's Vault secrets. @@ -1217,7 +1294,7 @@ done ---- -[[step-21]] +[[step-22]] === And I delete the cluster's OpsGenie heartbeat This step deletes the cluster's OpsGenie heartbeat. @@ -1256,7 +1333,7 @@ curl "https://api.opsgenie.com/v2/heartbeats/${INPUT_commodore_cluster_id}" \ ---- -[[step-22]] +[[step-23]] === And I delete the cluster from Lieutenant This step deletes the cluster from Lieutenant @@ -1288,7 +1365,7 @@ curl -H "Authorization: Bearer $(commodore fetch-token)" -XDELETE \ ---- -[[step-23]] +[[step-24]] === And I delete the Keycloak service This step deletes the cluster's keycloak service from control.vshn.net