Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update migrate module runbook with pipeline info #5897

Merged
merged 2 commits into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading