1.5 CALMS — five ideas in plain English
Why: the problem
People hear "DevOps culture" and think it is just a nice word. It is not. CALMS is a short checklist of five ideas: Culture, Automation, Lean, Measurement and Sharing. Each one shows up in real files and commands. At Zerodha, a small team runs a huge trading platform because they automate almost everything and measure everything. At Atlassian, teams share runbooks and do blameless reviews after outages. If you remember only the five words, you will forget them. If you have done one small thing for each word, you will remember for life. In this lesson you will make each letter real on hello-shop: a shared team rule file for Culture, a Makefile for Automation, small batches for Lean, deploy time and failure counts for Measurement, and a runbook in the repo for Sharing. Then you can explain CALMS in an interview with your own examples, not textbook lines.
What we will build
You will add five small things to the hello-shop repo, one per CALMS letter: a TEAM.md with shared rules, a Makefile so anyone runs the same commands, a habit of small commits, a deploy log with timings that you turn into numbers, and a RUNBOOK.md that tells anyone how to fix the app.
What: every term in plain English
- CALMS — Culture, Automation, Lean, Measurement, Sharing. Five ideas that make DevOps work.
- Culture — How people work together: shared ownership, no blame, help each other.
- Automation — Machines do repeated steps: tests, builds, deploys.
- Lean — Work in small batches and remove waiting and waste.
- Measurement — Track numbers like deploy count, failure rate and time to fix.
- Sharing — Share knowledge, tools and lessons, for example in a runbook.
- Makefile — A file of named commands. make test runs the test command.
- Runbook — A short guide: when X breaks, do these steps.
How: step by step
-
Go to the repo
cd ~/devops-lab/hello-shop && git status -sWhat it does: Start from the lesson 1.4 repo.
Output
(clean) -
C: write team rules
nano TEAM.mdWhat it does: Example 1, part 1.
Output
(file saved) -
A: add a Makefile
nano MakefileWhat it does: Example 1, part 2. Lines under a target must start with a Tab.
Output
(file saved) -
A: use it
make testWhat it does: Anyone runs the same command.
Output
./test.sh [test] PASS -
M: log every deploy
make deployWhat it does: Each deploy appends a line to deploys.log.
Output
[deploy] OK ... logged -
M: turn logs into numbers
./metrics.shWhat it does: Example 2.
Output
deploys: 6 failed: 1 failure rate: 16% -
S: write the runbook
nano RUNBOOK.md && git add -A && git commit -m "CALMS files"What it does: Example 3. Commit it so all see it.
Output
[main 91ac0de] CALMS files
Example 1: Culture and Automation in two small files
Stack. GNU make, Bash, Docker
Goal. Culture and Automation in two small files.
TEAM.md
# hello-shop team rules
- We all own production. Dev and ops are one team.
- Anyone can deploy using `make deploy`. Nobody deploys by hand.
- After an outage we write a blameless note: what failed, not who.
- If you see a problem, you may fix it or raise it. Silence is the only wrong answer.
Makefile
.PHONY: test package deploy logs
TAG := $(shell git rev-parse --short HEAD)
test:
./test.sh
package: test
docker build -q -t hello-shop:$(TAG) .
deploy: package
./pipeline.sh && echo "$$(date +%F_%T) $(TAG) ok" >> deploys.log || \
(echo "$$(date +%F_%T) $(TAG) fail" >> deploys.log; exit 1)
logs:
docker logs --tail 20 shop
What each line does
We all own production— Culture written down, so new joiners know it on day one..PHONY— Tells make these are commands, not file names.TAG := $(shell git rev-parse --short HEAD)— The commit ID, same idea as lesson 1.4.package: test— package needs test to pass first. A gate.>> deploys.log— Records every deploy with time, tag and result.$$(date ...)— In a Makefile, $$ means a real $ for the shell.
Green output
$ make deploy
./test.sh
[test] PASS
docker build -q -t hello-shop:91ac0de .
sha256:2b7c...
[package] hello-shop:91ac0de
[deploy] OK hello-shop:91ac0de -> hello-shop v1: cart is fast
$ tail -1 deploys.log
2026-10-25_18:40:12 91ac0de ok
Expected result. One shared command for everyone. Culture says anyone can deploy; automation makes it safe for anyone to deploy.
Example 2: Measurement: turn the deploy log into the numbers managers ask for
Stack. Bash
Goal. Measurement: turn the deploy log into the numbers managers ask for.
metrics.sh
#!/usr/bin/env bash
total=$(cat deploys.log | wc -l)
failed=$(grep -c " fail$" deploys.log || true)
rate=$(( failed * 100 / total ))
today=$(grep -c "^$(date +%F)" deploys.log || true)
echo "deploys: $total failed: $failed failure rate: ${rate}%"
echo "deploys today: $today"
echo "last 3:"; tail -3 deploys.log
What each line does
cat deploys.log | wc -l— Counts lines, one line per deploy.grep -c " fail$"— Counts lines that end in fail.$(( failed * 100 / total ))— Change failure rate in percent.grep -c "^$(date +%F)"— Deploys that happened today.tail -3— The latest three deploys.
Green output
deploys: 6 failed: 1 failure rate: 16%
deploys today: 6
last 3:
2026-10-25_18:31:02 a1f00e2 fail
2026-10-25_18:35:44 c0de991 ok
2026-10-25_18:40:12 91ac0de ok
Expected result. These are two of the four DORA metrics used by Google and most big companies: deployment frequency and change failure rate. Lesson 1.10 uses them again.
Example 3: Lean and Sharing: small batches and a runbook anyone can follow
Stack. Git, Markdown
Goal. Lean and Sharing: small batches and a runbook anyone can follow.
RUNBOOK.md
# hello-shop runbook
## Site down (curl localhost:8000 fails)
1. `docker ps -a --filter name=shop` - is the container up?
2. `make logs` - read the last 20 lines.
3. If a new deploy broke it: `git log --oneline -3`, then
`git checkout PREVIOUS_COMMIT && make deploy && git checkout main`.
4. Write a blameless note in incidents/ with time, cause, fix.
## Disk full
1. `df -h /`
2. `docker system df` then `docker image prune -f`
small-batches.txt
Big batch (old way) Small batches (lean way)
1 commit, 14 files changed 7 commits, 1-2 files each
1 deploy per month 7 deploys in one day
if broken: which of 14? if broken: only the last small commit
What each line does
## Site down— Sections are named by symptom, the way people search at 2 a.m.make logs— Reuses the shared Makefile. Same tools for all.git checkout previous && make deploy— A clear rollback path anyone can run.incidents/— Shared learning from each outage.7 commits, 1-2 files each— Lean: small batches are easy to review and undo.
Green output
$ git log --oneline -4
91ac0de CALMS files
c0de991 add runbook disk section
a1f00e2 try new port (failed, reverted)
7b21e04 faster cart
$ git show --stat a1f00e2 | tail -1
1 file changed, 1 insertion(+), 1 deletion(-)
Expected result. When a1f00e2 failed, only one line changed, so the cause was found in seconds. The runbook means anyone, not only the author, can fix the site.
Verify: did it work?
-
Check all five files exist
ls TEAM.md Makefile deploys.log metrics.sh RUNBOOK.mdWhat it does: One file per CALMS idea (Lean is a habit seen in git log).
Output
Makefile RUNBOOK.md TEAM.md deploys.log metrics.sh -
Check the commit size habit
git log --stat --oneline -3 | grep changedWhat it does: Small numbers mean small batches.
Output
3 files changed, 34 insertions(+) 1 file changed, 6 insertions(+) 1 file changed, 1 insertion(+)
When it is red 1
Makefile:5: *** missing separator. Stop.
Cause. The command line under a target starts with spaces, not a Tab.
Fix, step by step
- Open the Makefile.
- Replace the leading spaces with one Tab.
- In nano, type Tab; in VS Code turn off "insert spaces" for Makefiles.
When it is red 2
make: *** No rule to make target 'deploy'. Stop.
Cause. You are not in the folder with the Makefile, or the name is wrong.
Fix, step by step
- pwd and ls Makefile.
- Check the target is spelled deploy: at the start of a line.
When it is red 3
expr: division by zero / metrics show 0 deploys
Cause. deploys.log is empty or missing.
Fix, step by step
- Run make deploy once first.
- Then run ./metrics.sh.
Cleanup
-
Keep the files
git status -sWhat it does: These files stay for later lessons.
Output
(clean) -
Stop the app
docker rm -f shopWhat it does: Frees port 8000.
Output
shop
Ravindra Bagale's Tip
Do not only memorise the five CALMS words. Make one small file for each word. In an interview, tell your own example.
CALMS चे पाच शब्द पाठ करू नका. प्रत्येक शब्दासाठी एक file करा. Interview मध्ये स्वतःचे उदाहरण सांगा.
CALMS के पाँच शब्द सिर्फ रट मत लो. हर शब्द के लिए एक छोटी file बनाओ. Interview में अपना उदाहरण बताओ.
Practice tasks
Easy Add the Makefile
Why: One shared command removes "how do you run it?" questions.
What to do: Add test, package, deploy and logs targets.
- Use Tabs.
Check: make deploy works.
Medium Measure a week
Why: Numbers beat opinions.
What to do: Deploy several times and run metrics.sh.
- Fail one deploy on purpose.
Check: You can say your failure rate.
Hard Write a blameless note
Why: Sharing lessons stops repeat outages.
What to do: Write incidents/2026-10-25.md for the failed deploy.
- Time, impact, cause, fix, follow-up. No names.
Check: A teammate learns the fix from it.
Easy Say CALMS in two lines
Why: If you can say it simply, you understand it. Interviewers want the short version first.
What to do: Write two short lines about CALMS for a fresher who knows only basic Linux.
- Write the problem it solves.
- Write one real command or file that shows it.
- Read it aloud to a friend.
Check: A fresher understands it without asking a question.
Easy Make a safe lab folder
Why: Practice needs a place you can throw away. Then mistakes cost nothing.
What to do: Create a lab folder for this chapter and work only inside it.
- mkdir -p ~/devops-lab && cd ~/devops-lab
- Run every command of this lesson from here.
- Check with pwd before you delete anything.
Check: All lab files live in ~/devops-lab.
Medium Repeat it in a container
Why: Your laptop is not the server. A clean Ubuntu container shows what a fresh server needs.
What to do: Run the main steps of this lesson again inside an Ubuntu container.
- docker run --rm -it -v "$PWD":/lab -w /lab ubuntu:24.04 bash
- apt update and install what is missing.
- Note every missing tool.
Check: Same result inside the container, or a list of what you had to install.
Medium Break it on purpose
Why: You must know the red message by face. In an outage there is no time to read slowly.
What to do: Cause one error from the "When it is red" part of this lesson and fix it.
- Follow the error section.
- Copy the exact message into your notes.
- Write the fix in one line.
Check: You fixed it using only the steps, without searching the web.
Medium Write a one-page runbook
Why: At 2 a.m. nobody remembers the right command. A short page saves the on-call person.
What to do: Write a runbook page for this lesson.
- Title, when to use, exact command, how to check, how to undo.
Check: A teammate can follow it alone.
Hard Explain it like an interview
Why: Interviewers want real stories, not definitions.
What to do: Record a 60 second answer about this lesson.
- Say the problem, the command or file you used, and one error you hit.
Check: Your answer has a real command and a real error message.
Hard Draw the flow top to bottom
Why: A drawing shows who does what and in which order.
What to do: Draw this lesson as boxes from top to bottom.
- Start at the developer laptop, end at the user on the website.
Check: Each box matches a real thing you ran.
Homework: try at home
Try at home
At home, pick a team you are in (college project, cricket team, family trip). Write one line for each CALMS letter about how that team works, and one improvement for each.
Recap
- CALMS: Culture, Automation, Lean, Measurement, Sharing.
- Culture can be written down, like TEAM.md.
- Automation means shared commands, like make deploy.
- Lean means small commits and small releases.
- Measure deploys and failures; share runbooks and blameless notes.
FAQ
Is CALMS a tool?
No. It is a checklist of ideas. Tools only help with A and M.
Who made CALMS?
It grew from the early DevOps community; Jez Humble helped popularise it.
Is make still used?
Yes, many teams use a Makefile as a simple front door to commands.
What are DORA metrics?
Deployment frequency, lead time for changes, change failure rate and time to restore service.
How do I show culture in an interview?
Give a real story: a blameless review, helping another team, or sharing a runbook.
Interview questions
-
Explain CALMS with examples.
Culture: shared ownership and blameless reviews. Automation: one make deploy. Lean: small commits. Measurement: deploy count and failure rate. Sharing: runbooks in the repo.
-
What are the four DORA metrics?
Deployment frequency, lead time for changes, change failure rate, mean time to restore.
-
Why are small batches safer?
Less to review, easier to test, faster to find and undo the bad change.
-
What is a blameless postmortem?
A review of an incident that looks at system causes and fixes, not personal blame.
-
How do you share knowledge in a DevOps team?
Runbooks and docs in the repo, demos, pairing and shared dashboards.
Quick quiz
Q1. What does CALMS stand for?
Culture, Automation, Lean, Measurement, Sharing.
Q2. Which file showed Automation?
The Makefile.
Q3. What is change failure rate?
Failed deploys divided by total deploys.
Q4. Why must Makefile lines start with a Tab?
make uses the Tab to know it is a command line.
Q5. What is a runbook?
A short guide with steps to fix a known problem.
Did you understand? Let us try it once more.
Revision card
Interview card