From cdb4ea9cdbed07ffc898d4aad6e89f8c697d958b Mon Sep 17 00:00:00 2001 From: Mike Bell Date: Wed, 27 Nov 2024 10:46:38 +0000 Subject: [PATCH 1/2] feat: add runbook on custom cluster --- .../source/create-custom-cluster.html.md.erb | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 runbooks/source/create-custom-cluster.html.md.erb diff --git a/runbooks/source/create-custom-cluster.html.md.erb b/runbooks/source/create-custom-cluster.html.md.erb new file mode 100644 index 00000000..5ea5199a --- /dev/null +++ b/runbooks/source/create-custom-cluster.html.md.erb @@ -0,0 +1,40 @@ +--- +title: Create Custom Cluster +weight: 8600 +last_reviewed_on: 2024-11-27 +review_in: 6 months +--- + +# Create custom cluster + +In concourse we have the ability to create custom clusters based of whichever branch you specify. + +First we need to update the pipeline config with our branch, you need to run the following command from the `cloud-platform-terraform-concourse` repo root folder. + +``` +fly -t moj-cp set-pipeline --pipeline custom-cluster --config pipelines/manager/main/custom-cluster.yaml -v branch_name=migrate-eks-csi +``` + +From here you can then kick off the build from the concourse UI. + +## Deleting your custom cluster + +Our delete pipeline allows you to specify the `branch_name` in the config so to do this you run: + +``` +fly -t moj-cp set-pipeline --pipeline delete-cluster --config pipelines/manager/main/delete-cluster.yaml -v branch_name=migrate-eks-csi -v cluster_name=tp-0000-0000 +``` + +You need to pass both `branch_name` and `cluster_name` to the command. + +## Rerunning stages in the create custom cluster pipeline + +@TODO + +## Run integration tests against custom cluster + +You can also use the `custom-integration-tests` job within the `custom-cluster` pipeline to execute the go integration test suite against a cluster of your choice: + +`fly -t manager set-pipeline -p custom-cluster -c pipelines/manager/main/custom-cluster.yaml -v branch_name= -v cluster_name=` + +And then trigger a new build in `custom-integration-tests` job view. From 390c032a5cd31e0375f5da3917a48f5d46a5e2c4 Mon Sep 17 00:00:00 2001 From: Mike Bell Date: Wed, 27 Nov 2024 11:10:49 +0000 Subject: [PATCH 2/2] fix: add in rerunning stage section --- runbooks/source/create-custom-cluster.html.md.erb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/runbooks/source/create-custom-cluster.html.md.erb b/runbooks/source/create-custom-cluster.html.md.erb index 5ea5199a..018ae758 100644 --- a/runbooks/source/create-custom-cluster.html.md.erb +++ b/runbooks/source/create-custom-cluster.html.md.erb @@ -29,7 +29,13 @@ You need to pass both `branch_name` and `cluster_name` to the command. ## Rerunning stages in the create custom cluster pipeline -@TODO +If you need to re-run a plan or apply at any stage after the cluster has been created you can do this by running the following: + +``` +fly -t moj-cp set-pipeline --pipeline custom-cluster --config pipelines/manager/main/custom-cluster.yaml -v branch_name=migrate-eks-csi -v cluster_name=tp-0000-0000 +``` + +Then you can select the step in the pipeline that you'd like to re-run. ## Run integration tests against custom cluster