Skip to main content
RunBook Academy

Git, CI/CD & GitOpsXCVII · CI/CD Disaster RecoveryDisasterRecovery

The CI/CD DR question — what fails, what survives, what to rebuild

Advanced⏱ ~24 mingit

What you'll learn

  • Define a CI/CD disaster as the loss of the machinery between commit and deploy
  • Distinguish what survives (repositories, IaC, local clones) from what fails (control plane, runners, secrets, registry)
  • Order the four rebuild layers by their dependency graph
  • Identify RTO and RPO as design constraints, not incident decisions

Prerequisites

Verified against Git 2.55.x teaching target; 2.40+ minimum · GitHub Actions continuous service; Aug 2026 documentation baseline · Argo CD v3.5.x teaching target; v3.0+ minimum · Flux v2.9.x · Sigstore Cosign v3.1.x · SLSA v1.2 · OCI Distribution Specification v1.1 · Git LFS v3.7.1 · Kubernetes (cross-course target) 1.36.x

Not yet marked complete on this device.

A CI/CD disaster is the loss of the system that builds, tests, and deploys your software. It is not the loss of the source code (Git repositories survive if a clone is intact) or the production workloads (a cluster redeploys from Git). It is the loss of the machinery between commit and deploy: the control plane that schedules workflows, the runners that execute jobs, the secret store that hands credentials, and the artifact registry that holds the images and binaries.

flowchart LR
    A["CI/CD disaster event"] --> B["control plane lost"]
    A --> C["runners lost"]
    A --> D["secret store lost"]
    A --> E["artifact registry lost"]
    B --> F["workflows cannot schedule"]
    C --> G["scheduled workflows cannot run"]
    D --> H["jobs cannot authenticate"]
    E --> I["deploys cannot pull artifacts"]

The DR question every team must answer before the incident is: what fails, what survives, what to rebuild. The three categories drive different recovery paths.

What survives

The source repositories are usually the most resilient piece of the system. Git is distributed: every clone is a full backup. The repository survives the loss of the forge if at least one mirror, fork, or local clone is intact. The Terraform that provisioned the CI infrastructure lives in a repository of its own. The Dockerfile for the runner image lives in the same repository as the workflows.

What survives a regional outage of the cloud provider that runs the hosted control plane: the repositories, the local clones on developer laptops, the IaC that recreates the runners, the secret values held in the password manager.

What fails

The runners — the VMs or containers that execute workflows — are usually the first thing lost in a regional outage. Self-hosted runners are physical or virtual infrastructure; if the region is gone, the runners are gone. Hosted runners are shared across all tenants of the control plane, and the loss of the control plane takes the hosted runners with it.

The artifact registry — Docker Hub, GHCR, GitLab Container Registry, a private Harbor — is the second thing that fails. An artifact registry that is not mirrored to a second region is a single point of failure for every deployment that pulls from it.

The secret store is the third. The control plane’s secret store (GitHub Actions Secrets, GitLab CI Variables) lives in the control plane and is lost with it. An external secret store (Vault, AWS Secrets Manager) survives if its region survives; it does not survive a regional outage.

What to rebuild

The recovery order is determined by the dependency graph:

  1. Control plane first. The orchestrator must exist before anything it schedules can run.
  2. Runners second. The runners register against the control plane; without runners, no job executes.
  3. Secret store third. Jobs cannot pull credentials until the store is reachable.
  4. Artifact registry fourth. Deploys need artifacts; the artifacts must exist before a deploy can pull them.

Production discipline

Three rules that recur in every DR plan:

  1. RTO and RPO are written before the incident. Recovery Time Objective (how long the team accepts the system being down) and Recovery Point Objective (how much data the team accepts losing) are design constraints, not incident decisions.
  2. Backups live in a different region than the system they back up. A backup that shares a region with the system it backs up is lost in the same outage.
  3. The DR runbook is rehearsed quarterly. A runbook that has never been executed is a hypothesis.

Cross-course references

  • Git, CI/CD & GitOps — Part XCIV-01 (The Incident Arrives) covers the first ten minutes of a secret-leak incident, the same triage shape that opens a CI/CD DR.
  • Container Security for Production Sysadmins — Part VII (Registry Backup) covers the registry backup mechanics in detail.
  • Terraform for Production Sysadmins — Part XXI (State Backup) covers the state-backup pattern the control-plane rebuild relies on.

Quiz

Knowledge check · 4 questions

  1. Q1. A regional outage takes down the cloud provider that runs the team's CI/CD control plane. What is the highest-leverage first question the on-call engineer must answer?

  2. Q2. A backup snapshot of the CI infrastructure that lives in the same region as the CI infrastructure it backs up is a sufficient backup for a regional outage.

  3. Q3. Name the four CI/CD layers that are rebuilt during a disaster recovery, in the order they must be rebuilt, and the dependency that drives the order.

  4. Q4. Diagnose the gap in a DR plan and recommend the rebuild order.

    A team uses a hosted CI/CD control plane (GitHub Actions) and self-hosted runners in a single AWS region. The artifact registry is a private ECR in the same region. The secret store is GitHub Actions Secrets (which live in the control plane). The IaC that provisions the runners is in a separate repository, mirrored to a second region. The team has never rehearsed the DR plan.

Passing score: 75%. Answers are checked in this browser.