igergov.com
← Writing
DevOpsTeaching · 7 min · BG EN ES DE

One app, ten problems

How a small notes app goes through the whole of DevOps when each step solves the problem the previous one created.

In the DevOps course at TU-Sofia, all ten labs are done on the same application: a small API for notes. It is the lab template, and at the start of the semester all it can do is save and read notes.

The idea is simple. No technology shows up because “that is how it is done”. Each one arrives because the previous step created a problem that can no longer be solved by hand. Docker shows up when the code will not start on a teammate’s machine. The database shows up when the notes disappear on restart. Kubernetes shows up when one server is no longer enough.

Walk the path yourself

Press “Next problem” and watch each step give rise to the next. On the left you can see what we have added so far.

What we have so far
What hurts

We have an idea: a small API for notes. For now it is just code on one machine, and the notes live in memory and disappear on restart.

What we add · The app

We write it in Python with FastAPI. It is simple on purpose: the point of the course is everything around it. It has pytest tests from day one.

GET  /health     → {"status": "ok"}
GET  /notes
POST /notes      → title is required, 1 to 100 characters
GET  /notes/{id} → 404 if it does not exist

Why in this order

The order is not random. Each step only makes sense once the previous one is in place:

  • CI has nothing to run until there are tests and a shared repository.
  • Automatic deployment is dangerous without CI, because it will ship broken code too.
  • Kubernetes is useless without an image, and its probes need the app to be able to say whether it is alive and ready. That is why /health and /ready are in the template from day one, long before we get to a cluster.
  • The model is easy to deploy because the pipeline already exists. MLOps applies the same rules to one more artifact.

By the end of the semester the students have one working system in which every piece is there because something hurt without it.