Docs · how to

Set up a pipeline

Move each release from canary to production regions with bake times, approvals, deploy windows and parity as a gate.

An environment's stages are its pipeline. A release enters the first stage and is promoted forward. Each stage decides how fast it changes and what must be true before the next stage starts.

canary  ->  prod-us  ->  prod-eu
1 unit      2-6 units    2-4 units
bake 1h     approval     approval + windows

Describe the stages

environment:
  name: ds-flash
  stages:
    - name: canary
      fleets: [gb200-rack]
      replicas: 1
      rollout: { batch: 1, bake: 30m }
      alarms: { ttft-p99: 1500ms, error-rate: 1%, parity-fail: 1 }
      promote: { bake: 1h, auto: true }

    - name: prod-us
      fleets: [gb200-rack, h200-use1]
      replicas: { min: 2, max: 6 }
      rollout: { batch: 1, min-healthy: 75%, bake: 2h }
      alarms: { ttft-p99: 1500ms, itl-p99: 80ms, error-rate: 1%, throughput-drop: 15%, parity-fail: 1 }
      promote: { approval: required }

    - name: prod-eu
      fleets: [eu-h200]
      replicas: { min: 2, max: 4 }
      residency: eu
      rollout: { batch: 1, min-healthy: 75%, bake: 2h }
      alarms: { error-rate: 1%, parity-fail: 1 }
      promote: { approval: required, windows: ["Mon-Thu 09:00-16:00 Europe/Berlin"] }
denv env apply --dry-run
denv env apply

How promotion works

Rule Effect
bake The release must have run in the previous stage for this long with no alarm.
approval: required Someone with the deployer role runs denv approve.
windows The deployment starts only inside one of these windows.
auto: true Promote without a command once the other rules pass.

A stage's promote rules describe what must happen before a release enters that stage from the previous one.

Parity as a gate

With parity-fail in a stage's alarms, the parity suite runs during the deployment's bake. A failed run counts as an alarm: the deployment rolls back and the release cannot be promoted from that stage. Schedule it as well, so drift after a deployment is caught:

denv parity schedule ds-flash/prod-us --every 6h

See Parity.

Run it

denv release
denv deploy ds-flash/canary --release ds-flash@v8

With auto: true on canary's promotion rule, prod-us waits only for its approval:

denv promote ds-flash --from canary
deployment dep_01JB7…  waiting   approval required (prod-us)
denv approve dep_01JB7…
denv deployment watch dep_01JB7…

Then to prod-eu, inside its window:

denv promote ds-flash --from prod-us
denv approve <deployment-id>

One deployment per stage

A stage runs one deployment at a time. A second deploy or promote to the same stage waits until the first finishes or is rolled back.

Next