Lesson 1 — DevOps, Platform Engineering & the Delivery Lifecycle
Course: DevOps & Platform Engineering (devops) · Group: Data Engineering
Workplace: Northline (illustrative synthetic organisation)
Assumed environment: Ubuntu 22.04 LTS (illustrative); GitHub Actions used as one CI/CD example — concepts apply to GitLab CI, Jenkins, Tekton, Buildkite, and others
Status: approved
Learning objectives & deliverable
By the end of this lesson you will be able to:
- Define DevOps, Continuous Integration, Continuous Delivery, and Continuous Deployment, and explain the difference between the last two.
- Describe the four DORA metrics and explain what each measures.
- Explain platform engineering, Internal Developer Platforms (IDPs), and golden paths.
- Identify process theatre and distinguish it from genuine delivery improvement.
- Map a change from developer commit to production using the four-stage lifecycle: code → build/integrate → stage → release/deploy.
Deliverable: A one-page delivery lifecycle diagram for a fictional Northline service, annotated with DORA metric collection points and two golden-path services. Create it in any diagramming tool (draw.io, Excalidraw, pen-and-paper photo) and submit it for teacher review.
Prerequisites
| Concept | Where to learn it |
|---|---|
| Version control basics (clone, commit, push, branch) | Git Foundations #git1–#git4 |
| Basic command-line navigation | Lesson 2 — Linux & Bash #devops2 (covered next) |
| Software development lifecycle general awareness | General professional knowledge |
No cloud account or paid service is required for this lesson. All illustrative commands target Ubuntu 22.04 LTS unless otherwise noted.
Lesson opener
In one line: DevOps joins development and operations into one continuous flow, and platform engineering makes that flow self-service for every team.
Why it matters: Organisations that ship software slowly lose customers and data trust to those that ship daily. DORA research shows elite performers deploy multiple times per day with change-failure rates below 5 %. Understanding the machinery behind that speed is the first skill in this course — without it, every subsequent lesson on pipelines, bash, Git workflows, and quality gates lacks context.
Before this lesson: Basic version-control literacy from Git Foundations #git1–#git4. Lesson #devops2 covers the Linux skills you will use to execute pipeline steps hands-on.
Northline's data engineering team has just absorbed responsibility for three new streaming pipelines. Leadership has asked the team to reduce the time from "code merged" to "running in production" from the current three weeks to under 48 hours. The platform engineering squad has been tasked with building the scaffolding — the golden paths, the IDP portal, and the automated guardrails — that will make that target reachable without each team having to build their own deployment tooling from scratch. This lesson explains the vocabulary, metrics, and principles you need to contribute to and reason about that work.
1. Plain English: what is DevOps?
DevOps is a set of practices, cultural norms, and tooling patterns that shortens and stabilises the cycle from a developer writing code to that code running reliably in production. The name fuses "development" and "operations" to signal that the two disciplines should work together continuously rather than hand off over a wall.
Three things define DevOps in practice:
- Shared responsibility — the team that writes the code also participates in operating it (on-call rotation, runbooks, dashboards). There is no separate "operations" team that takes finished code and figures out how to run it.
- Automation — manual steps (test runs, environment provisioning, deployments, secret rotation) are replaced by scripts and pipelines that run identically every time.
- Feedback loops — build results, test outcomes, error rates, and deployment frequency are surfaced quickly so teams can detect and improve problems while they are still small.
DevOps is not a job title, a product, or a separate department. Creating a team called "the DevOps team" and routing infrastructure tickets to it from other teams recreates the same wall in a new location. That is one of the clearest early warning signs of process theatre (§6).
2. CI, Continuous Delivery, and Continuous Deployment
These three terms are frequently conflated, even in job descriptions and vendor marketing. They are distinct, ordered maturity stages.
2.1 Continuous Integration (CI)
Every developer merges their code to a shared branch frequently — at minimum daily, ideally after every meaningful unit of work. Each merge automatically triggers a build and test run. The goal is to detect integration problems within minutes rather than after weeks of parallel development diverge into an unmergeable state.
What "integration" means: If two developers change the same module separately for three weeks and then try to combine the work, they may discover deep incompatibilities that take days to untangle. CI forces that reckoning continuously, keeping incompatibilities small.
Illustrative assumption: This course uses GitHub Actions as one example CI system. Concepts apply equally to GitLab CI, Jenkins, Tekton, Buildkite, CircleCI, and others. No specific product is assumed to be in use at Northline.
2.2 Continuous Delivery (CD — Delivery)
The pipeline automatically builds, tests, and packages the artefact so that a human can deploy to production at any time by pressing a button or approving a promotion. The key word is can — human approval gates remain in place. Every successful merge to the main branch produces a deployable artefact that is proven safe by automated checks.
2.3 Continuous Deployment (CD — Deployment)
Every change that passes all automated checks is automatically deployed to production without human intervention. This is a higher maturity level and requires exceptional test coverage, feature flags for gradual rollout, and robust automated rollback mechanisms. Not every organisation or service type targets this level.
| Stage | Automated? | Human approval? | Typical prerequisite |
|---|---|---|---|
| CI | Build + test | None | Short-lived feature branches, fast test suite (< 10 min) |
| Continuous Delivery | Build + test + package | Yes, before production deploy | Staging environment, meaningful test gates |
| Continuous Deployment | Build + test + package + deploy | None for production | High test coverage, feature flags, auto-rollback, strong monitoring |
Northline is currently at Continuous Delivery: pipelines run automatically for every PR and merge, but a senior data engineer approves each production deployment through the platform portal. The team's 48-hour target is achievable at the Delivery maturity level.
3. Platform Engineering and Internal Developer Platforms
Platform engineering is the discipline of building and maintaining Internal Developer Platforms (IDPs): curated, self-service toolchains that product teams use to build, test, deploy, and operate services without needing to understand every underlying infrastructure detail.
3.1 Why IDPs exist
Before platform teams, each product team typically:
- Wrote its own Dockerfile and Kubernetes manifests from scratch, often with security misconfigurations.
- Configured its own CI pipeline with different conventions, secret handling patterns, and test structures.
- Managed secrets in ad-hoc ways (environment variables, hard-coded strings, shared password documents).
- Spent 20–40% of engineering time on undifferentiated infrastructure work that delivered no direct business value.
Across ten teams, that is ten slightly different Dockerfiles, ten slightly different pipelines, and ten slightly different secret patterns — none of them reviewed by a security specialist. An IDP replaces that duplication with shared, maintained golden paths.
3.2 Golden paths
A golden path is a recommended, pre-paved route for doing common tasks — creating a new service, adding a managed database connection, onboarding a new deployment target, rotating secrets. It is:
- Opinionated: one default way to do the common case, chosen by the platform team for security, observability, and operability.
- Extensible: teams can deviate from the golden path when genuinely necessary, but the deviation is explicit, documented, and auditable.
- Maintained: the platform team keeps it updated when the underlying infrastructure changes. Product teams do not need to track every Kubernetes API deprecation or container registry migration.
At Northline, the golden path for a new Kafka consumer service is:
# Illustrative CLI — not a real product command
platform new-service --type kafka-consumer --name stream-processor- The CLI scaffolds a repository with a Dockerfile, a CI workflow, a Helm chart, and a Prometheus metrics endpoint already wired.
- The developer pushes a commit; the pipeline deploys to staging automatically.
- The developer raises a pull request for production promotion; a senior engineer approves in the platform portal.
The developer never writes a Kubernetes manifest from scratch. They do not know which Kafka broker address to use — that is injected securely at runtime.
3.3 Self-service and cognitive load
Self-service means product teams can provision environments, rotate secrets, scale services, inspect deployment history, and roll back releases without filing a ticket with the platform team. The platform team's job shifts from doing those things on behalf of others to building and improving the systems that let others do them safely and correctly.
This deliberately reduces cognitive load on product teams — they do not need to hold the entire infrastructure mental model in their heads to ship a feature. The platform handles the "how to run it safely" layer; the product team handles the "what it should do" layer.
4. DORA Metrics
The DevOps Research and Assessment (DORA) programme identified four metrics that distinguish high-performing software delivery organisations from low-performing ones. They are the standard vocabulary for measuring delivery health.
| Metric | What it measures | Elite benchmark* |
|---|---|---|
| Deployment Frequency | How often code is deployed to production | Multiple times per day |
| Lead Time for Changes | Time from first commit to running in production | Less than one hour |
| Change Failure Rate | Percentage of deployments that cause a production incident or require remediation | 0–5 % |
| Time to Restore Service | How long it takes to recover from a production incident | Less than one hour |
\* Benchmark bands are published annually by DORA/Google. Check the current DORA State of DevOps report for updated figures. Numbers in this table are illustrative of "elite" tier at time of writing and are environment-dependent.
4.1 Reading the metrics as a system
A team that deploys 50 times per day but has a 30 % Change Failure Rate is not performing well — it is breaking production constantly and recovering from it quickly. The metrics are a system: a healthy delivery organisation needs all four in acceptable ranges simultaneously. Optimising one at the expense of another produces a misleading picture.
Common anti-pattern: a team measures only Deployment Frequency (easy to game by merging trivial commits) while ignoring Change Failure Rate and Time to Restore.
4.2 Where metrics are collected in the lifecycle
- Deployment Frequency: counted at the production deployment event in the pipeline.
- Lead Time for Changes: timestamp of the first commit to the feature branch versus timestamp of the completed production deployment.
- Change Failure Rate: incidents or rolled-back deployments flagged within a post-deploy observation window (commonly 24–72 hours, depending on the service's traffic patterns).
- Time to Restore Service: timestamp when the incident was opened versus when production was confirmed healthy.
Northline collects these via a lightweight webhook from the deployment pipeline that writes events to a PostgreSQL table. A Grafana dashboard surfaces the four metrics per service. This is one illustrative approach; tooling options vary.
5. The Delivery Lifecycle — End-to-End Walkthrough
This section traces a single change from a developer's workstation to Northline's production environment. Think of this as the annotated map you will navigate in detail across subsequent lessons.
Stage 1 — Code
Who: Developer on the data-ingestion team.
What: Adds a new Kafka consumer configuration option to the northline-stream-processor service.
Repository: github.com/northline-internal/stream-processor (private; illustrative — do not attempt to access).
Branch strategy: Feature branch off main; trunk-based development covered in #devops3.
The developer writes the change, writes or updates unit tests, and opens a pull request. The PR description links to the Northline Jira ticket (illustrative ticket system) and summarises what changed and why.
Stage 2 — Build & Integrate
Trigger: Developer pushes to the feature branch; PR is opened.
Automated steps (GitHub Actions — one illustrative option):
- Lint and static analysis.
- Unit tests with coverage threshold.
- Container image build (to confirm the Dockerfile is valid).
- Dependency vulnerability scan.
Full detail on CI quality gates is in Lesson 4 — Continuous Integration & Quality Gates #devops4.
Service owner: The platform team owns the pipeline template and the quality gate thresholds. The application team owns the code, the test suite, and the responsibility to keep the pipeline green.
Stage 3 — Staging Deploy
Trigger: All CI checks pass; pull request is approved by a peer reviewer and merged to main.
Automated steps:
- Build final container image, tagged with the Git commit SHA.
- Push image to Northline's internal container registry.
- Deploy to
stagingenvironment via Helm upgrade (illustrative; other tools exist). - Run smoke tests against the staging endpoint.
Environment assumptions: dev, staging, production are three Kubernetes namespaces (illustrative). Real production topologies vary significantly — separate clusters, separate cloud accounts, regional deployments.
Stage 4 — Production Promotion
Trigger: Senior data engineer reviews staging metrics and approves in the platform portal.
Automated steps:
- Deploy the same image (same SHA — no rebuild) to the
productionnamespace. - Canary traffic ramp: 10 % → 50 % → 100 % over 15 minutes (illustrative; exact ramp parameters are environment-specific).
- Automated rollback if error rate exceeds threshold during ramp.
- Platform webhook fires; DORA metrics record Deployment Frequency +1 and Lead Time end-timestamp.
Security controls: Production deployment requires approval from a team member with the prod-approver platform role. Runtime secrets are injected from a secrets manager (specific product not assumed). No secrets reside in the container image or repository.
Monitoring evidence: Grafana dashboard shows latency, error rate, and throughput before and after deploy. The approver reviews this dashboard as part of the promotion decision.
6. Process Theatre
Process theatre is the performance of DevOps practices without their substance. It produces the appearance of agility — the ceremonies, the tools, the dashboards — while the underlying delivery problems remain.
6.1 Common examples
| Theatre | Substance it mimics | Diagnosis signal |
|---|---|---|
| CI pipeline exists but failures are routinely ignored | Continuous Integration | Developers merge despite red pipelines; manual deploys bypass the gate |
| "DevOps team" receives and works tickets from developers | Self-service operations | Lead Time does not improve despite tooling investment |
| Retrospectives are held but findings are never acted on | Feedback loops | Same failure modes recur across multiple retro cycles |
| Deployment Frequency metric counts staging deploys, not production | DORA measurement | Change Failure Rate and Time to Restore are never measured |
| Sprint demos show pipelines running; actual production deploys are monthly | Continuous Delivery | Actual lead time to production remains weeks |
| Incident post-mortems are written but never reviewed again | Learning culture | Identical incidents repeat within three months |
6.2 How to spot it in a team you have joined
Ask three questions:
- What is the actual lead time (not the theoretical pipeline time) for the last five changes that reached production? Pull the git log and the deployment events and measure.
- When was the last manual deployment that bypassed the pipeline? Check the deployment portal audit log.
- What happened the last time the pipeline failed? Did the team fix the pipeline, or did they merge anyway?
Answers that contradict each other (fast in theory, slow in practice; green pipelines, broken production) are reliable indicators of theatre.
Worked Example A — Northline Stream Processor Lifecycle Annotation
Context: The stream-processor service receives Kafka events, applies transformations, and writes enriched records to a data lake.
Business objective: Reduce time from feature merge to production from 3 weeks to 48 hours to support faster iteration on data quality rules.
Delivery lifecycle annotation:
| Stage | Tooling (illustrative) | DORA metric collected |
|---|---|---|
| Code | GitHub, VS Code, pre-commit hooks | Lead Time: clock starts at first commit |
| Build + Test | GitHub Actions | — |
| Staging deploy | Helm + Kubernetes (staging namespace) | — |
| Production approve + deploy | Platform portal + Helm (production namespace) | Lead Time: clock stops; Deployment Frequency +1 |
| Post-deploy monitoring | Grafana + Prometheus | Change Failure Rate (if incident raised); Time to Restore (if incident) |
Golden path used: platform new-service --type kafka-consumer — developer skipped writing Kubernetes manifests and Prometheus configuration.
Security control evidence: Vault secret injection logged in platform audit trail. Pre-commit hook blocks commits containing strings matching known secret patterns. Covered in #devops3.
Worked Example B — Internal Report-Export Service (Contrast)
Northline also runs a report-exporter service that generates PDF summaries on a schedule and uploads them to object storage. This is in the same data engineering group but has a different delivery profile.
Differences from stream-processor:
| Dimension | stream-processor | report-exporter |
|---|---|---|
| Deployment frequency | ~6 times/week (feature work) | ~1 time/week (mostly config changes) |
| Golden path | --type kafka-consumer | --type scheduled-job |
| Canary strategy | Traffic-weighted split | Blue-green (old job stops; new job starts) |
| Rollback mechanism | Drop canary weight to 0 %; prior pod set resumes | Platform portal "rollback" button restarts previous CronJob image |
| Key DORA risk | Change Failure Rate (data quality regressions are subtle) | Lead Time (infrequent deploys hide stale dependencies) |
This example shows the IDP serving different service shapes without product teams needing different skill sets.
Failure Scenario — CI Pipeline Abandonment
Symptom: Developers on the data team commit directly to main and deploy manually. The GitHub Actions pipeline is green but ignored.
Diagnosis steps:
- Check pipeline run history: are failures persistent or flaky?
- Interview developers: is the test suite slow (> 10 minutes end to end)?
- Check branch protection rules: is direct push to
mainallowed? - Check deployment portal audit log: what fraction of production deploys originate from pipeline events vs. manual approvals?
Root cause (in this scenario): The unit test suite grew to 18 minutes. Developers stopped waiting and bypassed the pipeline. Lead Time appeared short but Change Failure Rate climbed from 3 % to 14 % because the dependency vulnerability scan was being skipped.
Correction:
- Profile the test suite; move slow integration tests to a separate nightly workflow.
- Keep the PR-gate workflow under 5 minutes with fast unit tests only.
- Enable branch protection: require status checks to pass before merge, require at least one approving review.
- Surface the 5-minute pipeline time prominently in the PR interface; developers who see "3 min 47 sec" are far more likely to wait than those who see "17 min 22 sec".
Prevention: Set a pipeline time budget (e.g., PR gate must complete in < 5 minutes) enforced as a threshold in the pipeline configuration. If the suite grows beyond 5 minutes, the build itself fails with a diagnostic message. Covered further in #devops4.
Validation: Run 10 consecutive PRs through the pipeline. Confirm: (a) pipeline time < 5 minutes, (b) no direct commits to main in the past 7 days (check git log --first-parent main --since="7 days ago" --format="%h %an %s" — covered in #devops3), (c) Change Failure Rate returns below 5 % over the next two-week window.
Guided Practice
Task: Map the delivery lifecycle for a hypothetical Northline service called northline-anomaly-detector. It is a Python service that runs as a Kubernetes Deployment, consumes a metrics stream from Prometheus, and fires alerts to a Slack webhook (illustrative — Slack is one notification option; no credentials are provided here) when anomalies are detected.
Scaffold questions:
- Identify the four lifecycle stages for this service.
- For each stage, name: (a) who is responsible, (b) what automated steps should run, (c) which DORA metric (if any) is collected at this point.
- Identify one golden-path benefit this service would get from the Northline IDP.
- Identify one risk of process theatre specific to this service and explain how you would detect it with a concrete, measurable check.
Full solution:
| Stage | Responsible | Automated steps | DORA metric |
|---|---|---|---|
| Code | Developer | Commit, pre-commit lint | Lead Time: clock starts |
| Build + Test | CI (pipeline) | Lint, unit tests with alert-logic coverage, container build, dep scan | — |
| Staging deploy | Platform (automated) | Helm upgrade to staging namespace, smoke test against test metrics endpoint | — |
| Production promote | Senior engineer approves; platform deploys | Deploy same SHA image, health check, Prometheus alert rule reload | Lead Time: clock stops; Deployment Frequency +1 |
Golden-path benefit: platform new-service --type kubernetes-deployment template includes a Prometheus scrape annotation, a default Horizontal Pod Autoscaler, and a PodDisruptionBudget — all pre-configured and security-reviewed.
Process theatre risk: The anomaly detection logic is probabilistic. A developer might mark a test as passing when it fires on 60 % of anomaly fixtures rather than 95 %, then claim "the pipeline is green." Detection: add an explicit coverage assertion to the test suite that fails if anomaly-detection precision/recall on the test fixture set falls below a defined threshold. Make this threshold visible in the pipeline summary output so reviewers can see it without digging into logs.
Independent Practice
Task: Review the following fictional team-lead statement and identify every process theatre indicator it contains. Write one paragraph per indicator explaining which DORA metric it most damages and what a concrete, actionable fix looks like.
"We run our CI pipeline on every PR — it's very thorough and takes about 45 minutes. We deploy to production every two weeks in a scheduled release window, but we always make sure the pipeline is green first. Our change failure rate last quarter was 18 %, but most of those were caught in staging, so they didn't really affect customers. We have a DevOps team that handles all the deployment stuff so developers can focus on features."
Acceptance criteria:
- Minimum four process theatre indicators identified.
- Each indicator linked to a named DORA metric.
- Each fix is specific and actionable — not "improve the process" but "do X to achieve Y."
- No invented tooling, credentials, or compliance certifications referenced.
(Reference indicators: 45-minute pipeline → undermines CI fast feedback, increases Lead Time; bi-weekly release window → suppresses Deployment Frequency, inflates Lead Time; reclassifying staging failures → games Change Failure Rate measurement; separate "DevOps team" handling deployments → recreates the wall, bottlenecks Lead Time and Deployment Frequency.)
Common Mistakes
- Conflating Continuous Delivery with Continuous Deployment. These are different maturity levels with different risk profiles. In a conversation or interview, using them interchangeably signals imprecision. Delivery = human can deploy; Deployment = human approval not required.
- Treating DORA metrics as targets to game rather than signals to understand. Optimising Deployment Frequency by merging trivial or empty commits daily to hit a number produces impressive metrics and zero delivery improvement.
- Assuming the platform team is a "DevOps team" that runs deployments for others. Platform teams enable self-service; product teams own their deployment lifecycle.
- Assuming golden paths are mandatory rails with no escape. They are recommended defaults. The ability to deviate — explicitly, with documentation — is what makes them useful rather than bureaucratic.
- Measuring Lead Time from PR creation rather than first commit. DORA defines lead time from when the developer first committed code, not when the PR was opened. PR creation can be artificially delayed or rushed; first commit is harder to game.
- Assuming Continuous Deployment is always the goal. Some services (compliance-governed systems, safety-critical systems) should remain at Continuous Delivery. The appropriate maturity level depends on the risk tolerance and regulatory context of the service.
Five Quick Checks
Q1. What is the difference between Continuous Delivery and Continuous Deployment?
A1. Continuous Delivery means every change is automatically prepared for production and a human decides when to deploy it. Continuous Deployment means every change that passes automated checks is deployed to production automatically without human intervention.
Q2. Name the four DORA metrics.
A2. Deployment Frequency, Lead Time for Changes, Change Failure Rate, Time to Restore Service.
Q3. What is process theatre? Give one concrete example.
A3. Process theatre is the performance of DevOps practices without their substance — the appearance of agility without the corresponding improvement in lead time, failure rate, or recovery time. Example: a CI pipeline that always shows green because tests were removed to make it pass faster.
Q4. What is a golden path and what makes it different from a mandatory standard?
A4. A golden path is a pre-paved, opinionated, maintained route for doing common tasks. It differs from a mandatory standard because teams can deviate when genuinely needed — the path is recommended, not enforced; deviations should be explicit and documented.
Q5. A team's Deployment Frequency is 20 times per day and Lead Time is 45 minutes. Their Change Failure Rate is 24 % and Time to Restore is 6 hours. Assess their delivery health.
A5. The speed metrics are excellent but the quality metrics indicate a serious problem: one in four deployments causes a production incident, and recovery takes 6 hours. Deploying broken changes quickly is worse than deploying slowly. All four metrics must be healthy simultaneously.
Quiz Alignment
| Objective | Quick Check | Practice task |
|---|---|---|
| Define CI, CD (Delivery), CD (Deployment) | Q1 | Guided practice — build stage |
| Name and explain DORA metrics | Q2, Q5 | Guided practice — DORA column |
| Explain platform engineering and IDPs | — | Worked Example A & B |
| Explain golden paths | Q4 | Guided practice — golden-path row |
| Identify process theatre | Q3 | Independent practice |
| Map end-to-end delivery lifecycle | — | Guided practice diagram, Deliverable |
Lesson Takeaways
- DevOps is a practice of shared ownership, automation, and fast feedback — not a job title or a department.
- CI, Continuous Delivery, and Continuous Deployment are distinct, ordered maturity levels. Conflating them causes miscommunication and misplaced investment.
- Platform engineering builds IDPs and golden paths to remove duplicated infrastructure work and reduce cognitive load on product teams.
- DORA's four metrics are a system: Deployment Frequency, Lead Time, Change Failure Rate, and Time to Restore must all be healthy. Speed without reliability is not performance.
- Process theatre is real, measurable, and prevalent. Detect it by asking for actual lead times, actual failure rates, and what happens when the pipeline goes red.
Bridge to Next Lesson
In Lesson 2 — Linux & Bash Command-Line Operations (#devops2), you will learn the command-line skills that underpin the environments CI/CD pipelines build and run inside: navigating filesystems, inspecting processes, filtering logs with pipes and grep, writing basic shell scripts, safely using curl and archives, and understanding exit codes. These are the hands-on execution skills — the tools a data engineer reaches for when reading a pipeline failure log, tailing a container's output, or extracting a deployment artefact. They complement the principles introduced here.