Every day is one focused lesson with runnable scripts and a BATS test suite —
no filler, equal weight, identical structure. Shared logic lives once in /lib,
and pre-commit + BATS gate the repo from Day 1.
git clone <this repo> && cd bash-mastery-devops
pip install --user pre-commit && pre-commit install
bash days/day01/scripts/variables.sh # run a lesson
bats days/day01/tests # test a lesson
bats -r days # test everything
.envis only needed for the Day 10 lesson (safe config loading). No other day — and no test/CI run — requires it. When you get to Day 10, runcp .env.example .envand fill in your values (.envis gitignored; never commit real secrets).
Six phases, five days each.
| Phase | Days | Theme |
|---|---|---|
| 1 | 01–05 | 🧱 Bash Foundations |
| 2 | 06–10 | 📦 Data, Files & Text |
| 3 | 11–15 | 🛡️ Robust & Concurrent Scripting |
| 4 | 16–20 | ✅ Quality, Security & Performance |
| 5 | 21–25 | ⚙️ DevOps Automation |
| 6 | 26–30 | 🏛️ Platform Engineering (Principal) |
Each day links straight to its lesson. Open any day to get the walkthrough, runnable scripts, and its test suite.
| Day | Topic | Lesson |
|---|---|---|
| 01 | Shell basics & variables — shebang, strict mode, readonly, export |
open » |
| 02 | Conditionals & test expressions — if/elif, [[ ]], regex validation |
open » |
| 03 | Loops — for / while / until and the safe read pattern |
open » |
| 04 | Functions & scope — local, echo-return, defaults, array returns |
open » |
| 05 | Arguments & getopts — positionals, $@, named flags with validation |
open » |
| Day | Topic | Lesson |
|---|---|---|
| 06 | File I/O & redirection — >/>>/2>/&>, here-docs, safe reads |
open » |
| 07 | Text processing — grep / sed / awk + the cut|sort|uniq combo |
open » |
| 08 | Arrays & associative arrays — indexed maps, keys, mapfile |
open » |
| 09 | JSON & API integration — jq read/filter/build, curl patterns |
open » |
| 10 | Environment variables & config — safe .env loading, validation, masking |
open » |
| Day | Topic | Lesson |
|---|---|---|
| 11 | Error handling, logging & debugging — traps, shared logger, bash -x |
open » |
| 12 | Process management & signals — background jobs, PIDs, wait, traps |
open » |
| 13 | Parallel & concurrent execution — bounded worker pools, wait -n |
open » |
| 14 | Modular libraries — one shared /lib, sourcing, dual-use guard |
open » |
| 15 | Unit testing with BATS — run, lifecycle, failure paths |
open » |
| Day | Topic | Lesson |
|---|---|---|
| 16 | Pre-commit hooks & linting — the quality gate, per-day runs | open » |
| 17 | Security fundamentals — secret scanning, permission hardening, safe patterns | open » |
| 18 | Zero-trust security pipeline — artifact verification, signed stages, deploy guard | open » |
| 19 | Performance optimization — benchmarking, profiling, hot-path tuning | open » |
| 20 | Unix tooling at scale — field extraction, histograms, streaming pipelines | open » |
| Day | Topic | Lesson |
|---|---|---|
| 21 | Capstone I — Distributed Log Analyzer Pro — parse, aggregate & report web logs | open » |
| 22 | Rootless containers — Buildah/Podman/Cosign, rootless runs, image audit | open » |
| 23 | Modular CI/CD framework — staged pipelines, fail-fast, timing | open » |
| 24 | Git-driven auto-deploy (GitOps) — reconcile, drift detection, prune | open » |
| 25 | Kubernetes automation with kubectl — safe apply, context guard, protected contexts | open » |
| Day | Topic | Lesson |
|---|---|---|
| 26 | Kubernetes Operators & CRDs — reconcile loop, status subresource, self-heal | open » |
| 27 | ArgoCD App-of-Apps — leaf & root apps, honest sync status, drift gate | open » |
| 28 | Chaos Engineering — steady-state checks, blast radius, reproducible experiments | open » |
| 29 | Self-Healing systems — liveness probes, restart policy, CrashLoopBackOff | open » |
| 30 | Cost & FinOps — spend report, waste/risk detection, right-sizing gate | open » |
Full curriculum index: docs/curriculum.md
The graduation project ties the platform days together into one real,
end-to-end system: a GitOps-managed, self-healing, cost-observable platform
on Kubernetes — operated entirely with the scripts you built. Every one of
Days 22–30 maps to a real command (up · deploy · operate · chaos ·
heal · cost), and an offline validate keeps it CI-green with no cluster.
bash projects/devops-platform/capstone.sh validate # offline sanity check
bash projects/devops-platform/capstone.sh up --context kind-bash-masteryFull guide: projects/devops-platform/README.md
bash-mastery-devops/
├── lib/ shared libraries (logging, retry, lock, validator, utils)
├── tests/ shared BATS helper
├── days/dayNN/ one self-contained lesson each (README.md + scripts/ + tests/)
├── projects/ capstone projects (Phase 5+)
├── platform/ Kubernetes / ArgoCD / policies / monitoring (Phase 6)
├── docs/ curriculum.md index + reference notes
└── .github/ CI · Security · Release workflows
- pre-commit — shfmt + shellcheck + gitleaks + hygiene hooks. Run per day on
only that day's files:
pre-commit run --files days/dayNN/scripts/*.sh days/dayNN/tests/*.batsor across the whole repo withpre-commit run --all-files. - BATS — every day has a suite;
bats -r daysruns them all. - CI —
.github/workflows/runs lint + tests + security on every push.
See CONTRIBUTING.md for the "day contract" every folder follows.