From b29884f37b19ea7e288b3735513f1076587fe447 Mon Sep 17 00:00:00 2001 From: Aline Abler Date: Fri, 15 Nov 2024 11:19:19 +0100 Subject: [PATCH] Update Cloudscale install documentation to enable machine-api provider --- .../partials/install/bootstrap-nodes.adoc | 79 ++++++++++++++++--- .../prepare-syn-config-machine-api.adoc | 13 +++ .../partials/install/prepare-syn-config.adoc | 4 + 3 files changed, 87 insertions(+), 9 deletions(-) create mode 100644 docs/modules/ROOT/partials/install/prepare-syn-config-machine-api.adoc diff --git a/docs/modules/ROOT/partials/install/bootstrap-nodes.adoc b/docs/modules/ROOT/partials/install/bootstrap-nodes.adoc index 7666d445..2010bae0 100644 --- a/docs/modules/ROOT/partials/install/bootstrap-nodes.adoc +++ b/docs/modules/ROOT/partials/install/bootstrap-nodes.adoc @@ -98,6 +98,32 @@ terraform apply ifeval::["{provider}" == "cloudscale"] . Add the DNS records for etcd shown in output variable `dns_entries` from the previous step to the cluster's parent zone + +. Apply the manifests for the cloudscale machine-api provider ++ +[source,bash,subs="attributes+"] +---- +cat ../machine-api-provider-cloudscale/00_secrets.yaml | yq '(select(document_index==0) | .stringData.token) = "'$(vault kv get -format=json clusters/kv/${TENANT_ID}/${CLUSTER_ID}/cloudscale/ | jq -r .data.data.token)'" ' | kubectl apply -f - + +kubectl apply -f ../machine-api-provider-cloudscale/10_clusterRoleBinding.yaml + +kubectl apply -f ../machine-api-provider-cloudscale/10_serviceAccount.yaml + +kubectl apply -f ../machine-api-provider-cloudscale/11_deployment.yaml +---- + +. Apply the machinesets from terraform ++ +[source,bash,subs="attributes+"] +---- +terraform output -raw worker-machineset_yml | grep -vP '^(│|╵|╷|There are some problems with the CLI configuration)' | yq -P > worker-machineset.yml +head worker-machineset.yml +kubectl apply -f worker-machineset.yml + +terraform output -raw infra-machineset_yml | grep -vP '^(│|╵|╷|There are some problems with the CLI configuration)' | yq -P > infra-machineset.yml +head infra-machineset.yml +kubectl apply -f infra-machineset.yml +---- endif::[] . Wait for bootstrap to complete @@ -122,6 +148,7 @@ kubectl taint no -l node-role.kubernetes.io/master node.cloudprovider.kubernetes ---- -- +ifeval::["{provider}" != "cloudscale"] . Remove bootstrap node and provision remaining nodes + [source,bash,subs="attributes+"] @@ -129,9 +156,50 @@ kubectl taint no -l node-role.kubernetes.io/master node.cloudprovider.kubernetes rm override.tf terraform apply +popd +---- +endif::[] +ifeval::["{provider}" == "cloudscale"] +. Remove bootstrap node ++ +[source,bash,subs="attributes+"] +---- +cat > override.tf <