Skip to content

Commit

Permalink
Merge pull request #5897 from ministryofjustice/update-migrate-runboo…
Browse files Browse the repository at this point in the history
…k-null

docs: Update migrate module runbook with pipeline info
  • Loading branch information
mikebell authored Jul 18, 2024
2 parents 4083b96 + fb6d9ba commit c65e708
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions runbooks/source/move-components-module.html.md.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Moving components modules into core
weight: 60
last_reviewed_on: 2024-04-03
last_reviewed_on: 2024-07-18
review_in: 6 months
---

Expand All @@ -15,15 +15,26 @@ There is a pipeline in Concourse that accepts `$CLUSTER_NAME`, `$MODULE_NAME` an

If you need to upgrade the `mtm` cli you can update the `$MTM_VERSION` parameter in the pipeline.

The exact steps should follow:
## Notes on the pipeline

The pipeline takes the following arguments:

* `cluster_name` - Name of the cluster to target e.g. `cp-0001-0001`.
* `module_name` - Name of the module to target e.g. `cert_manager`.
* `resource` - Name of the resource to target e.g. `kubectl_manifest.prometheus_operator_crds`, accepts a comma separated list for multiple resources.
* `flagged_resource` Name of flagged resource to target, this is used for resources that need to be pulled out of a module, accepts a comma separated list for multiple resources.

Because of the way concourse variables work, none of the above can be blank. You can pass a dummy string in like `module.null` and the MTM tool will try and migrated a module/resource that doesn't exist.

## Process

1. Notify `#cloud-platform` that you are pausing concourse pipelines
2. Pause `bootstrap`, `live-2`, `manager` and `live` pipelines.
3. Raise PR with migrated module
4. Log in to Concourse using `fly -t moj-cp login -c https://concourse.cloud-platform.service.justice.gov.uk/`
5. Ensure your in the `cloud-platform-terraform-concourse` directory.
6. Update pipelines with module and/or resources name and cluster name:
`fly -t moj-cp set-pipeline --pipeline migrate-module --config migrate-module.yaml -v cluster_name=cp-0306-0730 -v module=tigera_calico -v resources=kubectl_manifest.calico_crds,http.calico_crds`
`fly -t moj-cp set-pipeline --pipeline migrate-module --config migrate-module.yaml -v cluster_name=cp-0306-0730 -v module=tigera_calico -v resources=kubectl_manifest.calico_crds,http.calico_crds -v flagged_resources=module.null`
7. Run `migrate-module` pipeline from the Concourse UI.
8. Unpause pipeline environment specific pipeline (e.g. live-2)
9. Re-run PR plan - the plan should show "No changes. Your infrastructure matches the configuration."
Expand Down

0 comments on commit c65e708

Please sign in to comment.