DevOps Kit Lessons Lesson 9 of 18

Checking your sign-in…

🔒

This lesson is in Phase 2 — ₹799, one-time

Pay once with UPI, card or netbanking. Keep it forever. Your progress saves, so you can stop and come back.

← Back to all lessons

Start Here — Phase 2: Linux, Git, Docker and More

Phase 2 · The Rest of DevOps

What this is and why it matters

Phase 2 teaches you DevOps: the tools that build and run modern software, from files to the pipeline that ships code.

In real work, the costliest failure is not knowing how your software runs — a small problem becomes a long outage.

You learn by doing, on your own computer, one small thing at a time, and finish with four finished projects you can show.

Your level in Whole System & On-Call
✓ Step 1 · Beginner ← You are here→Step 2 · Intermediate→Step 3 · Advanced
After this lesson you can: Explain what Phase 2 teaches, in what order, and what you will have at the end.
Next: Zero-Cost Lab — Set up your machine and run your first container. Do this first. See Zero-Cost Lab.
Try it Yourself »Open the practice terminal and run it yourself — nothing installs. Included with Phase 2. Simulation — practice version. The real thing is the same checks, on your own machine.

Who this is for

A beginner who wants to learn DevOps but does not know where to start. You need only a computer and internet. No paid course is needed to start. This is Phase 2 of the DevOps Kit. Phase 1 teaches the data tier (Kafka, PostgreSQL, Redis, object store, load balancer). Which one you do first is in the order box below — read it before you start.

The order for the whole kit — read this first

Do the kit in this order. Do not bounce between packs.

  1. Lesson 0 first. It teaches the words, installs Docker, and runs your first container.
  2. If Lesson 0 felt hard, or you have never used a terminal before, do Phase 2 next. Phase 2 teaches Linux, Git, and Docker from zero.
  3. Then do Phase 1. Its labs use the terminal and Docker you now have.

If you hold only Phase 1: do Lesson 0, then the Phase 1 labs in order. You do not need Phase 2 to start. If you hold only Phase 2: do Phase 2 in order. You do not need Phase 1 to start. Phase 1 comes after, when you want the data tier.

What is DevOps, in plain words?

  • DevOps is a way of working.
  • One group of people writes the software.
  • Another group runs the software, so other people can use it.
  • In DevOps, those two jobs are done together, not by two separate teams.
  • The tools in this phase are the tools that build software and run it.

What is Phase 2, in plain words?

  • Phase 2 teaches you seven tools, in this order: Linux, Git, Docker, Kubernetes, Terraform, CI/CD, Monitoring.
  • Linux is the operating system you type commands into.
  • Git saves versions of your work, so you can go back.
  • Docker runs one program in a sealed box, called a container.
  • Kubernetes runs many of those boxes and keeps them running.
  • Terraform writes down what computers and settings you want, in a file.
  • CI/CD is an automatic chain of steps: test the code, then build it.
  • Monitoring watches your app and tells you if it is up, slow, or out of memory.

What is Phase 1, and which phase do I do first?

  • Phase 1 teaches the data tier.
  • The data tier is where your app keeps its data: Kafka, PostgreSQL, Redis, a file store, and a load balancer.
  • A terminal is a window where you type commands instead of clicking.
  • Docker is the sealed-box tool above.
  • Which phase to do first is in the order box at the top of this file ("The order for the whole kit"). Follow it — it is the same order printed in Lesson 0.
  • If you only have the Phase 2 download, that is fine.
  • Phase 1 is a separate pack. You do not need it to start Phase 2.

Test status — read this first

The kit's text was reviewed line by line and rewritten in plain words on 20 November 2026. But the labs were NOT run end-to-end on a clean machine yet. Where a lab says so, that note stays until a clean test run passes. This kit works in a Linux terminal: Ubuntu/Debian directly, or WSL2 Ubuntu on Windows. On a Mac, use Docker Desktop for Docker, but run the kit's commands in a Linux terminal — do not run the Ubuntu/Debian install commands on macOS. Other setups (including ARM64 machines) are unverified — each lab says so where it matters.

The one rule

Learn one step at a time, in the order below. Do not jump to Kubernetes before you can use Linux and Git. At every step, build one small thing. Reading alone is not enough.

How to use these files

  • zero-cost-lab.md — set up your machine and run your first container. Do this first.
  • break-and-fix-labs.md — practise fixing things that break on purpose. Do these as you learn each tool.
  • portfolio-projects.md — the four projects that prove your skills. Build them in order. Project 4 uses the Phase 1 data tier.
  • kubernetes-lab.md — run your Project 1 app on a small local cluster. Do this in Step 4.
  • cheat-sheets.md — keep open while you practise. It now covers the Phase 1 tools too (Kafka, PostgreSQL, Redis, Moto).
  • interview-pack.md — practise answering out loud, after the projects. It now includes questions on the Phase 1 tech too.
  • resume-bullets.md — turn finished projects into honest resume lines.
  • best-sites.md — only when you are stuck on a topic and want another explanation.

What is inside your downloaded zip

This kit is a hands-on learning environment that lets you practice real DevOps tasks directly on your own computer.

You download it so you can learn the tools that build and run software on your own computer, without paying for cloud servers.

Inside your download, you will find step-by-step guide files, cheat sheets, and templates to record your completed work.

If you hit an issue while learning, the break-and-fix labs teach you to find the cause — and the stuck-path below shows the three steps to get help.

The Phase 2 zip unzips into one folder. It holds only guide files — no lab folders, no scripts, nothing to install:

The labs in Phase 2 run on your own machine with Docker. The Phase 1 kit (a separate pack) holds the data-tier labs with their lab folders and helper scripts. Do not look for those in the Phase 2 folder. They are not there.

If you get stuck

  1. Run the kit-doctor check — but only if you have the Phase 1 kit.
  2. WHAT it is: kit-doctor.sh is a script that checks Docker, ports, disk, and memory, and prints a plain-English FIX line for anything wrong.
  3. WHERE it lives: in the Phase 1 kit folder, at phase1/kit-doctor.sh. A port is a numbered door for network traffic. Disk is your storage space. Memory is your computer's short-term working space.
  4. HOW to run it: open a terminal in the Phase 1 kit folder and run bash kit-doctor.sh. bash means "run this with Bash", the command language. kit-doctor.sh is the file name.
  5. If you only have Phase 2, there is no kit-doctor script in the Phase 2 folder — run these five checks by hand instead. They check the same things the script checks: Docker installed, Compose installed, Docker running, Docker able to run a container, and enough free disk space. Run them one at a time, in order, and read what each one prints before the next.
  6. docker --version — WHAT: ask Docker its version number. WHY: if it prints a version, Docker is installed. What to see: a line like Docker version 27.5.1. Your number may be newer — that is fine. If it says command not found, Docker is not installed yet. Go to zero-cost-lab.md Step 2 and install it.
  7. docker compose version — WHAT: ask Compose its version number. WHY: every lab uses Compose to start its containers. What to see: a version line, with no error. If it errors right after installing Docker, Docker may still be starting. Wait one minute and try again.
  8. docker ps — WHAT: list the containers that are running. WHY: this proves Docker itself is running, not just installed. What to see: a list — even an empty list — with no error. If it says Cannot connect to the Docker daemon, Docker is not running yet. Open Docker Desktop and wait until it says it is running, then try again.
  9. docker run --rm hello-world — WHAT: download the tiny test program and run it once, then clean up after itself. WHY: this proves Docker can download an image and run a container. --rm means "remove the box when it stops". What to see: the two lines Hello from Docker! and This message shows that your installation appears to be working correctly. If it fails to download, check your internet connection and try again.
  10. df -h . — WHAT: show how much disk space is free, in the folder you are standing in. WHY: the lab images are big — keep several GB free. df means "disk free". -h means "show the sizes in GB, so a person can read them". . means "this folder". What to see: a line with a number under Avail — that is your free space. If it is under 4 GB, free space first: delete files you do not need, or empty the trash, then try the lab again.
  11. If all five checks pass, your machine is ready. If any one fails, fix that one first, then run the five again.
  12. Look the exact error line up in the Error Decoder.
  13. WHAT it is: a guide in the Phase 1 kit that explains Docker errors in plain words.
  14. WHERE it lives: in the Phase 1 kit, in the file error-decoder.md. If you only have Phase 2, you do not have this file. Use step 3 instead, or use the break-and-fix lab that matches your error: a container that will not start is Lab 1, a container that dies is Lab 2, a port clash is Lab 1 second version and Lab 5, a failed build is Lab 6, a failed pipeline is Lab 3, a merge conflict is Lab 4.
  15. Email support@promptstudioai.in with the exact error line and the step you were on. The kit says the team replies within 24 hours. Copy the error line exactly — do not retype it from memory.

Words you will see a lot

  • DevOps — a way of working where building software and running software are done together, not by two separate teams.
  • Server — a computer that runs your app for other people to use.
  • Cloud — renting servers on the internet instead of owning them.
  • Pipeline — an automatic chain of steps: test the code, then build it. Putting it live (deployment) is a separate later stage, with its own checks.
  • Container — a small box that holds an app and the things it needs to run. It helps the app run the same way on machines that are set up the same way. The machine, its settings, and outside services can still change the result.
  • Terminal — a window where you type commands instead of clicking.
  • Image — a saved, ready-to-run copy of an app, built from a Dockerfile (the recipe file). A container is an image running.
  • Repository (repo) — a project folder that Git tracks, usually stored on GitHub.
  • YAML — a plain-text way of writing settings with indentation. Spaces matter. Pipelines, Compose files, and Kubernetes files all use it. Never use the Tab key in a YAML file.
  • Script — a small text file full of commands, which runs them one by one for you.
  • DNS — the internet's address book: it turns a name like example.com into a computer's address.
  • HTTP — the language a browser uses to ask a web server for a page.

The order

Step 1 — Linux (about 2 weeks, 1–2 hours a day)

  • What you learn: moving around folders, listing files, reading files, file permissions, running and stopping programs, checking what is using the machine, and writing one tiny script.
  • A script is a small text file full of commands. It runs them one by one for you.
  • File permissions are the rules that say who can read, change, or run a file.
  • You also learn three network basics: a port (a numbered door for network traffic), DNS (the internet's address book: it turns a name like example.com into a computer's address), and HTTP (the language a browser uses to ask a web server for a page).
  • Skip for now: deep system setup, kernel details, advanced networking.
  • Kernel means the core of the operating system. You do not need it yet.
  • You are done when: you can set up a folder, install a tool, and find why a program stopped, using only the terminal.
  • How to know you are on track: by the end of week 1 you can move around folders and list files without looking at notes. By the end of week 2 you can write the tiny script in zero-cost-lab.md Step 8 and it runs.
  • The gotcha most intermediates miss: a tool you just installed says command not found. The install finished, but the terminal you are typing in was opened before the install, so it does not know the new tool yet. Open a NEW terminal window and try again. If it still fails, the install itself did not finish. Second trap: rm has no undo. A file deleted with rm is gone — there is no trash folder to get it back from. Never type rm with a star (*, which means "every file here") unless you have listed the files first with ls.
  • How to tell you actually know Linux: fix a program that stopped, using only the terminal: find its log lines, read the last error, and say in one sentence why it stopped — without looking at your notes. If you can do that, you know Linux well enough for this kit.
  • If you are slower than 2 weeks, that is fine. Slow is fine.
  • Finished projects beat finished videos.

Step 2 — Git (about 1 week)

  • What you learn: save your work, look at past versions, make a branch, merge it back, fix a merge conflict, and push to GitHub.
  • A branch is a separate line of work, so you can try changes without touching the main line.
  • A merge conflict is when two people changed the same lines.
  • Git stops and asks you to choose. That is normal, not a disaster.
  • GitHub is a website that stores your Git work online.
  • Skip for now: rewriting history, complex merge tricks.
  • You are done when: your practice work lives on GitHub with a clear history of changes.
  • How to know you are on track: by day 3 you can save a change and see it in the history. By day 7 you can make a branch, change a line, and merge it back.
  • The gotcha most intermediates miss: adding a file to .gitignore does NOT remove it from Git if it is already tracked. A tracked file is one you have already committed. Git keeps showing it, and keeps its whole history — including any password that was in it. If you committed a password by mistake, deleting the file does not fix it: the old version is still in the history. The fix is two parts. First, stop tracking it with git rm --cached <file> — that means "stop tracking this file, but leave the file itself on my machine" — and commit that. Second, change the password, because anyone with the old history can still read it.
  • How to tell you actually know Git: make a branch, change one line, merge it back, and fix a merge conflict — without deleting the folder and starting over. If you can recover from the conflict instead of escaping it, you know Git.
  • The hands-on practice for a conflict is break-and-fix-labs.md Lab 4.

Step 3 — Docker (about 2–3 weeks)

  • What you learn: what a container is, how to build one from a Dockerfile, how to run it, map ports, stop it, and share files with a container.
  • A Dockerfile is a short recipe file. It says how to build an image.
  • An image is a saved, ready-to-run copy of an app.
  • A container is an image running.
  • A named volume keeps data after the container is removed.
  • A bind mount shares one of your folders into the container.
  • Files written only inside a container are lost when it is removed.
  • That is the difference: a volume saves data, a bind mount shares a folder, and plain files inside a container disappear with it.
  • Skip for now: Docker Swarm, advanced networking, building your own base images.
  • You are done when: you can put a small website in a container and open it in your browser.
  • How to know you are on track: by the end of week 1 you can run the ready-made nginx web server in a container. By the end of week 2 or 3 you can build your own image from a Dockerfile.
  • The gotcha most intermediates miss: docker ps shows only containers that are running RIGHT NOW. A container that started and stopped at once is invisible there — and "started and stopped at once" is the most common Docker failure there is. Use docker ps -a to see stopped boxes too, then docker logs <name> to read the last lines the app printed before it stopped — the reason is almost always in those lines. Second trap: the tag latest moves. The image called latest today may not be the image called latest next week, because the makers can replace it at any time. When you need the same thing twice, name the version, the way the kit names postgres:16-alpine.
  • How to tell you actually know Docker: explain, without notes, why a container that says Exited is not always broken — and prove it by reading its logs and saying what it did before it stopped.
  • The hands-on lab is zero-cost-lab.md Steps 3 to 5.

Step 4 — Kubernetes (about 3–4 weeks)

  • What you learn: pods, deployments, services, and reading logs.
  • A pod is the smallest thing Kubernetes runs, usually one container.
  • A deployment is a way to say how many copies of your app should run.
  • You set the number. The usual starting point is 1 copy.
  • One copy is enough while you are learning. More copies are for when many people use your app at once.
  • A service is a stable address inside the cluster for your app.
  • A cluster is a group of machines (here, one pretend machine on your own computer) that Kubernetes runs your app on.
  • Logs are the lines of text your app prints while it runs.
  • Reading logs is how you find out why something broke.
  • Skip for now: service mesh, operators, running a big production cluster.
  • A service mesh is a tool that manages traffic between many services. An operator is a program that runs another program for you. You do not need either yet.
  • You are done when: you can run your container app on a small local cluster, expose it with a Service, and fix it when it crashes.
  • How to know you are on track: by the end of week 2 you can start the local cluster and see one node that says Ready. By the end of week 3 or 4 your app runs as a pod and you can open it in a browser.
  • The gotcha most intermediates miss: kubectl get pods can show nothing while your app is running — because you are looking in the wrong namespace. A namespace is a named group inside the cluster, and the command only shows the default group unless you ask for another. If your pods are missing, ask which namespace they are in before you conclude they are gone. Second trap: a pod stuck in CrashLoopBackOff is not fixed by deleting the pod. Kubernetes starts it again with the same broken image, so it crashes again. Read its logs first with kubectl logs — the fix is in the image or the settings, not in the pod. (You already met the kind image trap in the lab: a kind cluster cannot see images sitting in your local Docker by itself.)
  • How to tell you actually know Kubernetes: read kubectl get pods and say, from the STATUS and RESTARTS columns alone, whether the app is healthy, crashing in a loop, or never started — and what you would check next.
  • The hands-on lab is kubernetes-lab.md. It walks you through kind (a tool that runs a small cluster as containers on your machine), your Project 1 app, a Service, and fixing a crashed pod.
  • The tools kind and kubectl are installed in that lab, not in this lesson. Do not try to install them from this map alone.

Step 5 — Terraform (about 2 weeks)

  • What you learn: writing down what infrastructure you want in a file, and letting Terraform create it.
  • Terraform is called "infrastructure as code".
  • Infrastructure means servers, networks, and settings.
  • "As code" means you write it down in a file, instead of clicking buttons each time.
  • Terraform keeps a state file.
  • A state file is a file that maps each thing in your file to the real thing Terraform created. It stores what Terraform needs to plan the next change.
  • State can hold private details, so never put it in a public repository.
  • A repository is a project folder that Git tracks, usually stored on GitHub. Public means anyone on the internet can see it.
  • Skip for now: remote state servers, workspaces, writing your own modules.
  • A remote state server is a shared place to keep the state file. A workspace is a separate copy of the settings for one environment. A module is a re-usable block of Terraform files. You do not need any of these yet.
  • You are done when: one Terraform file creates your practice setup, and running terraform plan again shows nothing to change.
  • terraform plan is a command that shows what Terraform would change, without changing anything yet.
  • "Nothing to change" means your file and the real setup already match.
  • If the plan shows changes, read it before you apply.
  • Apply means: go ahead and make the changes.
  • Drift is the word for when the real setup changed without Terraform knowing — for example, someone changed a setting by hand. If drift happened, the plan will show changes. Read them first.
  • How to know you are on track: by the end of week 1 you can write a file that describes one small setup. By the end of week 2 you can run terraform plan and read what it says.
  • The gotcha most intermediates miss: the state file is the one thing you must never lose. It is the map between your file and the real things Terraform built. Lose it, and Terraform thinks nothing exists yet, so the next apply tries to build everything a second time. Never delete it, and never put it in a public repository — it can hold private details. Second trap: terraform plan saying "no changes" only means your file matches the state file. If someone changed the real setup by hand, the plan shows their change as something for YOU to change back — read it before you apply.
  • How to tell you actually know Terraform: read a terraform plan and say in plain words what will be created, changed, and destroyed — before you type yes to apply. If you cannot say it, do not apply it.
  • Terraform has no install step in this lesson. Its lab will tell you how to install it when you reach it. Do not install it now.

Step 6 — CI/CD (about 2 weeks)

  • What you learn: a pipeline that runs on every code change — run a simple test, then build it.
  • A pipeline is an automatic chain of steps, like a factory line.
  • CI means continuous integration: merging code often and testing it.
  • CD can mean two things. Continuous delivery means a change is kept tested and ready to release. Continuous deployment means a passing change is released automatically, with no human step.
  • This kit's pipeline tests and builds. It does not deploy.
  • Deploy means putting a new version live for real users.
  • That is a separate later stage, with its own checks.
  • So when this kit says "pipeline", it means test, then build.
  • When it says "deployment", it means putting it live. They are different steps.
  • Skip for now: multi-environment release rules, canary deployments.
  • A canary deployment sends a new version to a few users first, to check it works, before sending it to everyone.
  • You are done when: pushing code to GitHub starts your pipeline by itself and you can read its log when it fails.
  • Pushing means sending your saved work from your machine to GitHub.
  • How to know you are on track: by the end of week 1 you can read a pipeline log and find the first error line. By the end of week 2 your own push starts the pipeline on its own.
  • The gotcha most intermediates miss: the pipeline runs on a fresh machine, not yours. A file that exists only on your laptop — a setting you never committed, a tool you installed by hand — breaks the pipeline even though everything works for you. When a pipeline fails and your machine passes, the first question is: "what does my machine have that the pipeline machine does not?" Second trap: a green pipeline can lie. A test that checks nothing passes every time — you met this one in break-and-fix-labs.md Lab 3, the fake-green test.
  • How to tell you actually know CI/CD: read a failed pipeline log, find the FIRST error line, and name the one fix — without re-running the whole pipeline to guess.
  • The hands-on practice is break-and-fix-labs.md Lab 3.

Step 7 — Monitoring (about 1–2 weeks)

  • What you learn: Prometheus and Grafana, and what to watch.
  • Prometheus collects numbers about your app, like how much memory it uses.
  • Grafana turns those numbers into charts you can look at.
  • Learn what to watch: is the app up, is it slow, is it out of memory?
  • Up means running and answering. Slow means answering, but late. Out of memory means it ran out of working space and may crash.
  • Skip for now: alerting rules for big teams, log analysis platforms.
  • Alerting rules are automatic messages that say "something is wrong". A log analysis platform is a tool that searches through huge piles of log lines. You do not need either yet.
  • You are done when: you have a Grafana chart showing your monitoring targets are up.
  • A monitoring target is one thing Prometheus checks, for example your app's address.
  • How to know you are on track: by the end of week 1 you can open Grafana and see a chart. By the end of week 2 the chart shows your app as up.
  • The gotcha most intermediates miss: a chart can say "up" while the app is broken. If the check only asks "are you there?", the app can answer yes while its database is down and every real request fails. "Up" only means what the check actually tested — so ask what the check tests before you trust the chart. Second trap: a flat line is not proof that nothing changed. A chart that never moves can mean the collector stopped sending numbers, not that the app is steady. If a chart looks too perfect, check that Prometheus is still collecting.
  • How to tell you actually know Monitoring: look at a Grafana chart and say whether the app is up, slow, or out of memory — and name the next thing you would check if the chart said "up" but users said "broken".
  • The setup is in Project 3 in portfolio-projects.md.
  • Prometheus and Grafana have no install step in this lesson. Project 3 tells you how to set them up when you reach it. Do not install them now.

After Step 7 — Phase 1 (the data tier)

  • When you can run Docker and read logs, do Phase 1.
  • Phase 1 teaches: Kafka (a message queue — a line of messages waiting to be handled, one by one), PostgreSQL with a standby copy and Patroni failover, Redis (a fast memory store), Moto (a file store), and NGINX as a load balancer.
  • A standby copy is a second copy of the database, waiting in case the first one fails.
  • Failover means the standby copy takes over when the main one fails.
  • A load balancer shares incoming visits across more than one copy of your app, so no single copy gets all the traffic.
  • Phase 1 ends with an end-to-end lab where a fake order flows through all of them at once, and you kill the main database and watch the standby take over.
  • End-to-end means from the first step to the last step, all together.

Rough total

  • About 3–4 months at 1–2 hours a day for Phase 2, plus about 1 week for Phase 1.
  • These are rough guides, not promises.
  • Topics overlap, so the total is not the sum of the longest estimates.
  • For example, you use Git every day while you learn Docker, so the Git week and the Docker weeks overlap. You do not add them all up.
  • If you miss a day, just continue the next day. The weeks are guides, not deadlines.
  • Slow is fine. Finished projects beat finished videos.

What to skip entirely for now

  • Learning every tool at once.
  • Paid certificates before you have projects.
  • Copying commands you do not understand. If a command fails, read the error message first. That is the real skill.

What this kit will NOT promise

  • No job guarantee. No salary number.
  • This kit teaches skills and helps you build proof.
  • Hiring depends on the employer, the market, and your interview.
  • Things no kit can promise.

Sources (1–3)

  • roadmap.sh/devops — https://roadmap.sh/devops — the whole path in one picture: Linux, Git, Docker, Kubernetes, Terraform, CI/CD, monitoring, in order. Use it as a map, not a course.
  • freeCodeCamp — https://www.freecodecamp.org — free written guides and video series on Linux, Docker, and Kubernetes basics.
  • TechWorld with Nana (YouTube) — https://www.youtube.com/@TechWorldwithNana — slow, visual explanations of Docker, Kubernetes, and CI/CD ideas, with diagrams.

Quick check — try it yourself

Question: In the terminal, type: git --version — what exact version line does it print?

Open the practice terminal to test this →

Show answer

In the practice terminal, you should see git version 2.43.0 (your own computer may show a different version number).