devops.download

Troubleshooting labs, ready to download.

Download a break-fix exercise, inspect the installer, and investigate the failure in your own environment.

Browse lab downloads
Portable cases of server equipment and network cables
Tools for hands-on investigation.

Available lab bundles

Choose an archive or inspect its installer before running it. Each lab includes setup, verification, and teardown scripts.

aiops / AIOps anomaly detection

The anomaly that was not an incident

A learned latency baseline reports an extreme anomaly even though the service is healthy. Investigate the telemetry pipeline and restore a meaningful alert.

aiops-01-telemetry-unit-drift.tar.gz
Read lab README

The false anomaly

A latency detector flags a supposedly extreme incident, but the source measurement is normal. Trace the synthetic telemetry from source to detector and restore meaningful detection.

The detector fits a simple linear regression to a small synthetic history and compares positive latency residuals with a threshold based on training residuals. This is an illustrative statistical AIOps exercise, not a production monitoring system or a generative AI model.

Before you begin

Use a disposable local environment with Bash, Python 3, Docker and Docker Compose. The first run may download a Python image. It uses no cloud account, real telemetry or external AI service, and publishes no host ports. Local Docker uses compute, disk and network bandwidth; a cloud-hosted Docker machine may incur charges.

The lab creates Compose project breakfix-aiops-01 and mounts this directory read-only in the container. Do not reuse the project name. Changes to the configuration remain on the host after teardown; re-extract the archive to reset the exercise.

Start the incident

Run ./setup.sh. It starts the detector and confirms the synthetic observation produces an alert. Inspect the event with docker compose -p breakfix-aiops-01 exec detector python /lab/client.py, then compare the reported observation with the source event and ingestion configuration.

Verify and clean up

After correcting the telemetry pipeline, run ./verify.sh. It checks that the original event is no longer a false alert, the historical baseline is unchanged, and an elevated latency still triggers an alert. Run ./teardown.sh to remove the lab container and network. Setup refuses to reuse an existing project, and teardown refuses containers belonging to a different directory.

View Markdown source ↗

aiops / Anomaly detection

The anomaly detector trained on an incident

A trained anomaly detector treats incident-like latency as normal. Investigate contamination in the training window and restore detection.

aiops-02-contaminated-baseline.tar.gz
Read lab README

The anomaly detector trained on an incident

The anomaly detector classifies an incident-like latency as normal. Investigate the training window and correct the baseline selection, rather than suppressing alerts or changing the observations.

Before you begin

Use Bash and Python 3.11 or later in a disposable local environment. Create a virtual environment and install the pinned model library:

LAB_VENV="$(mktemp -d)"
python3 -m venv "$LAB_VENV"
. "$LAB_VENV/bin/activate"
python -m pip install -r requirements.txt

Installing packages needs internet access. This exercise trains a real scikit-learn Isolation Forest on synthetic one-dimensional latency values. It does not contact an external AI service or consume real operational data.

Investigate
./setup.sh
cat baseline.csv
cat training-policy.json
python detector.py 225

Rows labeled incident belong to a known incident window; rows labeled healthy belong to the approved baseline. The labels are supplied incident records, not predictions made by the model. Change the training selection in training-policy.json while retaining the original dataset and detector. Each invocation trains a fresh deterministic model, so rerun the command after changing the policy.

./verify.sh
./teardown.sh

Verification checks the original dataset and policy and exercises healthy and incident-like observations that were not in the training data. The fixed synthetic scenario demonstrates contamination, not a production-ready alert: real baselines need representative data, validated labels, drift monitoring and evaluation before deployment. Teardown has no service or cloud resources to remove; deactivate and remove the temporary virtual environment separately when done.

View Markdown source ↗

aiops / Prometheus alerting

The alert that never stops firing

A real Prometheus alert treats a cumulative error counter as a current incident. Repair the PromQL and test it against healthy traffic, an error burst and a counter reset.

aiops-03-prometheus-counter-alert.tar.gz
Read lab README

The alert that never stops firing

A Prometheus alert fires on a cumulative error counter even after errors stop. Repair the rule so it detects recent bursts instead of the lifetime total.

Before you begin

Use Docker, Bash and Python 3 on a disposable machine. The lab runs the official Prometheus promtool in disposable containers with no network or host ports, using fixed synthetic series. Docker may download the image and uses local disk and compute. No live Prometheus server or real incident data is used. The tests illustrate a small alert contract, not production thresholds.

./setup.sh
./lab.sh

Inspect rules.yml and the test cases. Modify the alert expression in rules.yml, keeping the alert name and severity. It must remain quiet when the counter is stable, alert on a recent burst, and handle a counter reset. Do not change cases.yml or the test runner.

./verify.sh
./teardown.sh

Verification checks the original test fixtures and runs the actual Prometheus rule evaluator. Teardown does not remove the shared Docker image or edited files; re-extract the bundle to reset the incident.

View Markdown source ↗

aiops / Prometheus alerting

The missing target that raised no alert

A Prometheus alert notices a failed scrape but goes silent when its target disappears from the time series. Repair the rule and verify both conditions.

aiops-04-prometheus-missing-target.tar.gz
Read lab README

The missing target that raised no alert

A Prometheus rule detects up == 0, but stops alerting when the target's series disappears altogether. Detect both cases and keep healthy targets quiet.

Before you begin

Use Docker, Bash and Python 3 on a disposable machine. The lab runs the official Prometheus promtool in disposable containers with no network or host ports, using fixed synthetic series. Docker may download the image and uses local disk and compute. No live Prometheus server or real incident data is used. The tests demonstrate rule semantics, not an entire monitoring system.

./setup.sh
./lab.sh

Inspect rules.yml and the test cases. Extend the alert expression in rules.yml so it detects both a failed scrape and absence for five minutes. Keep the alert name and severity, and do not change cases.yml or the runner.

./verify.sh
./teardown.sh

Verification checks the original test fixtures and runs the actual Prometheus rule evaluator. Teardown does not remove the shared Docker image or edited files; re-extract the bundle to reset the incident.

View Markdown source ↗

apps / Kubernetes application

The application that keeps restarting

A locally deployed application repeatedly exits during startup. Inspect its logs and configuration to restore a healthy pod.

apps-01-restarting-pod.tar.gz
Read lab README

Restarting Kubernetes pod

A deployment in a disposable kind cluster cannot stay running after a configuration change. Investigate its previous logs and mounted configuration without changing the container image or startup command.

Before you begin

You need Bash, Python 3, Docker, kind and kubectl. Docker must be running; kind and the workload download images. Use a disposable machine and do not reuse the cluster name breakfix-apps-01 or its lab kubeconfig for other work.

Run and clean up

From this directory, run ./setup.sh. Use the printed kubeconfig and namespace breakfix-apps for investigation. After your changes, run ./verify.sh, then ./teardown.sh to remove the lab cluster and its kubeconfig.

View Markdown source ↗

apps / Kubernetes scheduling

The workload waiting for a node

A deployment's pod remains Pending because no eligible node satisfies its placement requirement. Investigate scheduler events and restore placement.

apps-02-pending-node-selector.tar.gz
Read lab README

The workload waiting for a node

A cache workload never leaves Pending. Its intended placement is the worker node of this disposable cluster. Investigate scheduler events and restore placement without changing the Deployment.

Before you begin

Use a disposable machine with Bash, Python 3, Docker, kind and kubectl. Docker may download the kind node and workload images. The lab creates a two-node cluster named breakfix-apps-02 and a separate kubeconfig and ownership record under ~/.kube; it does not modify your default kubeconfig or cloud resources. Do not use the lab cluster name for other work. Setup refuses to overwrite an existing cluster or files, and teardown checks the recorded node identities.

Investigate

Run ./setup.sh, then inspect the workload and nodes with the dedicated kubeconfig:

kubectl --kubeconfig "$HOME/.kube/breakfix-apps-02" -n breakfix-apps-02 get pods -o wide
kubectl --kubeconfig "$HOME/.kube/breakfix-apps-02" -n breakfix-apps-02 describe pod -l app=cache
kubectl --kubeconfig "$HOME/.kube/breakfix-apps-02" get nodes --show-labels

In this exercise the worker is the intended destination. Do not remove the workload's scheduling constraint or change its Deployment. After correcting the lab's node configuration, run ./verify.sh and ./teardown.sh. Teardown deletes the lab cluster and its two kubeconfig-related files only when the cluster's recorded node identities still match.

View Markdown source ↗

apps / Kubernetes application health

The running application that receives no traffic

A running web container stays unready and receives no Service traffic. Investigate its readiness probe without disabling health checks.

apps-03-readiness-probe.tar.gz
Read lab README

The running application that receives no traffic

The web container is running, but its Pod is not Ready and the Service has no ready backend. Find the cause without removing readiness or liveness checks, changing the application, or replacing the Service.

Before you begin

Use a disposable machine with Bash, Python 3, Docker, kind and kubectl. Docker may download the kind node and workload images. The lab creates the single-node cluster breakfix-apps-03, a separate kubeconfig and an ownership record under ~/.kube; it does not change your default kubeconfig or cloud resources. Do not reuse the lab cluster name. Setup refuses an existing cluster or files, and teardown checks its recorded node identity.

Investigate
./setup.sh
kubectl --kubeconfig "$HOME/.kube/breakfix-apps-03" -n breakfix-apps-03 get pods,service,endpoints
kubectl --kubeconfig "$HOME/.kube/breakfix-apps-03" -n breakfix-apps-03 describe pod -l app=probe-web
kubectl --kubeconfig "$HOME/.kube/breakfix-apps-03" -n breakfix-apps-03 exec deploy/probe-web -- wget -qO- http://127.0.0.1/

Inspect the probe in manifests.yaml, correct it, and apply the manifest with the dedicated kubeconfig:

kubectl --kubeconfig "$HOME/.kube/breakfix-apps-03" apply -f manifests.yaml
./verify.sh
./teardown.sh

Verification requires both probes, the original workload and Service, a ready endpoint belonging to the lab Pod, and a successful request through the Service. It does not claim to test production ingress, cloud networking or downstream dependencies. Teardown deletes only the cluster whose node matches the ownership record; it does not reset edited manifests.

The related probe guide and demonstration cover probe diagnosis; its video demonstrates liveness, while this lab focuses on readiness.

View Markdown source ↗

apps / Kubernetes application configuration

The healthy application serving old configuration

A healthy web Pod still serves an old release channel after its ConfigMap was updated. Trace the configuration from the Deployment to the running process.

apps-04-stale-config.tar.gz
Read lab README

The healthy application serving old configuration

The web Pod is Ready and its Service responds, but the response is an old release channel. The ConfigMap already contains the desired value. Trace the configuration to the running application and restore the expected response without changing the application, the Deployment's configuration reference, or the desired ConfigMap.

Before you begin

Use a disposable machine with Bash, Python 3, Docker, kind and kubectl. Docker may download the kind node and workload images. The lab creates the single-node cluster breakfix-apps-04, a separate kubeconfig and an ownership record under ~/.kube. It does not change your default kubeconfig or create cloud resources. Do not reuse the lab cluster name; setup refuses existing lab files or nodes and teardown checks the recorded node identity.

Investigate
./setup.sh
kubectl --kubeconfig "$HOME/.kube/breakfix-apps-04" -n breakfix-apps-04 get deployment,pods,service,configmap
kubectl --kubeconfig "$HOME/.kube/breakfix-apps-04" -n breakfix-apps-04 describe deployment channel-web
kubectl --kubeconfig "$HOME/.kube/breakfix-apps-04" -n breakfix-apps-04 get configmap app-settings -o yaml
kubectl --kubeconfig "$HOME/.kube/breakfix-apps-04" -n breakfix-apps-04 exec deploy/channel-web -- wget -qO- http://channel-web/

The values in this exercise are synthetic and not secrets. Do not print real Secret values when diagnosing production systems. Keep settings.yaml as the desired source of configuration; refreshing the workload in this disposable cluster is an operational action, not a substitute for reviewing changes in a production GitOps workflow.

After repair, run ./verify.sh and ./teardown.sh. Verification checks the desired ConfigMap, the original workload and Service, the ready endpoint, the running container's configuration and an HTTP response through the Service. Teardown deletes the cluster only when its node matches the ownership record.

The related Kubernetes inspection guide and demonstration cover inspecting Deployments, Services and configuration references; the demo does not depict this stale-environment scenario.

View Markdown source ↗

cloudops / Terraform

The Terraform plan with a missing input

A local Terraform plan cannot find a required input. Trace the variable configuration and restore a stable plan.

cloudops-01-terraform-variable.tar.gz
Read lab README

Terraform plan with a missing input

A Terraform configuration cannot plan because an expected input is missing. Investigate its variable declarations and input file, then restore a stable plan without changing the resource definition.

Before you begin

You need Bash, Python 3 and Terraform 1.4 or newer. This exercise uses local Terraform state and terraform_data; it does not create cloud resources or use cloud credentials.

Run and clean up

From this directory, run ./setup.sh, then inspect the plan in .lab-state with terraform -chdir=.lab-state plan -input=false. After your changes, run ./verify.sh and ./teardown.sh. Teardown removes the local lab state.

View Markdown source ↗

cloudops / Azure and Terraform

The Azure resource Terraform cannot create

Investigate an existing Azure resource group missing from Terraform state and safely bring it under management.

cloudops-02-azure-terraform-import.tar.gz
Read lab README

Azure Terraform import

This lab creates a real, uniquely named Azure resource group with Terraform, then removes it from local Terraform state without deleting it. An empty resource group normally has no direct charge, but Azure services and billing policies vary. Do not add resources to the group; unexpected contents block teardown. Use a disposable subscription with known safe guardrails.

Install Azure CLI, Terraform 1.5+, Python 3 and Bash on Linux. Log in and select the intended subscription. Microsoft.Resources must already be registered.

export AZURE_SUBSCRIPTION_ID="your-subscription-id"
./setup.sh "$AZURE_SUBSCRIPTION_ID" northeurope --accept-costs

Terraform's state and backups are private. Run from a private Linux filesystem, not a shared or world-readable mount. Setup refuses to overwrite an existing .lab-state; preserve it if setup fails. Review plans before applying them. Never import a real resource into a second active Terraform state.

terraform -chdir=.lab-state plan -input=false
./verify.sh
./teardown.sh

Teardown checks the generated name, ownership tag, Azure contents and Terraform state before importing a missing lab resource into the state and destroying it. It refuses to delete a group with resources in it. It keeps local state afterward; remove .lab-state only after independently confirming cleanup.

View Markdown source ↗

cloudops / Azure and Terraform

The unexpected Azure resource replacement

Investigate why a Terraform plan wants to replace an existing Azure resource group, and resolve the unexpected change without applying it.

cloudops-03-azure-terraform-replacement.tar.gz
Read lab README

Unexpected Azure resource replacement

This lab creates one uniquely named, empty Azure resource group with Terraform. A separate configuration input then makes a subsequent plan propose replacing that group. Investigate the plan and restore a no-change plan without applying the replacement. Terraform state and plans can contain sensitive data; keep them private. Never use this exercise against an existing resource.

An empty resource group normally has no direct usage charge, but Azure pricing and policies vary. Use an isolated subscription with known safe guardrails and remove lab resources promptly. Do not add any resources to the group: teardown refuses to delete a nonempty group.

Install Azure CLI, Terraform 1.5+, Python 3 and Bash on Linux. Log in and select the intended subscription. Microsoft.Resources must already be registered. Use a private local Linux filesystem for Terraform state.

export AZURE_SUBSCRIPTION_ID="your-subscription-id"
./setup.sh "$AZURE_SUBSCRIPTION_ID" northeurope --accept-costs
terraform -chdir=.lab-state plan -input=false

Do not apply the replacement plan. Inspect the plan and configuration inputs in .lab-state, then restore a no-change plan without replacing the group. Run ./verify.sh and ./teardown.sh; teardown checks the group's identity, ownership marker, contents and destroy plan. It retains private state afterward. Confirm the group is absent before removing .lab-state.

View Markdown source ↗

cloudops / Azure and Terraform

The locked Azure Terraform state

Investigate a genuine Azure Blob lease that prevents Terraform from locking its isolated remote state.

cloudops-04-azure-state-lock.tar.gz
Read lab README

Azure Terraform state lock

This lab provisions a uniquely named Azure resource group, storage account and private blob container with Terraform. A separate Terraform configuration uses one blob for remote state. The lab then deliberately acquires a real Azure blob lease, causing Terraform's next plan to fail to acquire its state lock.

This is a known lab-held lease, not a crashed Terraform process or a stale Terraform-generated lock. Release only the lease created by this exercise. Never disable locking, break leases or force-unlock an active production run. Do not add containers or blobs to the lab account. Teardown refuses unexpected resources or data, and removes the lab state blob and storage account.

Azure Storage and transactions can incur charges. Use an isolated subscription with known safe guardrails and clean up promptly. The storage endpoint is publicly reachable using account credentials, but anonymous blob access is disabled. The account key, Terraform state, plans and lease ID are sensitive; use a private Linux filesystem and never publish them.

Install Azure CLI, Terraform 1.5+, Python 3 and Bash on Linux. Log in and select the intended subscription. Microsoft.Resources and Microsoft.Storage must already be registered, and your identity must be able to read storage account keys. The Blob endpoint must be reachable.

export AZURE_SUBSCRIPTION_ID="your-subscription-id"
./setup.sh "$AZURE_SUBSCRIPTION_ID" northeurope --accept-costs
./lab.sh plan
./lab.sh status

Inspect the failure and the lab-owned holder before releasing it. Use ./lab.sh without arguments for the available lab-only commands, then run ./verify.sh and ./teardown.sh. Teardown releases only this lab's recorded lease and checks identity, contents and the Terraform destroy plan. It retains private state on failure and after cleanup; confirm the group is absent before removing .lab-state.

View Markdown source ↗

dataops / Data recovery

The data file overwritten in Azure

Investigate an overwritten dataset and test recovery from a real Azure Blob snapshot into a separate directory.

dataops-01-azure-blob-restore.tar.gz
Read lab README

Restore an Azure Blob snapshot

This exercise provisions a uniquely named Azure resource group, storage account and private blob container with Terraform. It uploads a small synthetic dataset, takes a real Azure Blob snapshot, then overwrites the current blob. Investigate and restore the original into a separate local directory; do not overwrite the source blob.

Azure Storage and transactions can incur charges. Use an isolated subscription with known safe guardrails and clean up promptly. The storage endpoint is publicly reachable using account credentials, but anonymous blob access is disabled. The account key, Terraform state and restored data are sensitive; use a private Linux filesystem and never publish them. Do not add other blobs, snapshots or containers: teardown refuses unexpected resources or data.

Install Azure CLI, Terraform 1.5+, Python 3 and Bash on Linux. Log in and select the intended subscription. Microsoft.Resources and Microsoft.Storage must already be registered, and your identity must be able to read storage account keys. The Blob endpoint must be reachable.

export AZURE_SUBSCRIPTION_ID="your-subscription-id"
./setup.sh "$AZURE_SUBSCRIPTION_ID" northeurope --accept-costs
./lab.sh

Inspect the current data and snapshot, then use the lab commands to download a snapshot into the clean private restore directory. Run ./verify.sh and ./teardown.sh. Verification compares recovered data with the original and checks that the overwritten source was not changed. Teardown destroys the lab blob, snapshot, container, account and group after checking their identities and contents; confirm the group is absent before removing .lab-state.

View Markdown source ↗

dataops / Backup integrity

The backup that succeeded without data

A restic backup reports success even though its source filesystem is missing. Investigate the empty snapshot and prevent false success.

dataops-02-restic-empty-backup.tar.gz
Read lab README

The backup that succeeded without data

The local job reports a successful restic snapshot, but the expected data is missing. Investigate the source and make the job fail when the source mount is absent. A valid mounted backup must still succeed and be restorable.

Environment

Use a disposable Linux environment with Bash, Python 3, restic and util-linux. The kernel must allow unprivileged user and mount namespaces. The exercise creates a local restic repository and synthetic data in .lab-state; do not put real data there. The repository password is deliberately public and is not suitable for real backups.

Bind mounts are made only inside a short-lived namespace, not on the host. No systemd units, host mount configuration, monitoring service or cloud resources are modified. The script models the backup step, not a systemd timer or heartbeat monitor. No elevated host privileges are required.

Investigate
./setup.sh
./lab.sh snapshots
./lab.sh contents
./lab.sh inspect
./lab.sh unmounted

Inspect backup.sh. Change that job so it refuses an unmounted source before creating a snapshot, but still backs up the real synthetic data when mounted:

./lab.sh mounted
./verify.sh
./teardown.sh

Teardown deletes only this lab's .lab-state after checking its ownership marker. It does not reset edits to backup.sh; re-extract the bundle to start over.

The opsbreakfix.com runbook and demo video show the same empty-source failure with a systemd service and timer. The video also covers monitoring cases outside this lab.

View Markdown source ↗

dataops / Backup monitoring

The failed backup that looked healthy

A synthetic backup failure refreshes a healthy heartbeat. Trace the monitoring signal and restore alerts for missing successful runs.

dataops-03-failed-backup-heartbeat.tar.gz
Read lab README

The failed backup that looked healthy

A monitoring evaluator reports a healthy backup, but the latest synthetic job failed and the last successful run is overdue. Diagnose how the evaluator selects its success heartbeat.

Before you begin

Use Bash and Python 3. This self-contained simulation does not run a real backup, timer, remote monitor or AI model. It uses synthetic events and fixed timestamps for repeatable results; it sends no data and creates no cloud resources.

Investigate
./setup.sh
cat events.json
cat policy.json
python3 monitor.py --events events.json --now 1601

The timestamps are seconds on a synthetic clock. A success heartbeat is overdue when it is more than 120 seconds old. Compare the selected heartbeat with each job's exit code. Fix the ingestion policy without changing the events, the freshness window or the evaluator.

./verify.sh
./teardown.sh

Verification checks the original incident and independent healthy, failed and missing-heartbeat examples. The evaluator reports stale success, not immediate job-failure notifications: a failure following a still-fresh success does not produce an immediate alert. A successful process can also back up an empty directory, so a real deployment still needs source checks and restore tests. Teardown has no services or cloud resources to remove; re-extract the bundle to reset the edited policy.

The related restic/systemd guide and recorded demonstration show real backup monitoring, not this simulation.

View Markdown source ↗

dataops / Backup integrity

The backup that hid a partial snapshot

A real restic backup cannot read one synthetic file, but its wrapper reports success. Correct the failure handling and verify a complete restore.

dataops-04-restic-partial-backup.tar.gz
Read lab README

The backup that hid a partial snapshot

A backup wrapper prints success, but one synthetic file is missing from the snapshot. Investigate restic's real exit status, correct the wrapper, and restore a complete snapshot without raising backup privileges.

Before you begin

Use a disposable Linux environment with Bash, Python 3, restic and util-linux (unshare and setpriv). Unprivileged user namespaces must be enabled. Work on a private Linux filesystem with normal Unix permissions; shared or mounted filesystems that ignore permission bits are unsuitable.

The lab creates a local restic repository and synthetic files in .lab-state. The fixed repository password is public and not suitable for real backups. Never put real data there. The backup runs in a user namespace with DAC override and read-search capabilities removed, so the unreadable file remains unreadable even when the lab is launched by root. No host mounts or system permissions are changed.

Investigate
./setup.sh
./lab.sh inspect
./lab.sh snapshots
./lab.sh contents

Compare the wrapper's success message with the actual restic status, then inspect backup.sh and the synthetic file permissions. Make the wrapper return a nonzero exit for every failed restic run, including a partial backup, and allow the lab user to read the file. Do not change the synthetic file contents or run with extra privileges.

./lab.sh backup
./verify.sh
./teardown.sh

Verification creates an additional partial snapshot while checking failure handling, checks a wrong-password failure, then creates a complete snapshot. It also tests how the wrapper handles simulated nonzero exit statuses. It restores that snapshot into a new temporary directory, compares both files, and runs restic check --read-data. Teardown removes the lab repository and synthetic data after checking the state marker and host mounts; configuration edits remain. Re-extract the archive to reset the exercise.

The related restore runbook and demo show a real partial restic backup and restore check. The lab uses an isolated namespace to make the permission failure reproducible.

View Markdown source ↗

dbops / PostgreSQL connections

The database with no room to connect

An application cannot connect to PostgreSQL even though the database is running. Investigate connection pressure and restore capacity.

dbops-01-postgres-connection-exhaustion.tar.gz
Read lab README

PostgreSQL connection exhaustion

The database process is running, but an application cannot establish a new connection. Investigate the active PostgreSQL sessions and restore capacity without changing the synthetic data.

Before you begin

Use a disposable local environment with Bash, Python 3, Docker and Docker Compose. The first run may download the PostgreSQL 17 Alpine image and needs disk space for the image and a small temporary database.

The lab uses Compose project breakfix-dbops-01, a private Docker network and a Docker volume. It publishes no host ports and does not access a cloud account. Database authentication is intentionally insecure for this isolated exercise; never use it for real data or reuse this Compose project name. Other containers with access to the Docker network or daemon may access the lab database.

Start the incident

Run ./setup.sh from this directory. The script waits for the connection failure to appear. Inspect the services with docker compose -p breakfix-dbops-01 ps and database activity with docker compose -p breakfix-dbops-01 exec db psql -U lab_admin -d lab.

Verify and clean up

After investigating and recovering access, run ./verify.sh. It checks the original synthetic data and simultaneous application connections. Run ./teardown.sh to remove this lab's containers, network and database volume, including all changes made within the exercise. Setup refuses to reuse an existing project. Teardown refuses containers associated with another working directory; do not override those checks.

Local Docker usage may consume compute, network bandwidth and disk space; cloud billing is not involved unless you choose to run Docker on a billable host.

View Markdown source ↗

dbops / PostgreSQL backup and recovery

The database restore with no rows

A PostgreSQL dump restores without errors, but the recovered database is empty. Investigate the archive and verify a complete restore.

dbops-02-postgres-empty-restore.tar.gz
Read lab README

The database restore with no rows

A PostgreSQL archive restored successfully into a scratch database, but the orders table has no rows. Investigate what the archive contains, then create and test a complete logical backup without changing the original database.

Before you begin

Use Docker with Compose, Python 3 and Bash on a disposable machine. The first run may download the PostgreSQL 17 image. The lab uses synthetic data, an internal Docker network and a named lab volume; it publishes no host ports. Authentication is deliberately insecure. Never use these settings or project name for real workloads. Other containers or users with Docker daemon access may access the lab database.

The project name breakfix-dbops-02 is reserved for this lab. Setup refuses to reuse existing project resources. Teardown verifies container ownership before removing the project's containers, network and database volume.

Investigate

Run ./setup.sh, then open a shell in the database container:

docker compose -p breakfix-dbops-02 exec db sh

The source database is lab, the scratch database is recovery, and the initial archive is /tmp/partial.dump. Connect with psql -U lab_admin. Compare the orders table in both databases and inspect the archive with pg_restore -l /tmp/partial.dump.

Create a complete PostgreSQL custom-format archive at /tmp/full.dump. Restore it into the separate recovery database, not over lab. Preserve the source and its data. Exit the container shell, run ./verify.sh, then run ./teardown.sh. Verification also restores the new archive into its own temporary database and checks its contents; teardown deletes the lab data.

The related restore guide and demo discuss checking restored data. Its video demonstrates a file restore, not this PostgreSQL exercise; the guide notes that its database commands were not run.

View Markdown source ↗

dbops / PostgreSQL locking

The PostgreSQL update waiting on a lock

A healthy PostgreSQL database accepts connections, but an application update times out waiting for a row lock.

dbops-03-blocked-transaction.tar.gz
Read lab README

The PostgreSQL update waiting on a lock

The database accepts connections, but the application update times out. Find the blocking transaction and restore access to the synthetic inventory row without changing its data or granting broader privileges.

Before you begin

Use a disposable machine with Bash, Python 3, Docker and Docker Compose. The lab creates breakfix-dbops-03, an internal Docker network and a named database volume. It publishes no host ports and creates no cloud resources. Docker may download PostgreSQL 17. Authentication is intentionally insecure; never use these settings or this project name for real workloads. Other users with Docker access can reach the lab database.

Setup refuses existing project resources. Teardown checks container ownership before deleting this lab's containers, network and database volume. The synthetic blocking transaction sleeps for up to one hour.

Investigate
./setup.sh
docker compose -p breakfix-dbops-03 ps
docker compose -p breakfix-dbops-03 exec db psql -X -U lab_admin -d lab

In the lab database, inspect pg_stat_activity, pg_locks and the inventory table. Compare the blocking session with the application role lab_writer. Investigate the timeout using a short lock_timeout; do not change the table or disable the application. This lab's blocker is disposable; in production, identify the owner and transaction impact before terminating a session.

After recovery, run ./verify.sh and ./teardown.sh. Verification checks the original rows and performs a bounded update as lab_writer in a rolled-back transaction. Teardown deletes the synthetic database volume.

View Markdown source ↗

dbops / PostgreSQL permissions

The PostgreSQL reader without table access

A database reader connects successfully but receives permission denied for its required table. Restore the least privilege needed.

dbops-04-read-permission.tar.gz
Read lab README

The PostgreSQL reader without table access

A reporting role connects to the database but cannot read its required table. Find the missing privilege and restore read access without changing the data, table ownership, role membership or write privileges.

Before you begin

Use a disposable machine with Bash, Python 3, Docker and Docker Compose. The lab creates breakfix-dbops-04, an internal Docker network and a named database volume. It publishes no host ports and creates no cloud resources. Docker may download PostgreSQL 17. Authentication is intentionally insecure; never use these settings or this project name for real workloads. Other users with Docker access can reach the lab database.

Setup refuses existing project resources. Teardown checks container ownership before deleting the lab containers, network and synthetic database volume.

Investigate
./setup.sh
docker compose -p breakfix-dbops-04 exec db psql -X -U lab_reader -d lab -c 'SELECT * FROM public.report ORDER BY id'
docker compose -p breakfix-dbops-04 exec db psql -X -U lab_admin -d lab

Inspect the lab_reader role and public.report privileges. Preserve the reader's existing database and schema access and use the least privilege needed for the report. Do not grant access to PUBLIC or change the data. Run ./verify.sh after repair and ./teardown.sh when finished. Verification reads the data as the reader and checks that write, ownership, role and broader administrative privileges remain absent.

View Markdown source ↗

devops / Kubernetes

The release that never arrives

A deployment has shipped, but its pods never become ready. Find the evidence, repair the release, and prove the service has healthy endpoints.

devops-01-k8s-broken-release.tar.gz
Read lab README

Broken Kubernetes release

A web release is stuck after rollout. Find why its workload is not ready and restore the deployment and service in a disposable kind cluster without deleting the namespace.

Before you begin

You need Bash, Python 3, curl, Docker, kind and kubectl. Docker must be running; kind and the workload download images. Use a disposable machine and do not reuse cluster name breakfix-devops-01 or its lab kubeconfig for other work.

Run and clean up

From this directory, run ./setup.sh. Use the printed kubeconfig and namespace breakfix for investigation. After your changes, run ./verify.sh, then ./teardown.sh to remove the lab cluster. Remove $HOME/.kube/breakfix-devops-01 afterward if no longer needed.

View Markdown source ↗

devops / Kubernetes networking

The service with no backends

A healthy web pod is running, but its Kubernetes Service has no ready endpoints. Trace the selection problem and restore in-cluster access.

devops-02-k8s-missing-endpoints.tar.gz
Read lab README

Kubernetes Service with no endpoints

A Service cannot reach its healthy backend in a disposable kind cluster. Inspect the Service, endpoints and pod labels; restore connectivity without changing the deployment or deleting the namespace.

Before you begin

You need Bash, Python 3, Docker, kind and kubectl. Docker must be running; kind and the workload download images. Use a disposable machine and do not reuse cluster name breakfix-devops-02 or its lab kubeconfig for other work.

Run and clean up

From this directory, run ./setup.sh. Use the printed kubeconfig and namespace breakfix-endpoints for investigation. After your changes, run ./verify.sh, then ./teardown.sh to remove the lab cluster. Remove $HOME/.kube/breakfix-devops-02 afterward if no longer needed.

View Markdown source ↗

devops / Docker

The container that will not stay up

A container exits during startup. Inspect its exit status and logs, correct its launch configuration, and verify its health endpoint.

devops-03-docker-startup-failure.tar.gz
Read lab README

Docker startup failure

A local Compose service exits immediately. Inspect the stopped container and logs, then recover the application through its launch configuration without changing its source code.

Before you begin

You need Bash, Python 3, Docker and Docker Compose. Docker must be running and may download or build images. Use a disposable machine; the scripts manage the Compose project breakfix-devops-03, so do not reuse that name.

Run and clean up

From this directory, run ./setup.sh. Inspect the service with docker compose -p breakfix-devops-03 ps -a and its logs. After your changes, run ./verify.sh and ./teardown.sh; teardown removes the lab Compose project.

View Markdown source ↗

devops / Docker builds

The file missing from the build

A Docker build cannot copy a file that exists locally. Investigate the build context and restore the build without exposing a private fixture.

devops-04-docker-build-context.tar.gz
Read lab README

Docker build context failure

An application image cannot copy a required file during its build. Investigate the build context while keeping the private fixture excluded.

Before you begin

You need Bash, Python 3 and a running Docker daemon. Builds may download images and use local disk space. Work in a disposable copy of the lab; the private/ fixture must remain excluded from the build context.

Run and clean up

From this directory, run ./setup.sh to reproduce the failure. After your changes, run ./verify.sh and ./teardown.sh. The exercise has no persistent containers; re-extract the bundle to reset the build context.

View Markdown source ↗

devsecops / CI/CD secrets

The debug log that exposed a token

A simulated CI job leaks a dummy token into its output and artifact. Investigate and stop the exposure while preserving the report.

devsecops-01-ci-secret-exposure.tar.gz
Read lab README

CI secret exposure

A simulated local pipeline produces a report but exposes a deliberately fake token in debug output. Investigate both output and report while keeping report generation working.

Before you begin

You need Bash and Python 3. This exercise uses only a fixed dummy token; never substitute real credentials. It does not access GitHub or create cloud resources.

Run and clean up

From this directory, run ./setup.sh, then ./pipeline.sh and inspect its output and .lab-state/report.txt. After your changes, run ./verify.sh and ./teardown.sh; teardown removes the local lab state.

View Markdown source ↗

devsecops / CI/CD input handling

The commit message that became a command

A simulated CI step treats a commit message as shell code. Trace the boundary and restore literal handling of the untrusted input.

devsecops-02-ci-expression-injection.tar.gz
Read lab README

The commit message that became a command

A simulated CI runner inserts a commit message into a shell step. A harmless test message produces an unexpected marker. Repair the step so every message is printed literally, including messages containing shell syntax.

Before you begin

Use a disposable machine with Bash, Python 3 and Docker. Docker may download the Python image. This is a local simulation, not GitHub Actions. It uses only fixed synthetic messages and no credentials. Never substitute real messages or secrets into the deliberately vulnerable template.

The step runs in a read-only, unprivileged container without network access. The lab creates no persistent container, volume or host port. Docker retains the image for reuse.

Investigate

Run ./setup.sh to reproduce the symptom. Compare these two inputs:

./lab.sh normal
./lab.sh injection

Inspect step.sh and runner.py. The runner offers the same message as an environment variable. Change the step, not the runner or test cases. Keep printing the complete message. Run ./verify.sh after your change and ./teardown.sh when finished. Teardown does not reset edited files; re-extract the bundle to start over.

View Markdown source ↗

devsecops / GitHub Actions permissions

The workflow token that could write

A real GitHub Actions workflow can read the repository, but its token can also write to it. Reduce its permissions and prove both behaviors.

devsecops-03-actions-token-permissions.tar.gz
Read lab README

The workflow token that could write

Investigate a real GitHub Actions workflow whose token has more repository access than its read-only task needs. Only synthetic data is used.

Before you begin

You need Bash, Python 3, jq and GitHub CLI authenticated to github.com. GitHub Actions must be enabled. Hosted runs in private repositories can consume included minutes or incur charges; check your account's allowance and limits. The lab creates commits and workflow logs. Never use an existing, shared or production repository, real credentials or secrets.

Run ./setup.sh. Create a new private repository owned by your personal account, initialize it with a README, and enable Actions if needed. Do not add secrets or other work. In that repository create .github/workflows/breakfix-permissions.yml, copying the contents of workflow.yml from this bundle. Commit it to the default branch.

Investigate

From the repository's Actions tab, select Breakfix token permissions lab, run it on the default branch, and inspect its completed logs. The workflow reads the README and tries to create and delete a uniquely named synthetic file. A successful write leaves two commits in the disposable repository. If deletion fails, the job fails and the synthetic file may remain.

Reduce the workflow token's permissions in the workflow file on GitHub. Keep the read probe working and make the write probe return an authorization denial. Commit the change to the default branch and run the workflow again. The run ID is the number at the end of its GitHub Actions run URL.

export LAB_REPOSITORY="your-user/your-disposable-repository"
export LAB_RUN_ID="the-repaired-run-id"
./verify.sh
./teardown.sh

Verification reads the selected real run's logs; it does not dispatch a run or change the repository. teardown.sh prints the manual deletion instructions; it does not delete anything. Delete the disposable repository in GitHub Settings when finished, including any synthetic probe left by a failed run.

View Markdown source ↗

devsecops / GitHub Actions artifact hygiene

The report artifact that carried a token

A real GitHub Actions workflow uploads a report together with a synthetic token. Fix the artifact boundary and inspect the downloaded result.

devsecops-04-actions-artifact-leak.tar.gz
Read lab README

The report artifact that carried a token

Investigate a real GitHub Actions artifact containing a report and an unrelated fixed fake token. Never substitute a real credential.

Before you begin

You need Bash, Python 3, jq and GitHub CLI authenticated to github.com. GitHub Actions must be enabled. Hosted runs and artifact storage can consume included allowances or incur charges; check your account's limits. The lab uploads a deliberately exposed fake token. Never use an existing, shared or production repository, real credentials or secrets.

Run ./setup.sh. Create a new private repository owned by your personal account, initialize it with a README, and enable Actions if needed. Do not add secrets or other work. In that repository create .github/workflows/breakfix-artifact.yml, copying the contents of workflow.yml from this bundle. Commit it to the default branch.

Investigate

From the repository's Actions tab, select Breakfix artifact hygiene lab, run it on the default branch, and inspect the downloaded breakfix-report artifact. It contains an intact report and a file with a synthetic token. The official upload action is pinned to a commit and the artifact has one-day retention; retention timing is controlled by GitHub.

Change the workflow's upload path so only the report is uploaded; leave the report content intact. Commit the change to the default branch and run it again. The run ID is the number at the end of its GitHub Actions run URL.

export LAB_REPOSITORY="your-user/your-disposable-repository"
export LAB_RUN_ID="the-repaired-run-id"
./verify.sh
./teardown.sh

Verification downloads and inspects the actual artifact from that run; it does not dispatch a run or change the repository. teardown.sh prints manual deletion instructions and does not delete anything. Delete the disposable repository in GitHub Settings when finished; this also removes its artifacts.

View Markdown source ↗

finops / Azure cost controls

The budget alert that cannot reach its runbook

Investigate a disconnected Azure budget alert and restore a narrowly scoped Automation runbook using a synthetic notification.

finops-01-azure-budget-guard.tar.gz
Read lab README

Azure budget guard

This exercise provisions a real Azure VM, network, Automation account, webhook, action group, and subscription budget. The VM, managed disk, Automation jobs, notifications, and network resources may incur charges; quotas do not guarantee free use. Deallocating the VM does not remove its disk or all charges. Review Azure pricing and quota, use an isolated subscription with known safe guardrails, and tear the lab down promptly. Azure cost data commonly lags by 8–24 hours and budget evaluations are typically daily. A budget is not a spending cap.

The guard identity has access only to the uniquely named lab VM. Its runbook checks the lab marker and deallocates that VM; it does not delete resource groups or enumerate other VMs. The target VM has no public IP and its network security group denies inbound and outbound traffic. The budget tracks only the target resource group, so costs of the guard group are not included. Other subscription budgets still apply, and a synthetic notification tests the action group and runbook, not real cost ingestion or threshold evaluation. The lab budget is 10 units of the subscription's billing currency.

Install Azure CLI, Terraform 1.5+, Python 3, OpenSSH and Bash on Linux. Log in and select the intended subscription before running the lab. Its subscription must allow the providers Microsoft.Resources, Microsoft.Network, Microsoft.Compute, Microsoft.Automation, Microsoft.Insights, Microsoft.Consumption and Microsoft.Authorization; this lab does not register providers or change existing resources or guardrails.

export AZURE_SUBSCRIPTION_ID="your-subscription-id"
./setup.sh "$AZURE_SUBSCRIPTION_ID" northeurope --accept-costs

The default VM size is Standard_B1s. If unavailable, supply another compatible x64 VM size as a fourth argument after checking its price and quota; availability varies by subscription and region. For an ARM64 VM size, also pass 22_04-lts-arm64 as the fifth argument; verify the image is available in the chosen region.

Setup creates a private .lab-state directory, a generated SSH key and uniquely named lab resources. It refuses to overwrite an existing state directory, and checks Terraform's initial plan contains only expected creations. If setup fails, preserve .lab-state and run ./teardown.sh after resolving the error.

Investigate the action group and its webhook configuration. Terraform runs from .lab-state; review its plan before applying a change. State and plan files contain a bearer webhook URL, and Terraform may display it in a plan: never share them, commit them, paste them into tickets, or put them in process arguments. Use a private local Linux filesystem with restrictive permissions, not a shared or world-readable mount.

terraform -chdir=.lab-state plan
./verify.sh
./teardown.sh

Verification sends an Azure Monitor synthetic budget notification to the actual configured action-group receiver, then checks the lab Automation job and VM deallocation. It can take several minutes. Teardown uses Terraform and refuses unexpected resource groups or unmanaged resources. It keeps local state afterward for inspection; remove the private .lab-state directory only after confirming all lab resources, budget and role assignment are gone. Failed teardown retains state. Since Azure operations and billing are asynchronous, check Azure for residual resources and charges after cleanup.

View Markdown source ↗

finops / Azure cost controls

The Azure budget missing a resource group

A real Azure budget filters out one of its two lab resource groups. Investigate and correct the filter without widening it beyond the lab.

finops-02-azure-budget-scope.tar.gz
Read lab README

The Azure budget missing a resource group

A real Azure subscription budget is intended to track two isolated lab resource groups, but its filter includes only one. Investigate the filter and correct it without expanding the budget to unrelated resources or changing other budgets.

Before you begin

Use an isolated Azure subscription and a private Linux filesystem with Bash, Python 3, Terraform 1.5+ and Azure CLI. Sign in and select the intended subscription. Your identity needs permission to manage resource groups, action groups and subscription budgets. Microsoft.Resources, Microsoft.Insights and Microsoft.Consumption must already be registered.

Setup creates two uniquely named resource groups, an action group without receivers, and a subscription budget filtered to the lab groups. The action group and budget notification are disabled; the budget is not a spending cap and does not stop resources. Review Azure pricing: cloud operations or resources may incur charges. Do not add other resources to either group.

The budget amount is in the subscription billing currency. The exercise examines the actual Azure filter only; it does not generate spending, test cost ingestion or trigger an actual budget notification. Azure cost data can be delayed. Do not change existing budgets or cost guards.

Investigate
export AZURE_SUBSCRIPTION_ID="your-subscription-id"
./setup.sh "$AZURE_SUBSCRIPTION_ID" northeurope --accept-costs
./lab.sh inspect

Inspect the two lab group names and the budget filter. Update the Terraform input in .lab-state/scope.auto.tfvars.json, then use the guarded plan and apply commands:

./lab.sh plan
./lab.sh apply
./verify.sh
./teardown.sh

The guarded apply permits only an in-place update of the lab budget. Teardown checks resource identities and group contents before destroying only lab resources with Terraform. If setup or teardown fails, preserve .lab-state and inspect Azure before retrying. After teardown, confirm the resources are gone before removing private state. Never reuse this lab's groups for real resources.

View Markdown source ↗

finops / Google Cloud cost controls

The GCP budget notification sent to the wrong topic

Trace a budget notification to the wrong Pub/Sub topic and stop a dedicated test VM with a synthetic event.

finops-03-gcp-budget-stop.tar.gz
Read lab README

The GCP budget notification sent to the wrong topic

This lab creates a real Compute Engine VM, boot disk, two Pub/Sub topics, a subscription and a project-scoped Cloud Billing budget. Review pricing and quotas first: these resources and operations can incur charges. Use a dedicated, billing-enabled non-production project. The VM has no external IP or service account. Stopping it does not delete its disk or stop all costs. A budget is not a spending cap, and cost data and notifications can be delayed.

Install Bash, Python 3 and the Google Cloud CLI. Sign in with gcloud auth login. Your identity must be able to manage Compute Engine and Pub/Sub resources in the project and budgets on its billing account. Compute Engine, Pub/Sub and Cloud Billing Budget APIs must already be enabled, and a default VPC and subnet must exist in the chosen zone. Check pricing and permissions.

export GOOGLE_CLOUD_PROJECT="your-dedicated-project-id"
export GOOGLE_CLOUD_BILLING_ACCOUNT="your-billing-account-id"
./setup.sh "$GOOGLE_CLOUD_PROJECT" "$GOOGLE_CLOUD_BILLING_ACCOUNT" us-central1-a --accept-costs
./lab.sh inspect

Inspect the live budget, topics and subscription. Repair the lab budget's route using Google Cloud tools while keeping its project filter, amount and other notification settings unchanged. Do not edit other budgets. If the installed gcloud billing budgets update crashes, use the Cloud Billing console or Billing Budget API instead.

./verify.sh
./teardown.sh

Verification publishes a synthetic over-budget message to the budget's configured topic, pulls it from the lab subscription, and stops only the identified lab VM. It does not test real billing data, Google-generated notifications or a deployed automatic responder. The lab does not disable project billing. Never use this local demonstration as a production spending guard. The related opsbreakfix.com article covers Azure, not GCP.

Setup records unique resource identities in a private .lab-state directory. Keep this state after a failure so teardown can recover. Teardown only removes the recorded lab resources and never deletes a project or billing account. Inspect Google Cloud for residual resources and charges after cleanup; remove local state only after confirming the resources are gone.

View Markdown source ↗

finops / Google Cloud cost controls

The GCP budget that overlooks the training bucket

Investigate a project-scoped Cloud Billing budget whose label filter excludes a real lab bucket.

finops-04-gcp-budget-label.tar.gz
Read lab README

The GCP budget that overlooks the training bucket

The Cloud Billing budget and Cloud Storage bucket in this exercise are real. Use a dedicated, billing-enabled non-production project. The bucket is initially empty, but storage and operations can incur charges. A budget is not a spending cap; costs and label attribution may arrive late. This exercise does not generate spending or verify cost ingestion.

Install Bash, Python 3 and the Google Cloud CLI. Sign in with gcloud auth login and use an identity permitted to manage buckets in the project and budgets on its billing account. The Cloud Billing Budget and Cloud Storage APIs must already be enabled. Check the project's billing link and pricing before starting.

export GOOGLE_CLOUD_PROJECT="your-dedicated-project-id"
export GOOGLE_CLOUD_BILLING_ACCOUNT="your-billing-account-id"
./setup.sh "$GOOGLE_CLOUD_PROJECT" "$GOOGLE_CLOUD_BILLING_ACCOUNT" --accept-costs
./lab.sh inspect

Compare the bucket label with the budget filter using the Google Cloud CLI. Fix the live budget while preserving its single-project scope, amount, notification settings and other filters. Do not change any other budgets. If the installed gcloud billing budgets update crashes, use the Cloud Billing console or Billing Budget API instead.

./verify.sh
./teardown.sh

Setup records uniquely named resources in a private .lab-state directory. Keep this directory if any operation fails: it is needed for recovery and teardown. Teardown only removes the recorded budget and an empty bucket whose ownership marker matches. It never deletes a project or a billing account. Afterward confirm the budget and bucket are gone; remove local state only then. Soft delete is disabled on this disposable bucket so deletion is permanent. Do not use the bucket for anything outside this lab.

View Markdown source ↗

linux / Linux storage

The disk space that disappeared

A deleted log is still consuming space inside a container. Trace the open file descriptor and recover the space without taking the lab container down.

linux-01-ghost-disk-full.tar.gz
Read lab README

Deleted file still using disk space

A cleanup job removed a large log, but its bytes remain allocated. Investigate processes and file descriptors in the lab container and recover the space without stopping it.

Before you begin

You need Bash, Python 3, Docker and Docker Compose. Docker must be running and the lab builds an image. It creates a 32 MiB deleted-open file inside its container; provide enough disk space. Use a disposable machine and do not reuse Compose project breakfix-linux-01.

Run and clean up

From this directory, run ./setup.sh. Inspect the container with docker compose -p breakfix-linux-01 exec ghost sh. After your changes, run ./verify.sh and ./teardown.sh; teardown removes the lab Compose project.

View Markdown source ↗

linux / Linux services and permissions

The service that cannot read its configuration

A non-root service starts but reports unhealthy because it cannot read its configuration. Investigate its identity and file permissions.

linux-02-unreadable-service-config.tar.gz
Read lab README

Unreadable service configuration

A service in a disposable container responds with an error after startup. Investigate its logs, process identity and configuration access without running it as root or making its configuration writable by other users.

Before you begin

You need Bash, Python 3, Docker and Docker Compose. Docker must be running and may download or build images. This models a service identity inside a container, not systemd. Use a disposable machine and do not reuse Compose project breakfix-linux-02.

Run and clean up

From this directory, run ./setup.sh, then inspect docker compose -p breakfix-linux-02 logs app. After your changes, run ./verify.sh and ./teardown.sh; teardown removes the lab Compose project.

View Markdown source ↗

linux / Linux DNS and networking

The name that goes nowhere

A client cannot resolve its internal service name. Compare application configuration with the isolated network's DNS records and restore connectivity.

linux-03-unresolvable-service.tar.gz
Read lab README

Unresolvable service

A client container cannot reach a healthy service by name. Diagnose name resolution within the Compose network without changing host DNS.

Before you begin

You need Bash, Python 3, Docker and Docker Compose. Docker must be running and may download or build images. Use a disposable machine and do not reuse Compose project breakfix-linux-03; changes inside its containers are ephemeral.

Run and clean up

From this directory, run ./setup.sh. Inspect the client with docker compose -p breakfix-linux-03 exec client sh. After your changes, run ./verify.sh and ./teardown.sh; teardown removes the lab Compose project.

View Markdown source ↗

linux / Linux networking

The SSH listener on the wrong port

An SSH client gets a connection refusal inside an isolated network. Inspect the listener and restore the expected service port.

linux-04-ssh-connection-refused.tar.gz
Read lab README

SSH connection refused

A client cannot connect to the expected SSH port in an isolated Compose network. Investigate the network path and listener without changing host firewall or DNS settings.

Before you begin

You need Bash, Python 3, Docker and Docker Compose. Docker must be running and may download or build images. Use a disposable machine and do not reuse Compose project breakfix-linux-04.

Run and clean up

From this directory, run ./setup.sh. Investigate the SSH listener and configuration in the lab server container. After your changes, run ./verify.sh and ./teardown.sh; teardown removes the lab Compose project.

View Markdown source ↗

mlops / Model serving and feature contracts

The prediction request that no longer fits

A model service is healthy, but its prediction requests fail. Investigate feature schema drift and restore inference for a synthetic payload.

mlops-01-inference-schema-drift.tar.gz
Read lab README

Inference schema drift

A model-serving process is healthy, but its producer receives an error instead of a prediction. Investigate the mismatch between the request and the model's feature contract.

The exercise uses a deliberately simple illustrative logistic model with fixed coefficients and synthetic measurements. Its output is for troubleshooting practice, not a trained or validated prediction.

Before you begin

You need Bash, Python 3, Docker and Docker Compose on a disposable local machine. The first run may download a Python container image. No cloud account, real data or host port is used. Docker still consumes local disk, compute and network bandwidth, and a Docker host in the cloud may incur charges.

The exercise creates Compose project breakfix-mlops-01 and mounts this lab directory read-only inside its container. Do not reuse the project name for another workload. Your changes to the payload remain on the host after teardown; re-extract the archive to reset the exercise.

Start the incident

Run ./setup.sh from this directory. The script starts the service and confirms the prediction request is rejected. Reproduce the request with docker compose -p breakfix-mlops-01 exec inference python /lab/client.py; inspect the error, model artifact and input payload.

Verify and clean up

After correcting the request contract without changing the model or measurements, run ./verify.sh. It checks that the original values reach the model and the prediction matches the model's calculation. Run ./teardown.sh to remove the lab container and network. Setup refuses to reuse an existing project, and teardown refuses containers belonging to a different directory.

View Markdown source ↗

mlops / Training and serving consistency

The model serving unscaled features

A trained regression model loads successfully but serves wrong predictions because inference skips the training-time scaler.

mlops-02-training-serving-skew.tar.gz
Read lab README

The model serving unscaled features

A trained capacity prediction model loads correctly, but its predictions are wrong. Compare the training and inference paths, then restore the fitted training-time transformation without retraining or altering the model.

Before you begin

Use Bash and Python 3.11 or later in a private local environment. Install the pinned model library into a virtual environment:

LAB_VENV="$(mktemp -d)"
python3 -m venv "$LAB_VENV"
. "$LAB_VENV/bin/activate"
python -m pip install -r requirements.txt

Installing packages needs internet access. The lab trains a real scikit-learn StandardScaler and LinearRegression pipeline on synthetic data. It does not deploy a service or use a cloud account or real workload measurements.

The generated .lab-state contains a serialized model. Python model artifacts can execute code during loading: only use files created by your own lab run, never load an untrusted artifact. Setup refuses to overwrite an existing state directory.

Investigate
./setup.sh
cat training.csv
cat inference.json
./lab.sh inspect
./lab.sh predict 150 3

The arguments are synthetic requests per second and error percentage. The printed reference prediction is produced through the trained pipeline; the served prediction follows the inference configuration. Diagnose the difference and update inference.json, without changing the data, model or predictor.

./verify.sh
./teardown.sh

Verification checks the original dataset and generated model, and compares served predictions with the trained pipeline on several unseen inputs. Teardown removes only the lab-generated model and state marker; it refuses unexpected files. The fitted example does not validate production model quality, monitoring, real-world causality or deployment behavior. Deactivate and remove the temporary virtual environment separately when done.

View Markdown source ↗

mlops / Model serving

The prediction using the wrong class

A real scikit-learn classifier returns probabilities for two classes, but the serving configuration selects the healthy class as incident risk.

mlops-03-positive-class-mismatch.tar.gz
Read lab README

The prediction using the wrong class

A trained classifier's probability is presented as incident risk, but its serving configuration selects the wrong class. Inspect the model's actual class order and correct the selected label.

Before you begin

Use Bash and Python 3.11 or later on a disposable machine. Create a virtual environment and install the pinned library:

LAB_VENV="$(mktemp -d)"
python3 -m venv "$LAB_VENV"
. "$LAB_VENV/bin/activate"
python -m pip install -r requirements.txt

The lab fits a real scikit-learn logistic regression on fixed synthetic data each time it runs. It does not deploy a service, load a model artifact or use real telemetry. This toy classifier is not a validated production model.

./setup.sh
./lab.sh inspect
./lab.sh score 9

Inspect training.csv and inference.json. Select the correct positive label without changing the data or model code, then run:

./verify.sh
./teardown.sh

The verifier checks unseen samples and the original training data. Teardown creates or deletes no service or cloud resources; deactivate and remove the separate temporary virtual environment when finished.

View Markdown source ↗

mlops / Model evaluation

The holdout that trained the scaler

A real scikit-learn evaluation fits its scaler on the whole dataset, including held-out observations. Restore the train-only preprocessing boundary.

mlops-04-preprocessing-data-leak.tar.gz
Read lab README

The holdout that trained the scaler

A classifier is evaluated on held-out data, but its preprocessing was fitted on the entire dataset. Restore the boundary so the holdout cannot influence the scaler.

Before you begin

Use Bash and Python 3.11 or later on a disposable machine. Create a virtual environment and install the pinned library:

LAB_VENV="$(mktemp -d)"
python3 -m venv "$LAB_VENV"
. "$LAB_VENV/bin/activate"
python -m pip install -r requirements.txt

The lab fits a real scikit-learn StandardScaler and k-nearest-neighbors classifier on fixed synthetic data. The split is supplied by the lab; it does not validate model quality or demonstrate a particular production failure. No cloud, real data or serialized model is used.

./setup.sh
./lab.sh inspect

Compare dataset.csv, the scaler means and policy.json. Change the fitting scope without altering the dataset, split or model code.

./verify.sh
./teardown.sh

Verification compares fitted statistics and predictions against a separate train-only scikit-learn pipeline. Teardown creates or deletes no service or cloud resources; deactivate and remove the separate virtual environment when finished.

View Markdown source ↗

netops / TLS

The certificate for the wrong service

A local TLS endpoint presents a certificate that fails hostname verification. Investigate the certificate and restore a trusted connection.

netops-01-invalid-tls-certificate.tar.gz
Read lab README

Invalid TLS certificate

A local service presents a certificate signed by the lab CA, but hostname validation fails. Investigate the live certificate and restore validation without disabling certificate checks.

Before you begin

You need Linux, Bash, Python 3 and OpenSSL. The lab starts a TLS server on a dynamically assigned loopback port and creates temporary private key material in .lab-state; it does not modify host DNS. Use a disposable local environment.

Run and clean up

From this directory, run ./setup.sh and use the printed address to investigate. After your changes, run ./verify.sh and ./teardown.sh. Teardown stops the matching lab server and removes its generated local state.

View Markdown source ↗

netops / Network connectivity

The service listening on the wrong interface

A healthy HTTP service cannot be reached from a neighboring container. Investigate its listening address and restore connectivity.

netops-02-loopback-listener.tar.gz
Read lab README

The service listening on the wrong interface

The client resolves api, but its HTTP connection is refused. The service responds from its own container. Find why these observations differ and restore the client request without publishing a host port.

Before you begin

Use a disposable machine with Bash, Python 3, Docker and Docker Compose. The lab creates the Compose project breakfix-netops-02 and an internal network; it publishes no host ports. Docker may pull the Python image. Do not reuse this project name for other work. Setup refuses existing project resources, and teardown checks container ownership before removal.

Run and investigate

From this directory, run ./setup.sh. The following commands show the service status, logs and the client-side symptom:

docker compose -p breakfix-netops-02 ps
docker compose -p breakfix-netops-02 logs api
docker compose -p breakfix-netops-02 exec client python /lab/probe.py api

Inspect the service configuration and compare a request from within the service container. Configuration changes require recreating the service. Run ./verify.sh after making your change and ./teardown.sh when finished. Teardown removes the lab containers and network, but does not reset edited files; re-extract the bundle to start over.

View Markdown source ↗

netops / Proxy connectivity

The proxy that cannot reach its healthy backend

A reverse proxy returns HTTP 502 even though its backend answers directly. Trace the upstream connection over an isolated Docker network.

netops-03-bad-proxy-upstream.tar.gz
Read lab README

The proxy that cannot reach its healthy backend

A client reaches the reverse proxy but gets HTTP 502. The backend responds directly on the same isolated network. Find the broken upstream connection and restore traffic without changing the backend or publishing a host port.

Before you begin

Use a disposable machine with Bash, Python 3, Docker and Docker Compose. The lab creates the Compose project breakfix-netops-03 and an internal Docker network. It does not publish ports or create cloud resources. Docker may download the nginx and Python images. Do not reuse the project name; setup refuses pre-existing project resources and teardown checks ownership.

Investigate
./setup.sh
docker compose -p breakfix-netops-03 ps
docker compose -p breakfix-netops-03 exec client python /lab/probe.py backend
docker compose -p breakfix-netops-03 exec client python /lab/probe.py proxy
docker compose -p breakfix-netops-03 logs proxy
docker compose -p breakfix-netops-03 exec backend nginx -T

Inspect proxy.conf and preserve the proxy and backend. After changing it, recreate the proxy to pick up the edited bind-mounted file, including when your editor replaces the file:

docker compose -p breakfix-netops-03 up -d --force-recreate proxy
docker compose -p breakfix-netops-03 exec proxy nginx -t

Run ./verify.sh and ./teardown.sh when finished. Teardown removes the lab's containers and network but does not reset edited files; re-extract the bundle to start again.

The related Docker networking guide and demo show network inspection and a direct container request. The demo does not reproduce this reverse-proxy failure.

View Markdown source ↗

netops / Container network topology

The service on the other Docker network

A healthy service and client cannot communicate because their network memberships do not overlap. Trace Docker's network-scoped service discovery.

netops-04-isolated-networks.tar.gz
Read lab README

The service on the other Docker network

The API is running and responds locally, but the client cannot resolve its service name. Investigate the two Docker networks and restore communication using the Compose configuration. Keep both networks internal, preserve the application and do not publish host ports or hardcode an IP address.

Before you begin

Use a disposable machine with Bash, Python 3, Docker and Docker Compose. The lab creates the Compose project breakfix-netops-04 and two internal Docker networks. It does not publish ports or create cloud resources. Docker may download the Python image. Do not reuse the project name; setup refuses existing project resources and teardown checks ownership.

Investigate
./setup.sh
docker compose -p breakfix-netops-04 ps
docker compose -p breakfix-netops-04 exec api python -c 'from urllib.request import urlopen; print(urlopen("http://127.0.0.1:8080/health.txt").read().decode())'
docker compose -p breakfix-netops-04 exec client python -c 'import socket; print(socket.getaddrinfo("api", 8080))'
docker network inspect breakfix-netops-04_front breakfix-netops-04_back

Inspect compose.yaml. Preserve the existing networks and persist your network change there; recreate the affected container with Compose so the configuration and running state agree. Then run ./verify.sh and ./teardown.sh. Teardown removes the lab containers and networks but does not reset edited files; re-extract the bundle to start again.

The related Docker networking guide and demo show a network inspection and a direct container request. The demo does not reproduce this split-network scenario.

View Markdown source ↗

secops / Azure network security

The Azure SSH rule open to everyone

Investigate an overly broad SSH rule on an unattached Azure network security group and narrow its source.

secops-01-azure-unrestricted-ssh.tar.gz
Read lab README

Azure SSH security rule

This exercise creates a real Azure network security group containing a deliberately permissive inbound SSH rule. It is unattached: there is no VM, interface, subnet or public IP. Never attach it to any resource. Restrict its source to the designated example private network 10.77.0.0/16; this example is not a prescription for a production network.

An empty resource group and an unattached network security group normally have no direct usage charge, but Azure pricing and policies vary. Use an isolated subscription with known safe guardrails and remove lab resources promptly. No real network traffic or SSH exposure is exercised.

Install Azure CLI, Terraform 1.5+, Python 3 and Bash on Linux. Log in and select the intended subscription. Microsoft.Resources and Microsoft.Network must already be registered. Use a private local Linux filesystem for Terraform state.

export AZURE_SUBSCRIPTION_ID="your-subscription-id"
./setup.sh "$AZURE_SUBSCRIPTION_ID" northeurope --accept-costs

Inspect the lab NSG and .lab-state, review Terraform plans before applying, then run ./verify.sh and ./teardown.sh. Teardown refuses unexpected group contents or attached network resources and retains private state on failure. Confirm the lab group is gone before removing .lab-state.

View Markdown source ↗

secops / Sandbox isolation

The agent with too much access

A simulated agent can see a dummy token and has unnecessary container privileges. Tighten its sandbox without breaking its task.

secops-02-agent-sandbox.tar.gz
Read lab README

The agent with too much access

A simulated agent reads a synthetic project and writes a report. Its task works, but the access report reveals a dummy token and unnecessary container privileges. Adjust policy.json so the task still works with less access.

Before you begin

Use Docker, Python 3 and Bash on a disposable machine. The lab uses a fixed dummy token, not a credential. Never put real secrets or real project files in this exercise.

Every container is disposable, has no network or published ports, receives only the lab's read-only synthetic project, and uses temporary scratch space. Docker may download the Python image. The initial policy intentionally runs as root with a writable container root filesystem; it does not mount the host home, Docker socket or real credentials. Containers share the host kernel and are not equivalent to virtual machines.

The probe simulates a task; it is not an AI agent and does not test prompt injection, external APIs, credential brokers or production isolation.

Investigate
./setup.sh
./lab.sh

Inspect the JSON report and policy.json. Change the policy, not the probe or the synthetic project. Keep the project readable and scratch writable.

./verify.sh
./teardown.sh

The lab leaves no persistent container, volume or generated files. Teardown does not delete the shared Docker image or reset the policy; re-extract the bundle to start over.

View Markdown source ↗

secops / Azure network security

The Azure deny rule that never wins

An outbound deny rule is shadowed by a broader, higher-priority allow. Fix the rule order on a real, unattached Azure network security group.

secops-03-azure-shadowed-egress.tar.gz
Read lab README

The Azure deny rule that never wins

Two real outbound rules overlap: an allow for TCP 443 to any destination and a deny for the documentation-only network 198.51.100.0/24. The allow's lower priority number makes it win first. Reorder the allow while preserving both rules: the deny should be priority 200 and the allow priority 300.

Before you begin

This exercise creates a uniquely named resource group and an unattached Azure network security group. Never attach it to a VM, network interface or subnet. It creates no VM, public IP or data and does not send network traffic. An unattached NSG and empty resource group normally have no direct usage charge, but Azure pricing and policies vary; check costs and remove resources promptly. Use an isolated subscription with known safe guardrails.

Install Azure CLI, Terraform 1.5+, Python 3 and Bash on Linux. Log in and select the intended subscription. Microsoft.Resources and Microsoft.Network must already be registered. Use a private local Linux filesystem for Terraform state. The provided IP range is an example, not a production policy.

export AZURE_SUBSCRIPTION_ID="your-subscription-id"
./setup.sh "$AZURE_SUBSCRIPTION_ID" northeurope --accept-costs

Inspect the lab NSG and its rules in Azure. Change the allow priority through .lab-state/access.auto.tfvars.json, inspect the Terraform plan in .lab-state, and apply only the intended in-place update:

terraform -chdir=.lab-state plan -out=repair.tfplan
terraform -chdir=.lab-state show repair.tfplan
# Apply the saved plan only if it updates the lab NSG in place.
terraform -chdir=.lab-state apply repair.tfplan
./verify.sh

./verify.sh reads the Azure rules and checks Terraform for drift; it does not test actual packet flow or other NSGs, routes or firewalls.

Run ./teardown.sh when finished. Teardown refuses unexpected group contents or an attached NSG and retains private state on failure. Confirm that the lab resource group is gone before removing .lab-state.

View Markdown source ↗

secops / Kubernetes RBAC

The report reader that could read Secrets

A Kubernetes service account can read a report, but its Role also grants access to Secrets. Restrict its permissions without breaking report access.

secops-04-kubernetes-rbac-secrets.tar.gz
Read lab README

The report reader that could read Secrets

A Kubernetes service account can get and list a report ConfigMap, but its Role also grants access to Secrets. Reduce its permissions without losing report access. The Secret contains only a fixed synthetic value, never a credential.

Before you begin

Use Docker, kind, kubectl, Python 3 and Bash on a disposable machine. The lab creates a single-node kind cluster named breakfix-secops-04 and a separate kubeconfig under ~/.kube. Docker may download the node image. Do not use this cluster for other work or put real credentials in the lab. Kubernetes Secrets are not inherently encrypted just because their values are base64.

./setup.sh

Use the kubeconfig path printed by setup for every kubectl command. Inspect the report-reader Role and RoleBinding in namespace breakfix-secops-04. The verifier uses Kubernetes impersonation and includes the service account's normal groups; no service-account token is minted or mounted.

Remove Secret access from the Role while retaining get and list access to ConfigMaps. Preserve the existing RoleBinding, service account, report and synthetic Secret.

./verify.sh
./teardown.sh

Verification tests the real Kubernetes API's authorization and reads the report as the impersonated account. Teardown verifies the recorded kind node identity before deleting the entire lab cluster and its dedicated kubeconfig. If setup or teardown fails, inspect the cluster and files before manual cleanup.

View Markdown source ↗

One ecosystem.
Many perspectives.

Follow the connection from a hands-on lab to the knowledge and tools behind it.