DevOps, CI/CD & Platform Engineering
- Explain DevOps as flow, feedback and learning, and the team types that support it
- Measure delivery with the five DORA metrics, collect them from pipeline and incident data, and spot gaming
- Design a CI/CD pipeline: trunk-based development, merge queue, build once and promote by digest, layered tests
- Choose an infrastructure-as-code tool and run GitOps promotion with canary analysis tied to SLOs
- Design an internal developer platform and measure its adoption
- Make continuous delivery pass bank change control (ITIL 4, segregation of duties, SBV Circular 09/2020/TT-NHNN) and e-commerce peak freezes
TL;DR
- DevOps is a property of the delivery system, not a team or a tool: small changes flowing fast, fast feedback, learning from failure.
- DORA's five metrics (as of 2026): change lead time, deployment frequency, failed deployment recovery time (throughput); change fail rate, deployment rework rate (instability). Per service, as trends, never as targets.
- 2025 DORA report: AI adoption now goes with higher throughput but still more instability. AI amplifies the delivery system you already have.
- Pipeline: short-lived branches through a merge queue; build one signed artifact and promote the same digest everywhere; fast tests gate merge, SLO-based canary analysis gates production.
- Declarative everything: IaC with plan review and policy checks, GitOps for deploys, feature flags for releases.
- In a bank, the pipeline is the control: routine deploys become ITIL 4 standard changes with machine-generated evidence, which is how you meet SBV Circular 09/2020's rules on change, duties and environments.
- In e-commerce, a freeze before 11.11 is a risk trade-off, not a safety strategy.
Why it matters
A payment service that deploys quarterly pushes three months of change into one night. A checkout service that deploys forty times a day without canary analysis lets one bad build reach every customer. Both are delivery-system design failures. For a bank, the delivery system is also the evidence auditors examine: who wrote, approved, tested and rolled back each change. Interviewers ask: "Design CI/CD for 40 Go microservices at a bank", "How do you reconcile a weekly CAB with daily deploys?"
Core concepts
What DevOps is (and is not)
The DevOps Handbook describes three ways: flow (small batches, few handoffs, an automated path to production), feedback (fast tests, telemetry, alerts to the team that wrote the code) and continual learning (blameless postmortems, experiments). It is not a "DevOps team" wedged between dev and ops, not a tool purchase, and not "developers get root in production"; a Vietnamese bank explicitly rules that out for important systems (see the bank lens).
Team Topologies (Skelton & Pais) gives the org design: stream-aligned teams own a business flow (payments, checkout); platform teams provide an internal product consumed as a service; enabling teams (SRE, security champions) coach for a while; complicated-subsystem teams own specialist parts. The constraint is cognitive load: if every team must master Kubernetes, Terraform, Vault and the CAB process, everyone ships slowly.
Measuring delivery: the DORA metrics
DORA (DevOps Research and Assessment, now part of Google Cloud) lists five metrics as of 2026. Not to be confused with the EU's Digital Operational Resilience Act, also "DORA".
| Metric | Factor | Definition | How it gets gamed |
|---|---|---|---|
| Change lead time | Throughput | Commit to running in production | Measuring from merge; squash merges hiding early commits |
| Deployment frequency | Throughput | Production deployments per service per period | Counting no-op redeploys |
| Failed deployment recovery time | Throughput | Time to recover from a deployment that needed immediate intervention | Closing incidents early |
| Change fail rate | Instability | Share of deployments needing immediate intervention (rollback, hotfix) | Not recording rollbacks or flag-offs |
| Deployment rework rate | Instability | Share of deployments that are unplanned, caused by a production incident | Relabelling hotfixes as planned work |
MTTR became failed deployment recovery time in 2023 (external outages no longer count) and rework rate was added in 2024. Collect them by joining Git commit times, deploy events from CI/CD or the GitOps controller, and incidents linked to a deployment ID. DORA's guidance: one service at a time, several metrics in tension, never targets (Goodhart's law), and do not use "we are regulated" as an excuse.
DORA and AI-assisted development (2025)
The 2025 report, published as State of AI-assisted Software Development (nearly 5,000 respondents), is the latest as of 2026:
- About 90% use AI at work; about 30% have little or no trust in AI-generated code.
- Unlike 2024, AI adoption now goes with higher throughput, but still with lower stability: more change lands on weak tests and slow feedback loops. AI is an amplifier of strengths and dysfunctions.
- The AI Capabilities Model lists seven amplifying capabilities: clear AI stance, healthy data ecosystems, AI-accessible internal data, strong version control, small batches, user-centric focus, quality internal platforms.
- The low/medium/high/elite clusters gave way to seven team profiles, from "foundational challenges" to "harmonious high-achievers". 90% of organisations have an internal platform.
So if AI raises change volume, invest in the outer loop (review capacity, tests, merge queue, canary, rollback) and watch instability next to throughput. CI guardrails for AI code: Reviewing AI Code & CI Guardrails.
CI/CD pipeline design
- Trunk-based development. Integrate into
maindaily; branches live hours; unfinished work hides behind a flag. Long-lived branches push lead time into weeks. Release branches are for software patched in the field (mobile apps, partner-installed software). - Merge queue. Two PRs can each pass against an old
mainand break together. A merge queue (GitHub, generally available since July 2023, where workflows subscribe to themerge_groupevent; GitLab merge trains) tests each PR on top of the ones ahead, somainstays releasable. - Build once, promote the digest. One image per commit, identified by
sha256digest, with SBOM, signature and provenance; promote that digest unchanged. A rebuild can pull different dependencies and breaks "what we tested is what we ran". Only configuration differs per environment. Signing and admission policies: DevSecOps & Software Supply Chain Security. - Environment parity. Same image, IaC modules, Postgres major and Kubernetes minor version; smaller is fine, different is not. Data is the exception: synthetic or masked.
- Pipeline as code. Workflows live in the repo with CODEOWNERS on
.github/workflows/, so no PR, human or agent, quietly deletes a gate. - Caching saves minutes but is an attack surface: fork PRs must not write the cache
mainreads. - Ephemeral preview environments: a namespace per PR with a TTL. In a bank: synthetic data, core banking stubbed.
Test layering (budgets are rough):
| Stage | Budget | Runs | Gates |
|---|---|---|---|
| Pre-merge and queue | ≤ 10 min | vet, lint, unit, go test -race, contract tests, secret scan | Merge |
| Build | ≤ 15 min | Image, SBOM, signature, vulnerability scan | Artifact published |
| Staging | ≤ 30 min | Integration, migration dry run, e2e smoke | Production promotion |
| Production | 30–60 min | Canary analysis, synthetic probes | Full rollout |
| Scheduled | Hours | Load test, restore test, full e2e | Release readiness |
Flaky end-to-end suites are the usual reason lead time is days: quarantine flaky tests with an owner and expiry date (see Testing Strategy).
Infrastructure as code
The basic plan-in-PR, apply-from-CI workflow is on Cloud-Native, Kubernetes & Deployment Strategies. Tool choice as of 2026:
| Tool | Model | Licence and governance | Choose when |
|---|---|---|---|
| Terraform (1.16.x) | HCL, plan/apply, state file | BSL 1.1 since 1.6 (2023): free for internal use, not for competing hosted offerings; HashiCorp part of IBM since February 2025 | Largest ecosystem; you want HCP Terraform and Sentinel |
| OpenTofu (1.13.x) | Fork of Terraform 1.5, HCL-compatible | MPL 2.0, Linux Foundation, CNCF sandbox since April 2025 | Open governance; built-in state encryption |
| Pulumi | Go, TypeScript, Python programs | Apache 2.0 engine; Pulumi Cloud or self-managed state | Teams that want real languages and unit tests |
| Crossplane | Kubernetes CRDs and compositions | CNCF graduated, November 2025 | Platform APIs ("a PCI-ready Postgres") with continuous reconciliation |
- State is remote, locked and encrypted because it contains secrets. Split it by blast radius (environment × network/data/app); one state for all of production serialises every team behind one lock.
- Drift: scheduled
plan -detailed-exitcode(exit 2 means changes) with alerts. Crossplane reverts drift, including emergency console fixes, so break-glass changes must go back into code. - Module versioning: semver tags in a private registry, consumers pin
~> 3.2, Renovate opens bump PRs, breaking changes get a new major. - Policy before apply: evaluate
terraform show -jsonoutput with OPA/Conftest, Checkov or Trivy. Bank rules: encryption with bank-managed keys, no public endpoints, approved regions only, owner and data-classification tags. - Apply runs as the pipeline identity after approval; no human holds day-to-day write access to production infrastructure.
GitOps, promotion and secrets
OpenGitOps principles are covered in Cloud-Native, Kubernetes & Deployment Strategies. Current lines as of October 2026: Argo CD 3.5 and Flux 2.9 (verify before quoting).
- Promote by folder, not branch. A config repo pins
image@sha256:…per environment (envs/staging/payments,envs/prod/payments); promotion is a PR copying the digest. Branch-per-environment drifts. CI or a tool such as Kargo (from the Argo creators) opens the PRs. - Segregation of duties in Git. Anyone opens a promotion PR; merging under
envs/prod/needs release approvers via CODEOWNERS; only the GitOps controller writes to the production cluster. - Secrets: Git holds references (External Secrets Operator to Vault or a cloud secret manager) or encrypted values (SOPS, Sealed Secrets).
- Scale: generate applications per service and environment (Argo CD ApplicationSets) rather than hand-writing hundreds.
Progressive delivery and feature flags
Argo Rollouts and Flagger (part of the Flux family) shift traffic in steps (5% → 25% → 50% → 100%), query metrics at each step, and roll back without a human. Derive success conditions from your SLOs (see Observability & SLOs) and add one business metric. Compare canary against stable, so a PSP outage that hurts both versions does not fail every canary. Low-traffic services cannot produce meaningful numbers in ten minutes: use longer steps, synthetic traffic or blue/green.
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
name: payment-slo
spec:
args:
- name: service
metrics:
- name: payment-success-rate
interval: 2m
count: 5
failureLimit: 1
successCondition: result[0] >= 0.995
provider:
prometheus:
address: http://prometheus.monitoring:9090
query: |
sum(rate(payment_requests_total{service="{{args.service}}",outcome="ok"}[5m]))
/
sum(rate(payment_requests_total{service="{{args.service}}"}[5m]))
Feature flags decouple deploy from release: ship dark, release to staff, then 1%, then everyone; kill switches turn off non-critical features at peak. OpenFeature (CNCF incubating) is a vendor-neutral flag API with a Go SDK, so the provider can change without touching call sites. Rules: safe defaults when the flag service is down; a flag that changes money movement is a production change needing an approver and audit record; delete release toggles within weeks.
Platform engineering
The CNCF Platforms white paper lists the attributes of a good platform: platform as a product, user experience, documentation and onboarding, self-service, reduced cognitive load, optional and composable, secure by default.
Golden path. A developer picks "Go service" in Backstage (CNCF incubating); the template creates a repo with skeleton, CI, Kustomize overlays, SLOs, alerts and a runbook stub, registers the owner and wires Argo CD. The path is paved, not mandatory: leave it and you own what you build.
Measure adoption, not existence: share of services and deploys on the path, time from new service to first production deploy, environment provisioning time, tickets to the platform team, developer satisfaction, and DORA metrics on versus off the path. The 2024 DORA report found platforms raise productivity but can also lower throughput and change stability, so measure.
Avoid ticket ops. If the platform is a Jira queue where a central team hand-builds namespaces and firewall rules, you rebuilt the operations silo. Replace approvals with self-service APIs plus policy guardrails, and run the platform with a product manager and a roadmap.
Bank lens: continuous delivery under change control
ITIL 4 change enablement has three change types: standard (low risk, pre-authorised, known procedure), normal (authorised by a change authority, which need not be a CAB) and emergency (expedited, reviewed afterwards). The key move is to get the pipeline approved as a standard change model: all gates passed, independent review of the latest commit, no ledger schema change, canary with automatic rollback, inside the window, change record created by the pipeline. Ledger migrations, core-banking upgrades, firewall and HSM changes stay normal changes.
Segregation of duties in the pipeline: author ≠ approver (branch protection, CODEOWNERS); production changed only by pipeline identities, humans on recorded break-glass access; only signed images admitted; the chain ticket → commit → approval → attestation → change record → canary result retained.
Release windows guarantee staffing but batch changes. Middle path: daily business-hours windows for standard changes, freezes at month-end, year-end and Tết, dark deploys so the release is a flag flip. Drill "ship a fix while running on DR" too (see High Availability & Disaster Recovery).
SBV Circular 09/2020/TT-NHNN on information system security in banking took effect on 1 January 2021 and has been amended (Circular 50/2024/TT-NHNN repealed one article from 2025); verify the current text before citing it. It grades systems 1 to 5; customer-facing systems that cannot tolerate unplanned downtime are at least level 3.
| Requirement | Pipeline control |
|---|---|
| Art. 41: changes logged, planned, tested with recorded results, approved before applying, with a recovery plan; level 3+ assesses impact of version, OS, DBMS or middleware changes | PR template with rollout and rollback; required checks; approval gate; automatic rollback |
| Art. 13: for level 3+, separate people for development vs administration, development vs operations, administration vs operations, security audit vs all three | No production credentials for developers; operations approve promotion; security owns the policy repo |
| Art. 20: level 3+ production separated from dev and test, no development tools in it | Separate clusters or accounts; distroless images |
| Art. 40: no real production data for testing unless masked | Synthetic data in previews and staging |
| Art. 26: level 3+ logs online ≥ 3 months, centralised, backed up ≥ 1 year | Pipeline and audit logs shipped to central storage |
| Art. 52: run on the backup system ≥ 1 working day, yearly for level 4+, every two years for level 3 and below; notify the SBV IT Department ≥ 5 working days ahead | DR runbook and IaC for the DR site |
So "you build it, you run it" changes shape: the team owns code, pipeline, SLOs and diagnosis through read-only telemetry; the pipeline executes the change and an operations role approves it. Daily deploys remain possible.
E-commerce lens: freezes, load tests and game days
- Freezes start a week or two before 11.11: emergency fixes, pre-approved flag flips and capacity changes only. The cost is a risky post-event "thaw". Ship features early behind flags, keep a stricter path for small fixes (two approvers, longer canary), stagger releases afterwards.
- Load tests: a performance smoke on every release candidate; a full-scale test weeks ahead (Capacity Planning & Cost).
- Game days under peak-like load: roll back a bad canary; remove the flag service and check defaults hold; remove CI/CD and check that a documented manual path can ship an emergency fix.
Trade-offs
| Option | Strengths | Weaknesses | Choose when |
|---|---|---|---|
| Trunk-based with flags | Small batches, short lead time | Needs flag discipline and fast CI | Default for services you operate |
| Long-lived release branches | Several versions in the field | Merge pain, slow integration | Mobile apps, customer-installed software |
| CAB review of every change | Familiar to auditors | Big batches, rubber-stamping | Rare high-risk changes |
| Standard change via pipeline evidence | Daily deploys, stronger evidence | Upfront work to get it approved | Routine deploys of well-tested services |
| Central platform, golden paths | Lower cognitive load, consistent controls | Can become a bottleneck | More than a handful of teams |
| Fixed release windows | Staffing, predictability | Batching, slower recovery | Core-banking adjacencies, vendor systems |
In practice
DORA's open-source Four Keys project was archived in January 2024, so many teams compute the metrics from events exported by CI/CD, the GitOps controller and the incident tool:
package dora
import (
"slices"
"time"
)
type Deployment struct {
ID, Service string
FinishedAt time.Time
CommitTimes []time.Time // changes first shipped here; PR's first commit if squash-merged
Failed bool // needed rollback, hotfix or kill switch
Rework bool // unplanned fix for a production incident
}
type Incident struct {
DeploymentID string
StartedAt, RestoredAt time.Time // impact start; zero RestoredAt while open
}
type Report struct {
Deployments int
DeploysPerDay float64
MedianLeadTime, MedianRestore time.Duration
ChangeFailRate, ReworkRate float64
}
// Compute returns the metrics for one service over [from, to).
func Compute(service string, deps []Deployment, incs []Incident, from, to time.Time) Report {
var r Report
var leads, restores []time.Duration
var failed, rework int
inWindow := map[string]bool{}
for _, d := range deps {
if d.Service != service || d.FinishedAt.Before(from) || !d.FinishedAt.Before(to) {
continue
}
r.Deployments++
inWindow[d.ID] = true
for _, c := range d.CommitTimes {
leads = append(leads, d.FinishedAt.Sub(c))
}
if d.Failed {
failed++
}
if d.Rework {
rework++
}
}
for _, inc := range incs {
if inWindow[inc.DeploymentID] && !inc.RestoredAt.IsZero() {
restores = append(restores, inc.RestoredAt.Sub(inc.StartedAt))
}
}
if days := to.Sub(from).Hours() / 24; days > 0 {
r.DeploysPerDay = float64(r.Deployments) / days
}
if r.Deployments > 0 {
r.ChangeFailRate = float64(failed) / float64(r.Deployments)
r.ReworkRate = float64(rework) / float64(r.Deployments)
}
r.MedianLeadTime, r.MedianRestore = median(leads), median(restores)
return r
}
func median(ds []time.Duration) time.Duration {
if len(ds) == 0 {
return 0
}
s := slices.Sorted(slices.Values(ds))
if n := len(s); n%2 == 0 {
return (s[n/2-1] + s[n/2]) / 2
}
return s[len(s)/2]
}
Write the hidden decisions into an ADR: recovery starts at impact (Four Keys started at the causing deploy), medians because one week-long incident dominates a mean, a kill switch counts as a failure, and a deployment is one service's production rollout, not a config sync. Rough starting targets for a bank's Go services: pre-merge checks under 10 minutes, commit to staging under an hour, at least weekly production deploys per service.
Common pitfalls
- A DevOps team as a new silo. Symptom: developers file tickets for every pipeline change; lead time unchanged.
- Rebuilding for production. Symptom: a production bug that staging cannot reproduce, because the binary differs.
- Metrics as targets. Symptom: deployment frequency doubles through empty redeploys while incidents stop being linked to deploys.
- CAB for everything. Symptom: weekly batches, Friday-night deploys, approvals given in 30 seconds.
- Ungoverned flags. Symptom: a flag flipped in an admin UI changes fee calculation with no approval or audit record.
- Platform as ticket ops. Symptom: environments take a week; teams build shadow pipelines.
- Freeze without exit plan. Symptom: the first deploy after 11.11 carries three weeks of changes and causes the incident.
Interview angle
- Prompts: "Monthly to daily releases under a CAB?", "Is our platform working?", "How do you deploy during 11.11?"
- A strong answer: trunk plus merge queue; build once, promote by digest; layered tests; SLO-based canary with automatic rollback; flags; DORA trends per service; SoD in Git and pipeline; the standard-change argument; the Circular 09 controls.
- Follow-ups: "What counts as a failed deployment?", "Canary without enough traffic?", "Who approves a promotion at 02:00?", "What does AI-generated code change?"
- Red flags: "we'll buy a DevOps tool"; rebuilding per environment; developers with production admin rights in a bank; ranking teams by DORA metrics.
Self-check
1. Name the five DORA metrics, their grouping, and one way each gets gamed.
Throughput: change lead time (measured from merge), deployment frequency (empty redeploys), failed deployment recovery time (incidents closed early). Instability: change fail rate (rollbacks not recorded), rework rate (hotfixes relabelled). Pairing the two groups limits gaming; bonuses invite it.
2. What did the 2025 DORA report find about AI, and what should an architect do?
AI adoption now goes with higher throughput but still lower stability: it amplifies existing strengths and dysfunctions. Invest in the outer loop (review, reliable tests, merge queue, canary, rollback) and track instability next to throughput.
3. Why build once and promote the digest?
A rebuild can resolve different dependencies, so production runs something untested and the evidence chain breaks. A signed digest guarantees identity and lets admission verify provenance.
4. How would you design canary analysis for a payment service, and when does it fail?
Shift traffic in steps, compare canary with stable on SLO-derived SLIs plus payment success rate, roll back automatically. It fails for low traffic, bugs in rare segments and irreversible side effects; use longer steps, synthetic traffic, blue/green or targeted flags.
5. Scenario: a bank's weekly CAB approves every deploy. How do you reach daily deploys without weakening control?
Propose an ITIL 4 standard change model: deploys passing automated gates, with independent review, no ledger schema change and canary with automatic rollback, are pre-authorised; the pipeline creates the change record. Show it meets Circular 09/2020 Art. 41 and 13 better than a meeting, start with one low-risk service, and report change fail rate to the CAB.
6. What does Circular 09/2020's separation of duties mean for "you build it, you run it"?
For level 3+ systems, development, administration, operations and security audit are different people. The team owns code, pipeline, SLOs and read-only diagnosis; the pipeline executes production changes, an operations role approves them, and developers hold no production credentials.
7. How do you tell whether an internal developer platform is succeeding?
Adoption and outcomes: share of services and deploys on the golden path, time to first production deploy, tickets per team, satisfaction, DORA metrics on versus off the path. Rising tickets and shadow pipelines mean ticket ops.
Exercise
Design the delivery system for "PayHub", a Go payment gateway at a Vietnamese bank: 12 services, 3 teams, monthly releases through a weekly CAB, level 3 systems.
- Draw the pipeline from PR to production, including promotion PR, canary and rollback.
- Write the one-page standard change model: entry criteria, automated evidence, what stays a normal change.
- Map Circular 09/2020 Art. 13, 20, 26, 40, 41 and 52 to a control and an evidence artifact.
- Write an AnalysisTemplate for the authorisation service, including the night-time low-traffic window.
- Test the Go
dorapackage with a month of synthetic events and add weekly trend buckets.
Done when: a reviewer can trace one change from ticket to canary result, every Circular 09 row has a control and evidence, and go test -race passes.
Further reading
- Accelerate — Nicole Forsgren, Jez Humble, Gene Kim (2018). The research behind DORA.
- The DevOps Handbook (2nd ed.) — Gene Kim, Jez Humble, Patrick Debois, John Willis, Nicole Forsgren (2021).
- Continuous Delivery — Jez Humble, David Farley (2010). Deployment pipelines.
- Team Topologies — Matthew Skelton, Manuel Pais (2019).
- Site Reliability Engineering (2016) and The Site Reliability Workbook (2018) — Google.
- DORA metrics guide: https://dora.dev/guides/dora-metrics/ and history: https://dora.dev/insights/dora-metrics-history/
- Google Cloud, "Announcing the 2025 DORA report": https://cloud.google.com/blog/products/ai-machine-learning/announcing-the-2025-dora-report
- Google Cloud, "Introducing DORA's inaugural AI Capabilities Model": https://cloud.google.com/blog/products/ai-machine-learning/introducing-doras-inaugural-ai-capabilities-model
- CNCF Platforms white paper: https://tag-app-delivery.cncf.io/whitepapers/platforms/
- Argo Rollouts analysis: https://argo-rollouts.readthedocs.io/en/stable/features/analysis/
- State Bank of Vietnam, Circular 09/2020/TT-NHNN (check amendments).
Related
- Cloud-Native, Kubernetes & Deployment Strategies — rollout strategies, GitOps basics, secrets.
- Observability & SLOs — the SLIs canary analysis depends on.
- High Availability & Disaster Recovery — DR drills the pipeline must support.
- Capacity Planning & Cost — load tests and peak-event playbooks.
- Building Production Services — health checks and shutdown that make deploys safe.
- Code Review & Engineering Standards — the review half of maker-checker.
- Zero-Downtime Schema Migrations — the database side of frequent deploys.
- DevSecOps & Software Supply Chain Security — signing, SBOMs, SLSA, admission.
Do the self-check first. Marking it complete schedules spaced reviews (1, 3, 7, 14, 30… days).