Offboarding
Background
Section titled “Background”Every Runway workload has resources provisioned in two layers:
- The deployment project resources managed by reconciler
- The infrastructure resources managed by provisioner
For complete and safe offboarding, resources must be removed in the correct order: first the reconciler-managed resources, then the provisioner-managed resources.
Offboarding Options
Section titled “Offboarding Options”There are two main approaches to offboarding Runway services:
- Option 1: Removing the only service in a repository or all services at once
- Option 2: Removing one specific service from a multi-service repository
Option 1: Remove the only service or all services in a repository
Section titled “Option 1: Remove the only service or all services in a repository”- Create a merge request to remove the service from the workloads configuration file:
- Current path: https://gitlab.com/gitlab-com/gl-infra/platform/runway/provisioner/-/blob/main/config/runtimes/cloud-run/workloads.yml
- Include a reference to the offboarding instructions in your MR
- Assign to a Runway maintainer for approval
For the Runway maintainer reviewing the MR
Section titled “For the Runway maintainer reviewing the MR”- Trigger the “Trigger dry run to remove workloads” job
- Review the Terraform destroy plans using the provided URLs
- Approve the merge request
- Trigger a new pipeline
- In the new pipeline, run the “Trigger workload removal” job to destroy resources in the deployment projects
- Once complete, retry the “Check workloads to destroy” job to unblock the pipeline
- Complete the review and merge the MR
- The default branch pipeline will remove the remaining provisioner-managed resources
Option 2: Remove a specific service from a multi-service repository
Section titled “Option 2: Remove a specific service from a multi-service repository”To turn down a specific service in a multi-service repository:
-
Create a CI variable in the service project named
DESTROY_RUNWAY_WORKLOAD
with the value set to the specific Runway Service ID. This is the same ID used elsewhere in your.gitlab-ci.yml
file and is equal to the deployment repository nameTo turn down all services in the repository set
DESTROY_RUNWAY_WORKLOAD
toEVERYTHING
. -
Trigger a Runway deployment pipeline (e.g. using a dummy commit)
-
Once resources are removed, create an MR to remove the service from the inventory file
Important Notes
Section titled “Important Notes”- Always verify that dry-run outputs match expectations before proceeding with destruction
- Reconciler-managed resources must be destroyed before provisioner archives the deployment project
- For complex offboarding scenarios, consult with the Runway team before proceeding
Further Documentation
Section titled “Further Documentation”For more detailed information on safely removing Runway workloads, refer to the workload removal instructions in the Provisioner README.