DevOps Kit Lessons Lesson 15 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

Portfolio Projects — Proof, Not Just Notes

Phase 2 · The Rest of DevOps

What this is and why it matters

A portfolio project is a small finished thing you built, that an employer can open and run.

Think of it like a photo album of things you made.

A list of courses you watched proves nothing. A working project you can show is the proof that you did the work.

One idea per line below.

  • A project is one finished piece of work, with files, that does something real.
  • A repository is a folder on GitHub that holds a project. GitHub is a website where code lives and where other people can see it.
  • A README is the front page of a repository. It is a file called README.md that explains what the project is, how to run it, and what you learned. It is the first thing an employer reads.
  • GitHub Actions is the free automatic worker inside GitHub. It runs steps for you whenever you push code.
  • Terraform is a tool that creates infrastructure (containers, networks, machines) from files you write.
  • Prometheus collects numbers from your apps. Grafana turns those numbers into charts.
  • Proof means something an employer can check: a screenshot, a log, a green pipeline run — not just your word.

Build the projects in order. Each one uses the skills from the last. Each one ends with a README you fill in with true things. If something is not done yet, say so in the README. Never write that you did something you did not do.

Your level in Career & Proof
Step 1 · Beginner→✓ Step 2 · Intermediate ← You are here→Step 3 · Advanced
After this lesson you can: Show three completed small projects as proof of hands-on work.
Next: Step 3 · Advanced — Turn finished projects into honest, simple resume bullets. See Resume Bullets.
Advanced challenge: Resume rejected for vague words — rewrite each bullet as action + tool + result, pass the check. — try it in Resume Bullets.

Test status

Syntax-checked only. This lesson was not run end-to-end on a real machine here. Nothing here promises a step works on a real machine. Where a step is unverified, this lesson says so.

Words you need before Project 1

  • A terminal is the black window where you type commands.
  • A folder is a named box that holds files. Directory is the old word for folder.
  • ~ means your home folder — the folder that belongs to you, like /home/learner. So ~/devops-practice means "the folder called devops-practice inside my home folder".
  • cd means "move into a folder". cd ~/devops-practice/my-site means "go and stand in the my-site folder".
  • mkdir -p means "make a folder, and make any missing parent folders too". The -p flag means "do not complain if part of the path already exists".
  • A command is one line you type, then press Enter.
  • localhost means "this machine". http://localhost:8080 means "the program on this machine, door 8080".
  • A port is a numbered door a program listens on.
  • A container is a small sealed box that runs one program. An image is the packed box before it runs.
  • nginx (say "engine-x") is a web server program. It answers browser requests with web pages. It is also the name of the image that holds it.

Project 1 — A website in a container

What is this?

You build a tiny website — one page — and run it inside a Docker container.

Think of it like putting a poster inside a sealed display box. The poster is your web page. The box is the container. Anyone who opens the box's door sees the poster.

Step 1 — Make the folder and the web page

WHAT it is: you make a folder called my-site inside a folder called devops-practice in your home folder, and you put one web page inside it.

WHY: every project needs a home. The folder holds the page and the recipe file. The build commands later only work if you are standing in this folder.

Do it:

First, make the folders. Type this command and press Enter:

Try it Yourself »Open the practice terminal and run it yourself — nothing installs. Included with Phase 2. Simulation — practice version. Run the real lab with Docker to do it for real.
Command
mkdir -p ~/devops-practice/my-site

Word by word:

  • mkdir — make a folder.
  • -p — make the parent folders too if they are missing. Without -p, this command fails if devops-practice does not exist yet.
  • ~/devops-practice/my-site — the folder to make: my-site inside devops-practice inside your home folder.

You should see: nothing. mkdir prints nothing when it works. That silence is normal. Type ls ~/devops-practice to check — you should see my-site listed.

Then move into the folder:

Command
cd ~/devops-practice/my-site

You should see: nothing. cd prints nothing when it works. Type pwd to check — it should print a path ending in my-site.

If it breaks: "No such file or directory" means the folder does not exist yet. Run the mkdir -p command above, then cd again.

Now make the web page. The file is called index.html. index.html is the standard name for a website's first page — when a browser asks for a site, the web server shows index.html first.

You can make it two ways. Pick one.

Way 1 — with the text editor. Type nano index.html, write the text below, press Ctrl+O then Enter to save, Ctrl+X to leave.

Way 2 — straight from the terminal (good for short files). Type this exactly, including the EOF lines:

Command
cat > index.html << 'EOF'
<h1>My DevOps practice site</h1>
<p>This site runs in a Docker container I built myself.</p>
EOF

Word by word:

  • cat — the program that prints or writes text.
  • > — send the text into the file that follows, instead of onto the screen.
  • index.html — the file to write into.
  • << 'EOF' — read the lines I type next, until I type a line that says only EOF. EOF means "end of file".

The text itself: <h1> means "big heading". <p> means "paragraph". These are HTML tags — labels that tell the browser how to show the words.

You should see: nothing after the EOF line, then your normal prompt. Type cat index.html to check — it should print your two lines back.

Step 2 — Add a Dockerfile, the recipe file

WHAT it is: a Dockerfile is a short text recipe that tells Docker how to build your container. It has no file extension — the name is exactly Dockerfile, capital D, nothing after it.

WHY: Docker cannot guess what your container should hold. The recipe says: start from a web server, copy my page in.

Do it:

Make a file called Dockerfile in the same my-site folder, with these two lines:

Command
FROM nginx:1.27-alpine
COPY index.html /usr/share/nginx/html/index.html

Line by line:

  • FROM nginx:1.27-alpine — start from the nginx image, version 1.27-alpine. FROM means "the starting box is". The tag pins the version — the kit never uses latest, which moves. The nginx image already holds the web server program.
  • COPY index.html /usr/share/nginx/html/index.html — copy my file index.html into the container, to the place where nginx looks for web pages. That place is the folder /usr/share/nginx/html/ inside the container. The file at the end of that path must be called index.html, because that is the name nginx shows first. So the line means: "take my page, put it where the web server serves pages from".

You should see: after saving, ls in the folder shows two files: index.html and Dockerfile.

If it breaks: if the Dockerfile is named dockerfile or Dockerfile.txt, Docker will not find it. The name must be exactly Dockerfile.

Step 3 — Build the image and run the container

WHAT it is: two commands. The first builds the image from the recipe. The second starts a container from the image.

WHY: building packs the box. Running opens the box and starts the web server inside it.

Do it — from inside the my-site folder:

Command
docker build -t my-site:1.0 .

Word by word:

  • docker build — build an image.
  • -t — the flag for "tag". It names the finished image.
  • my-site:1.0 — the name and version label, joined by a colon. my-site is the name. 1.0 is your version label. You choose it.
  • . — the dot means "this folder". It tells Docker the recipe and the files are here. This is called the build context.

You should see: lines scrolling past as Docker follows the recipe — one line per step — ending with a line naming your image. If a step fails, the error names the step. Fix that step in the Dockerfile.

Then:

Command
docker run -d -p 8080:80 --name my-site my-site:1.0

Word by word:

  • docker run — start a container from an image.
  • -d — "detached". Run in the background and give me my terminal back.
  • -p 8080:80 — connect two doors: 8080 on YOUR machine, 80 inside the container. Your browser knocks on http://localhost:8080 and Docker passes it to door 80 inside. The order is always outside:inside.
  • --name my-site — call this container my-site, so you can refer to it by name later.
  • my-site:1.0 — the image to run. Note there are now two things called my-site: the container's name (--name my-site) and the image's name (my-site:1.0). They are different things that happen to share a name. The container is the running box. The image is the packed box it came from.

You should see: one long line of letters and numbers — the container ID. A container ID looks like a1b2c3d4e5f6... (64 characters). That line means your site is running.

If it breaks: if port 8080 is already in use, Docker says the port is already allocated. Find the container using it with docker ps — look at the PORTS column for 8080 — and stop it with docker stop <name>. Or run with -p 8081:80 instead and open http://localhost:8081.

Clean up when done: docker stop my-site, then docker rm my-site. stop halts the container. rm deletes the stopped container.

Step 4 — Open the site and check it works

WHAT it is: open http://localhost:8080 in your browser.

WHY: this is the proof. If the page shows, the whole chain worked: the recipe, the build, the run, and the port mapping.

You should see: your heading "My DevOps practice site" and your paragraph. If the browser shows nothing, check docker ps — is the container listed with STATUS Up? Then check docker logs my-site for the error.

Step 5 — Push the folder to GitHub

WHAT it is: put your project folder on GitHub so other people — including employers — can see it.

WHY: a project nobody can open is not proof. GitHub is where the proof lives.

Do it — first time only:

Make a free account on github.com, then make a new repository (a folder on GitHub that holds your project). GitHub will show you an address for it. Then, in your terminal, inside the my-site folder, run the commands GitHub shows you — they connect your folder to GitHub (remote add origin means "remember this GitHub address as the place to send my work to") and send your files up (git push).

Full first-time detail: the kit's zero-cost lab, zero-cost-lab.md, "Step 7 — Put your work on GitHub (first time only)". Follow it there.

After the first time, the short version is enough:

Command
git add .
git commit -m "Add my site"
git push

Word by word: git add . stages every changed file in this folder (the dot means "this folder"). git commit -m "..." saves them as one version with a message. git push sends the saves to GitHub.

README template — fill in the blanks

Make a file called README.md in the my-site folder and fill it in. README.md is the front page of your repository. .md means it is written in Markdown, a simple way of formatting text.

Command
# [Site name]
What it is: [one line]
Tools used: Docker, nginx, HTML
How to run it:
  docker build -t my-site:1.0 .
  docker run -d -p 8080:80 --name my-site my-site:1.0
  Open http://localhost:8080
What I learned: [two lines]
Problems I fixed: [one problem and its fix]

Fill in every [bracket] with your real details. If you have not fixed a problem yet, write "none yet". Do not invent one.


Project 2 — A pipeline that tests and builds

What is this?

A pipeline is an automatic chain of steps that runs when you push code.

Think of it like a factory line with a quality checker at the start. Every time you send code to GitHub, the line runs: first it tests your site, then it builds the Docker image. If the test fails, the line stops and nothing gets built.

A pipeline that only builds is not a pipeline that tests. The test step is the point.

Step 1 — Use Project 1's repository

WHAT it is: you add the pipeline to the same my-site project, in the same GitHub repository. Do not make a new repository.

WHY: the pipeline tests and builds Project 1's site. It belongs with the site.

Step 2 — Make the folder for the workflow file, then add the file

WHAT it is: GitHub Actions looks for pipeline files in one exact place: a folder called .github/workflows inside your repository. A workflow is another word for the pipeline — the file that describes the steps.

WHY the exact place matters: GitHub only looks in .github/workflows. A file anywhere else is ignored.

Do it:

First, make the folder. From inside your project folder (the one that holds index.html), type:

Command
mkdir -p .github/workflows

Word by word:

  • mkdir -p — make a folder, and make missing parent folders too.
  • .github/workflows — the folder to make. .github starts with a dot, which makes it a hidden folder — Linux hides dot-folders from a plain ls. That is normal. workflows sits inside it.

You should see: nothing. mkdir prints nothing when it works. Type ls -la to check — the -a flag shows hidden folders, so you should see .github listed.

Then make a file called .github/workflows/build.yml. .yml means it is a YAML settings file. YAML uses spaces at the start of a line to show which lines belong together — this is called indentation. Use spaces, never the Tab key. A Tab breaks YAML.

Put this text in the file:

Command
name: build
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Test the site
        run: |
          test -f index.html
          grep -q "My DevOps practice site" index.html
      - name: Build the image
        run: docker build -t my-site:1.0 .

Line by line:

  • name: build — the pipeline's name is "build". This is the name GitHub shows in the Actions tab.
  • on: [push] — run this pipeline when someone pushes code. "Push" means sending saved code up to GitHub.
  • jobs: — the list of jobs. A job is a group of steps that run together.
  • build: — the job's name is "build".
  • runs-on: ubuntu-latest — run this job on a fresh computer in the cloud, running the latest Ubuntu Linux. "Ubuntu" is a version of Linux. "Latest" means the newest one GitHub offers. This computer is thrown away when the job ends.
  • steps: — the list of steps inside the job. Steps run in order, top to bottom.
  • - uses: actions/checkout@v4 — the first step. uses means "use a ready-made step someone else wrote". actions/checkout is GitHub's own step that downloads your repository's files onto the cloud computer. @v4 means version 4 of that step. Without this step, the cloud computer has no files to test.
  • - name: Test the site — the second step's name, shown in the log.
  • run: | — run the lines that follow as terminal commands. The | means "the lines below are the commands".
  • test -f index.html — check the file index.html exists. test is a checker program. -f means "is a file". If the file is missing, this command fails, and the pipeline stops here.
  • grep -q "My DevOps practice site" index.html — search inside index.html for the words "My DevOps practice site". grep is the search program. -q means "quiet": do not print anything, just report found or not found. If the heading is missing, this command fails, and the pipeline stops here.
  • - name: Build the image — the third step's name.
  • run: docker build -t my-site:1.0 . — build the Docker image, the same command as Project 1. This step only runs if the test step passed. That is the whole point: a broken site never gets built.

A step that fails stops the pipeline. That is how a test step works: each command returns a pass or a fail, and the first fail stops everything after it.

You should see: after saving, ls .github/workflows/ shows build.yml.

Step 3 — Push, open the Actions tab, and watch the pipeline run

WHAT it is: send the new file to GitHub, then watch the pipeline run on GitHub's website.

WHY: the pipeline only runs on GitHub, not on your machine. You have to push before anything happens.

Do it:

Push the change:

Command
git add .
git commit -m "Add build pipeline"
git push

Then open your repository on github.com and click the Actions tab. The Actions tab is the tab at the top of your repository page, between "Pull requests" and "Projects". It lists pipeline runs. Each run is a row. Click the newest run to see its steps.

You should see: the run turns green. Green means every step passed. Click the run and you see the three steps, each with a green tick.

Break it once on purpose. This is the most useful part of the project. Do one of these, then push again:

  • Delete the heading line from index.html (remove the <h1>My DevOps practice site</h1> line), push, and watch the test step fail.
  • Or type a wrong letter in the Dockerfile (for example change FROM nginx:1.27-alpine to FROM nginxx:1.27-alpine), push, and watch the build step fail.

Then open the failed run, click the failed step, and read the log. The log is the printed output of that step.

If it breaks (the run is red): red means a step failed. Open the failed step's log and read the FIRST error line — that is the one thing to fix first. Fix it, push again, and watch the run turn green. Then write down what broke and what you changed — that is your README story.

README template — fill in the blanks

Update the same README.md in the my-site folder, or add a section to it:

Command
# [Site name] — CI/CD pipeline
What it is: [one line]
Pipeline does: on every push, it tests the site, then builds the Docker image.
Tools used: GitHub Actions, Docker
A failure I fixed: [what broke, what the log said, what I changed]
Pipeline status: [link to the Actions tab, if public]

CI/CD stands for Continuous Integration / Continuous Delivery: the automatic chain that tests and builds on every push. Fill in the failure from the break-it-on-purpose step — that is a true story, and it is the most impressive line in the README.


Project 3 — Infrastructure as code + monitoring, zero-cost

What is this?

Two things in one project.

First, you write a Terraform file that creates a container — the same nginx website, but created by Terraform reading a file, instead of by you typing docker run. That is infrastructure as code: writing down what you want in files, and letting a tool create it.

Second, you add monitoring: three small programs that watch each other. Prometheus collects numbers. Grafana turns numbers into charts. Node-exporter reports numbers from inside its own container.

All of it runs on your own machine. No cloud account, no bill.

Honesty note — read this first: this exact stack was not run end-to-end while writing this kit. Treat the steps below as a guide, not a promise. If a step fails, read the error message first — the error names the one thing to fix.

Step 1 — Install Terraform

WHAT it is: Terraform is the tool that creates infrastructure from files. You need it installed on your machine before the commands below can work.

WHY: without it, terraform is not a known command and the terminal answers "command not found".

Do it:

The install steps differ by system, so follow the official Terraform install docs for your machine: the HashiCorp tutorials at https://developer.hashicorp.com/terraform/tutorials — open the "Get Started" collection there and follow the install page for your system (Linux, Mac, or Windows).

This step is unverified in this kit: the kit does not give its own install commands, and no install was tested end-to-end while writing it. Do not skip the check below.

Prove it worked. After installing, type:

Command
terraform version

Word by word: terraform is the program. version asks it to print its version number.

You should see: a line like Terraform v1.x.x with a version number. If you see "command not found", the install did not finish — go back to the official docs.

Step 2 — Write a Terraform file that creates a local container

WHAT it is: a file called main.tf that describes one container running nginx. .tf is Terraform's file ending. Terraform reads every .tf file in the folder.

WHY: this is the infrastructure-as-code idea in its smallest form: a file says what you want, Terraform makes it real.

Which folder? Make a new folder for this project, for example ~/devops-practice/terraform-web, and put main.tf inside it. The lesson does not name the folder — you choose it — but write the name you chose in your README, because every later command must run from inside that folder.

Command
mkdir -p ~/devops-practice/terraform-web
cd ~/devops-practice/terraform-web

Put this text in a file called main.tf inside that folder:

Command
terraform {
  required_providers {
    docker = {
      source = "kreuzwerker/docker"
    }
  }
}

resource "docker_image" "web" {
  name = "nginx:1.27-alpine"
}

resource "docker_container" "web" {
  image = docker_image.web.image_id
  name  = "terraform-web"
  ports {
    internal = 80
    external = 8080
  }
}

Line by line:

  • terraform { — the settings block for Terraform itself.
  • required_providers { — the list of plug-ins this project needs. A provider is a plug-in that lets Terraform talk to something — here, Docker.
  • docker = { — the provider's short name inside this project is docker.
  • source = "kreuzwerker/docker" — where to download the provider from. kreuzwerker is the name of the group that wrote it, docker is the provider's name. Think of it as an address.
  • } — each closing bracket ends the block above it.
  • resource "docker_image" "web" { — "create a thing of type docker_image, and call it web inside this file". A resource is one thing Terraform manages. docker_image means a Docker image. web is the nickname you use for it in this file — it is not the container's name.
  • name = "nginx:1.27-alpine" — the image to use is nginx, version 1.27-alpine. The tag pins it to NGINX version 1.27, small edition — the same tag this kit uses for NGINX everywhere else. latest would mean "the newest version available", which moves under you; never let latest reach a real setup.
  • resource "docker_container" "web" { — create a thing of type docker_container, nicknamed web.
  • image = docker_image.web.image_id — use the image from the resource above. docker_image.web means "the docker_image resource nicknamed web". .image_id means "its ID". In plain words: "run the image we just described".
  • name = "terraform-web" — call the running container terraform-web.
  • ports { — the port settings block.
  • internal = 80 — the door inside the container: 80.
  • external = 8080 — the door on your machine: 8080. Same outside:inside idea as Docker's -p 8080:80, written as two lines instead of one.

Run it. From inside the folder that holds main.tf:

Command
terraform init

Word by word: init means "initialise". It downloads the Docker provider your file asks for, and makes a .terraform/ folder (the downloaded provider files) and a .terraform.lock.hcl file (a list recording the exact provider version, so the next run uses the same one).

You should see: lines about downloading, ending with Terraform has been successfully initialized!

Then:

Command
terraform apply

Word by word: apply means "do what the file says, for real".

You should see: the plan printed first (a list of things to add), then a question asking you to confirm. Type yes and press Enter. Then lines about creating things, ending with:

Command
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

The three numbers are the proof: 2 things added (the image and the container), 0 changed, 0 destroyed. Then open http://localhost:8080 — you should see the nginx welcome page.

If it breaks: "provider not found" means init never ran — run terraform init first, then apply again. If apply asks for confirmation, type yes and press Enter. If it says the port is already in use, stop the old container first.

Pin the provider version. Once you have a working run, add a version line inside the docker provider block, with the version you tested, like this:

Command
    docker = {
      source  = "kreuzwerker/docker"
      version = "3.0.2"
    }

Do not copy 3.0.2 blindly — it is an example. Use the version your init actually downloaded. You can find it in the .terraform.lock.hcl file init created. Keep that lock file — do not delete it casually. No version is pinned in the lesson because none was tested end-to-end yet.

Check nothing changed. After the first apply, run:

Command
terraform plan

Word by word: plan means "work out what would change, and show it, without changing anything".

You should see: No changes. Your infrastructure matches the configuration. That line is the proof the last apply worked and nothing drifted. If the plan shows changes, read it before you apply — something moved or changed.

Clean up when you are done. First check you are in the right folder — type pwd and confirm it shows your project folder. pwd means "print working directory": it prints the folder you are in right now. Then read the destruction plan:

Command
terraform plan -destroy

Word by word: plan -destroy means "show me what would be deleted, without deleting anything". Read every line. Then:

Command
terraform destroy

destroy removes what Terraform created. You should see Destroy complete! Resources: 1 destroyed. Run it only on your own practice setup, never on anything shared or real. There is no undo.

Step 3 — Add monitoring with Docker Compose

WHAT it is: three small programs running together: Prometheus (collects numbers), Grafana (turns numbers into charts), and node-exporter (reports numbers from inside its own container). A number here is called a metric: a value measured over time, like CPU use.

WHY: a container you cannot see is a container you cannot fix. Monitoring is how you know whether things are up and how busy they are.

What this demo does and does not do: this demo shows container monitoring — it watches the containers in the stack. It does not measure your whole host machine. On a Linux host you can add host mounts later; on Docker Desktop or WSL2, the numbers describe the Linux container environment, not your Windows or Mac host.

Do it:

Make a folder called monitoring inside ~/devops-practice and put two files in it:

Command
mkdir -p ~/devops-practice/monitoring
cd ~/devops-practice/monitoring

File 1 — docker-compose.yml. This is the Compose file: one file that starts several containers together. Docker Compose is the tool that starts several containers together from one file.

Command
services:
  prometheus:
    image: prom/prometheus:v3.16.0
    ports:
      - "127.0.0.1:9090:9090"
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
  node-exporter:
    image: prom/node-exporter:v1.13.1
    ports:
      - "127.0.0.1:9100:9100"
  grafana:
    image: grafana/grafana:13.0.14
    ports:
      - "127.0.0.1:3000:3000"

Line by line:

  • services: — the list of containers to start.
  • prometheus: — the first service, named prometheus.
  • image: prom/prometheus:v3.16.0 — use the image named prom/prometheus. prom is the group that publishes it. :v3.16.0 is the version tag — it pins this service to Prometheus version 3.16.0, so a later download cannot bring a different version. Every image in this kit carries a tag like this for exactly that reason.
  • ports: — the list of port mappings for this service.
  • - "127.0.0.1:9090:9090" — map door 9090 on your machine to door 9090 in the container, but only on 127.0.0.1. 127.0.0.1 means "this machine only". Ports bound this way cannot be reached from other machines. That is on purpose: this is a local learning stack, not a shared service.
  • volumes: — the list of shared files or folders.
  • - ./prometheus.yml:/etc/prometheus/prometheus.yml — share the file prometheus.yml from this folder (./ means "this folder") into the container at the path /etc/prometheus/prometheus.yml, where Prometheus looks for its settings. The two paths are joined by a colon: your file on the left, the container's place on the right.
  • node-exporter: — the second service. image: prom/node-exporter:v1.13.1, door 9100. :v1.13.1 pins it to node-exporter version 1.13.1.
  • grafana: — the third service. image: grafana/grafana:13.0.14, door 3000. :13.0.14 pins it to Grafana version 13.0.14.

A note about versions: every image above carries a version tag (:v3.16.0, :v1.13.1, :13.0.14), so a later download brings the same version, not a newer one. That is the kit's pin rule: never run an image with no tag. A tag can still be re-pointed at a new build by the publisher, so the strongest pin is the image's fingerprint — the Advanced section at the end of this lesson does that pinning for you, by digest.

File 2 — prometheus.yml. This is the file that tells Prometheus what to watch. A scrape is Prometheus visiting an address every 15 seconds and writing down numbers. A job is just a named thing to watch.

Command
global:
  scrape_interval: 15s
scrape_configs:
  - job_name: "prometheus"
    static_configs:
      - targets: ["localhost:9090"]
  - job_name: "practice-machine"
    static_configs:
      - targets: ["node-exporter:9100"]

Line by line:

  • global: — settings that apply to everything.
  • scrape_interval: 15s — visit each target every 15 seconds.
  • scrape_configs: — the list of things to watch.
  • - job_name: "prometheus" — the first job, named "prometheus": watch Prometheus itself.
  • static_configs: — a fixed list of addresses (not discovered automatically).
  • - targets: ["localhost:9090"] — the address to visit: localhost:9090. This works because Prometheus is watching its own container — inside its own container, "this machine" is itself.
  • - job_name: "practice-machine" — the second job, named "practice-machine": watch the machine's numbers.
  • - targets: ["node-exporter:9100"] — the address to visit: node-exporter:9100. This works because Docker Compose lets containers reach each other by service name. node-exporter is the service name from the Compose file, and 9100 is its door. Grafana will use the same trick later.

Check the file first, before you start it. A typed YAML file fails most often on spaces — one wrong indent and the file means something else. This check reads the Compose file and tells you whether it is valid, without starting anything. From inside the monitoring folder:

Command
docker compose config -q
  • WHAT: validate the Compose file. config means "read the recipe file and print it back". -q means "quiet": print nothing, only report errors.
  • WHY: it catches a bad file before Docker ever sees it. A typo found here costs one line; a typo found after up costs containers to clean up.
  • What you should see: nothing. Silence means the file is valid. If it breaks: an error names the bad line. YAML uses spaces for structure — never use the Tab key. Fix the spaces, then run the check again. Do not run up until this check passes.

Start it all. From inside the monitoring folder:

Command
cd ~/devops-practice/monitoring
docker compose up -d
docker compose ps

Word by word: docker compose up -d starts everything the Compose file describes, in the background (-d). docker compose ps lists the containers this Compose file started.

You should see: all three services with STATUS "Up" — prometheus, node-exporter, and grafana. The table has columns NAME, IMAGE, STATUS, and PORTS. If a service shows "Exited" instead of "Up", read its log with docker compose logs <service> — for example docker compose logs grafana — and the error line names the problem.

If it breaks: if docker compose fails with "command not found", older Docker uses docker-compose with a hyphen — try that instead. Both do the same job; the hyphen version is the older spelling.

Check Prometheus first. Open http://localhost:9090 in your browser. This is Prometheus's own web page. Click Status in the top menu, then Targets in the menu that appears. (If your version's menu words differ slightly, look for the closest match — Grafana's and Prometheus's menu words can differ by version.)

You should see: both jobs listed, each showing UP, with the target address and the last-scrape time beside it. UP means Prometheus visited the address successfully. DOWN means it could not reach it. The last-scrape time is the time Prometheus last visited that target — it should be a few seconds ago, because Prometheus visits every 15 seconds.

If a target shows DOWN, work in this order:

  1. docker compose ps — is the container running?
  2. docker compose logs <service> — what did it print?
  3. The error line under the target in Prometheus — it names the problem.

Now open Grafana. Open http://localhost:3000. Log in with username admin and password admin. These are the default login details — the same for every fresh Grafana. Change that default password at first login: Grafana will show a change-password screen after your first login. Set a new password you will remember, and write it down somewhere safe. If you forget it, you are locked out of your local Grafana and must delete its stored data to start over. This stack is local learning only, not secured for sharing.

Add Prometheus as the data source. A data source is where Grafana gets its numbers from. Go to Connections, then Data sources, then Add data source. Choose Prometheus. Set the URL to http://prometheus:9090 — Grafana reaches Prometheus by its service name (prometheus), not by localhost, because Grafana runs inside its own container and "localhost" for Grafana means Grafana itself. Then click Save & test. It should say the data source is working. If the menu words differ in your version, look for the closest match.

Make your first chart. Create a new Dashboard (a page that holds charts), add a Visualization (one chart), choose Prometheus as the source, type the query up, and run it.

The query up asks Prometheus "which targets answered your last visit?" The chart shows 1 for every target that is up and 0 for one that is down. up = 1 means Prometheus successfully scraped that target. It does not prove the website itself works — only that the target answered the scrape.

Save the dashboard and keep a screenshot of it. The screenshot is proof for your README. The dashboard is saved inside Grafana itself — it lives in Grafana's stored data, not in a file in your folder — so the screenshot is the copy you keep.

Stop everything when you are done:

Command
docker compose down

down stops and removes the Compose containers. Your files stay, so docker compose up -d starts it again later.

Step 4 — Push to GitHub, but not everything

WHAT it is: before pushing, make a .gitignore file. A .gitignore file tells Git which files to never upload. Each line is one pattern to leave out.

WHY: Terraform's state file can hold private values. The provider cache is large and useless to anyone else. Uploading them is a security risk and a mess.

Do it:

In the project folder (the one holding your .tf files), make a file called .gitignore with at least these lines:

Command
.terraform/
*.tfstate
*.tfstate.*
crash.log

Line by line:

  • .terraform/ — leave out the folder that holds the downloaded provider. Anyone can re-download it with terraform init.
  • *.tfstate — leave out any file ending in .tfstate. The * means "any name". These are Terraform's state files — the notebook that maps your files to real things. State can hold private values.
  • *.tfstate.* — leave out state backup files too.
  • crash.log — leave out Terraform's crash log, if one appears.

Then run git status and check nothing private is staged. git status lists what is about to be saved. Read it. If a .tfstate file appears in the list, the .gitignore did not work — check the spelling and that the file is named exactly .gitignore.

Commit: the .tf files, .terraform.lock.hcl, the Compose file, prometheus.yml, and the README. Never commit state files, the provider cache, or secrets.

A clear warning

Terraform with a cloud provider (AWS, Azure, and similar) can cost real money. Do the local Docker version first. Only try a cloud version if you understand that provider's free tier and you destroy what you create afterwards. This kit does not promise any setup is free on the cloud.

README template — fill in the blanks

Command
# Terraform + monitoring demo
What it is: [one line]
Tools used: Terraform, Docker, Prometheus, Grafana
How to run it: [the commands you used]
What the chart shows: [one line — for example, "both monitoring targets are up: Prometheus and the practice machine"]
What I learned: [two lines]
Cost: local only, no cloud bill.

For "What the chart shows", write what your chart actually showed. If both targets were up, write that. If one was down, write that and what you did about it. A true line beats an impressive line.


Project 4 — A data-tier pipeline, end to end (Phase 1)

What is this?

This project is the Phase 1 end-to-end lab, done as a portfolio piece.

Think of it like a parcel's journey through a sorting office.

A fake order file lands in a folder. A program stores it and sends it to Kafka. Another program saves it in the database and updates a counter. A load balancer spreads visitors across three copies of the site. Then you kill the main database, promote the standby, and send another order through the new main database — and the whole thing keeps working.

Before you start — do the single-topic labs first

Do the Phase 1 labs in this order, because Project 4 uses all of them:

  1. Kafka lab — topics, producers, consumers.
  2. PostgreSQL lab — primary, replica, failover.
  3. Redis lab — cache, counter, keys that expire.
  4. Object-store lab — Moto, buckets, the mirror.
  5. Load-balancer lab — NGINX in front of three backends.

Then run the end-to-end lab in the Phase 1 folder. The lab file is phase1/end-to-end-lab.md, and the lab folder is phase1/end-to-end/. Open the lab file and follow it step by step — every step there says what you should see and what to do if it breaks. This lesson walks the lab's steps with you below, then tells you what the project proves and how to write it up.

Build it

Step 1 — Start it.

First, move your terminal into the lab folder. The folder is phase1/end-to-end/. Type this, then press Enter:

Command
cd phase1/end-to-end

Word by word: cd — short for "change directory". It moves your terminal into a folder. phase1/end-to-end — the folder to move into. This works from the folder that holds phase1. If your terminal is already inside the phase1 folder, use the shorter form instead: cd end-to-end.

Then, from inside the end-to-end folder, make the database setup file readable. The database runs as its own user, and it cannot read a file that is private to you. This one command fixes that:

Command
chmod -R a+r .

Word by word: chmod changes what people are allowed to do with a file. -R means "do it for this folder and everything inside it". a+r means "add read permission for everyone" (a = all people, r = read). . means "this folder".

You should see: nothing. chmod prints nothing when it works. If it says "No such file or directory", you are in the wrong folder — run ls and check you are inside the end-to-end folder.

Then start everything with one command:

Command
docker compose up -d --build

Word by word: docker compose up -d starts everything the Compose file describes, in the background. --build means "build the images first, before starting" — so your latest code is in the images.

You should see: all eleven services start with STATUS "Up". The end-to-end lab, Step 1, shows the full list to check — the eleven service names are kafka, postgres-primary, postgres-replica, redis, moto, lb, web1, web2, web3, ingest, and worker. Check each name against the lab's list. If one shows "Exited", read its log with docker compose logs <service>.

Step 2 — Watch three fake orders flow from files to Kafka to PostgreSQL, with the counter in Redis and the files in Moto.

Do the end-to-end lab's Step 2 and Step 3, in order. They are the whole of this step — the commands are short, so here they are.

First, read the ingest diary. ingest is the program that takes new order files in. Type this, then press Enter:

Command
docker compose logs ingest

What you should see: three "Sent" lines, one per order — order 101 (notebook, 250, Asha), order 102 (pen, 40, Ravi), order 103 (mug, 350, Meena). A "Sent" line means two things already happened: the file was stored in the cupboard first, then the order was sent as a message. So three "Sent" lines mean all three files are in the cupboard and all three orders are on the queue.

Then read the worker diary. worker is the program that saves the orders. Type this, then press Enter:

Command
docker compose logs worker

What you should see: three "Saved" lines — Saved order 101: notebook (250), Saved order 102: pen (40), Saved order 103: mug (350). Each "Saved" line means the worker saved that order in the database and added 1 to the counter.

Then prove it in four places, as in the lab's Step 3. The four checks, with their commands:

  1. The database: docker compose exec postgres-primary psql -U learner -d practice -c "SELECT * FROM orders ORDER BY id;" — you should see 3 rows, orders 101, 102, and 103.
  2. The counter: docker compose exec redis redis-cli GET orders:count — you should see "3".
  3. The file cupboard: no separate command here — the three "Sent" lines above are the proof, because ingest only prints "Sent" after it has stored the file.
  4. The guard: for i in 1 2 3 4 5 6; do curl -s http://localhost:8080/ | grep Hostname; done — you should see the Hostname line change between web1, web2, and web3, taking turns.

Watch one order make the whole journey before moving on. If any check disagrees — fewer than 3 rows, a counter under 3, or no "Sent" lines — stop and fix it in the lab's Step 2 or Step 3 before moving on. Do not build on a pipeline that has not proved itself yet.

Step 3 — Add a fourth order yourself and watch it flow through.

Do the end-to-end lab's Step 4. The command writes a new order file by hand. Type this, then press Enter:

Command
cat > incoming/order-004.json << 'EOF'
{"id": 104, "item": "pen stand", "amount": 120, "buyer": "Kumar"}
EOF

Word by word: cat — a tool that prints files, used here backwards to write one instead. > — send the output into a file instead of onto the screen. incoming/order-004.json — the file to write, in the incoming/ folder. << 'EOF' — "the text up to a line that says only EOF is the file's content". The middle line is the order itself: order 104, a pen stand, 120, bought by Kumar. Copy it exactly — the quotes and commas matter.

What you should see: nothing — the file is written silently. That is normal. Wait 10 seconds, then check the database again with the Step 2 Check 1 command:

Command
docker compose exec postgres-primary psql -U learner -d practice -c "SELECT * FROM orders ORDER BY id;"

You should see 4 rows now, including order 104. And check the counter again:

Command
docker compose exec redis redis-cli GET orders:count

You should see "4". A new order flowed through the whole pipeline by itself — file in, database row out.

Step 4 — Kill the main database, promote the standby, point a fresh worker at it, and send a fifth order through the new main database.

Do the end-to-end lab's Steps 5, 6, 7, and 8, in order. Each one is one move in the failover. Here they are, in the lab's own order:

  1. Lab Step 5 — kill the main database. Stop the main database box, but keep it around:
Command
docker compose stop postgres-primary

Then check the standby still has the data, with the Step 2 Check 1 command aimed at the standby instead:

Command
docker compose exec postgres-replica psql -U learner -d practice -c "SELECT * FROM orders ORDER BY id;"

You should still see the orders — the standby kept its copy.

  1. Lab Step 6 — promote the standby. One database command makes the standby the new main database:
Command
docker compose exec postgres-replica psql -U learner -d practice -c "SELECT pg_promote();"

You should see t under pg_promote — t means true, the promotion worked. Then check it is no longer a standby:

Command
docker compose exec postgres-replica psql -U learner -d practice -c "SELECT pg_is_in_recovery();"

You should see f — f means false, it is no longer in recovery, so it is now the main database.

  1. Lab Step 7 — point a fresh worker at it. First stop the old worker, which is still waiting for the dead database:
Command
docker compose stop worker

Then start a fresh worker that talks to the new main database. Just paste the whole line — the lab's Step 7 explains each flag in plain words:

Command
docker compose run --no-deps --rm -e PG_HOST=postgres-replica worker

Leave that terminal open. It is now the live worker. Do not close it, and do not press Ctrl+C yet.

  1. Lab Step 8 — send a fifth order through the new main database. Open a second terminal, move it into phase1/end-to-end, and make the new order file:
Command
cat > incoming/order-005.json << 'EOF'
{"id": 105, "item": "ruler", "amount": 60, "buyer": "Divya"}
EOF

Wait 10 seconds. In the first terminal (the worker), you should see Saved order 105: ruler (60). Then check the new main database holds all five orders, with the Step 2 Check 1 command aimed at the standby that is now the main database:

Command
docker compose exec postgres-replica psql -U learner -d practice -c "SELECT * FROM orders ORDER BY id;"

You should see 5 rows, orders 101 to 105.

The proof is the fifth order landing in the new main database while the old one is dead. If any step disagrees — the promotion shows f, the worker prints "Waiting for PostgreSQL..." for more than a minute, or order 105 never lands — stop and follow that lab step's own "If it breaks" box before moving on.

Step 5 — Push the lab folder to GitHub.

Push the compose file, the two Python programs, the sample order files, and the README below. Push as in zero-cost-lab.md Step 7 — and when Git asks for a password, paste the token from Step 7, part 7c, never your GitHub password. Do not push any real data — the sample orders are fake, and that is the point.

If it breaks: follow the end-to-end lab step by step — every step there says what you should see and what to do if it breaks.

README template — fill in the blanks

Command
# Order pipeline demo (Kafka + PostgreSQL + Redis + Moto + NGINX)
What it is: [one line]
How it works: a fake order file lands in incoming/, ingest stores
  it in Moto and sends it to Kafka, worker saves it in PostgreSQL
  and updates the Redis counter, NGINX spreads visitors across
  three backends.
Tools used: Docker Compose, Kafka, PostgreSQL, Redis, Moto, NGINX, Python
Failover I proved: killed the main database, promoted the standby
  with pg_promote(), sent a new order through the new main database.
Cost: local only, no cloud bill.

For "Failover I proved", write it only if you actually did step

  1. If you have not done it yet, write "not done yet". The proof files in the kit — phase1/portfolio/proof/end-to-end-trace-TEMPLATE.txt and phase1/portfolio/proof/failover-log-TEMPLATE.txt — are templates. Fill in a copy with your real run, and keep it with the project. A filled template with real output is stronger than any claim in words.

When all four are done

You have: a running container app, a working pipeline, an infrastructure-as-code setup with a monitoring chart, and a data pipeline with a proven failover — all on GitHub, all runnable, all explained in your own words. That is the proof this kit is built to give you.

Before you show any of it to an employer, read each README once more and ask: "Is every line true?" If a line is not true yet, fix the line — or do the work, then fix the line. True and small beats big and invented, every time.

Sources

  • Docker's official getting-started guide — https://docs.docker.com/get-started — how Docker explains building and running an image.
  • HashiCorp's own Terraform tutorials — https://developer.hashicorp.com/terraform/tutorials — how Terraform explains init, plan, and apply.
  • The kit's reference list — phase2/best-sites.md.

No text is copied from any of these. Every explanation above is written fresh, in this kit's plain-words style.

Advanced (Terraform + monitoring) — Remote state, pinned images, tests, and CI deploy

This section is for the reader who finished Project 3. It covers the four things the review of this kit flagged as missing for advanced readers: remote state and backends, pinned images (pinning the tagged images by digest, so the exact build is fixed, not just the version), the Grafana default-credentials risk, tests for Terraform, and CI deploy. The pinning and test commands run on your own machine and were checked against this lesson's own files. The remote backend needs a real cloud account — read it, do not run it in this kit's zero-cost setup, as the section says.

Advanced 1 — Pin the images by digest, not just by tag

What this is: the monitoring Compose file in Project 3 pins its images by tag — image: prom/prometheus:v3.16.0, image: prom/node-exporter:v1.13.1, and image: grafana/grafana:13.0.14. A tag pins the version, but a tag can be re-pointed at a new build by the publisher. This section goes one step further and pins the exact build — in the file, not just in the README.

Why a digest, not a tag: a tag can be re-pointed at a new build by the publisher, so the "same" tag can mean a different image tomorrow. A digest is the image's fingerprint — sha256: followed by a long code — and it never changes. An image named by its digest is the exact image, forever.

Find the digest of what you actually run:

Command
docker images --digests

Word by word: docker images lists your downloaded images. --digests adds the digest column. What you should see: a table with REPOSITORY, TAG, DIGEST, and other columns. Find the row for prom/prometheus and copy its digest — the whole sha256:... code. Then pin it in ~/devops-practice/monitoring/docker-compose.yml:

Command
  prometheus:
    image: prom/prometheus@sha256:<the digest you copied>

Word by word: image: prom/prometheus@sha256:... means "use exactly this image, fingerprint and all". The @ joins the name to the digest. Do the same for prom/node-exporter and grafana/grafana, each with its own digest from the table. Then restart the stack:

Command
cd ~/devops-practice/monitoring
docker compose up -d

What you should see: the three services start as before — the same images, now named by fingerprint. If the digest is wrong, Compose will fail to find the image: copy it again from the table, character for character. The Project 3 Terraform file already pins its image the same way — name = "nginx:1.27-alpine" in main.tf — and the same rule applies there: never let latest reach a real setup: "the previous version" has no name when everything is called latest, so it cannot be rolled back to.

Advanced 2 — Grafana default credentials: the risk, stated plainly

What this is: a fresh Grafana logs in with username admin and password admin — the same on every fresh Grafana, as this lesson already says. Why it is a risk: anyone who can reach port 3000 can log in with those two words and change or delete your dashboards — and if that port is ever exposed beyond your own machine, anyone on the internet can. The lesson already tells you to change the password at first login. Do it, and add two more habits:

  • The lesson's Compose file already binds Grafana's port to 127.0.0.1 only ("127.0.0.1:3000:3000"). Keep it that way. That binding is the one protection the stack has: the port cannot be reached from other machines. Never change it to a bare 3000:3000 on a shared machine.
  • For a real setup, set the password with an environment variable instead of typing it into the web page, so it is not sitting in browser history or a shared screen:
Command
  grafana:
    image: grafana/grafana:13.0.14
    environment:
      - GF_SECURITY_ADMIN_PASSWORD=<a password you choose>

And the warning that goes with it: a password written in a Compose file in plain text is itself a bad habit for real work — in real work it comes from a secrets store, never from a file. On your own learning machine, the environment variable is fine; the habit to build is "change the default before anything else, and never expose the port".

Advanced 3 — Remote state and backends

What this is: a backend is where Terraform keeps its state file when it is not on your machine. Remote state means the whole team — and the pipeline — share one notebook, instead of each person holding their own copy. Why it matters: the Project 3 setup keeps state in a local file. That works for one person on one machine. On a team it breaks three ways: two people apply at once and corrupt the notebook, someone's laptop dies and the notebook dies with it, and the notebook (which can hold private values) sits unprotected on a laptop.

The S3 backend block — read it, understand it, do NOT run it in this kit's zero-cost setup. It needs a real cloud account, and cloud accounts can cost money:

Command
terraform {
  backend "s3" {
    bucket       = "your-state-bucket-name"
    key          = "terraform-web/terraform.tfstate"
    region       = "us-east-1"
    encrypt      = true
    use_lockfile = true
  }
}

Word by word:

  • backend "s3" — store the state in an S3 bucket (an object store bucket — the same kind of store the Phase 1 object-store lab teaches, but a real one).
  • bucket — the bucket's name. Replace it with a name you own.
  • key — the path inside the bucket where this project's state lives. One key per project, per environment: terraform-web for this project, and a different key for the next one, so one mistake cannot take down everything.
  • region — where the bucket lives.
  • encrypt = true — scramble the state file at rest. State can hold private values, so it must never sit unscrambled.
  • use_lockfile = true — locking. When one apply runs, it writes a lock file, and a second apply waits instead of corrupting the notebook. (Older setups used a DynamoDB table for locking; that way is now deprecated, and the lock file is the current way.)

Three facts that catch beginners. First, the bucket must exist BEFORE Terraform can use it as a backend — a chicken-and-egg problem. Create it once, with its own tiny Terraform setup that keeps local state, or by hand in the cloud console. Second, turn on versioning on the bucket, so a corrupted state file can be recovered from the previous version. Third, the .gitignore rules in this lesson already cover the local case (*.tfstate, *.tfstate.*) — with a remote backend, the rule is the same and more important: state never goes into a shared repository, ever.

Advanced 4 — Tests for Terraform

What this is: terraform test runs test files that end in .tftest.hcl, using run blocks with assertions — checks that must be true. It needs Terraform 1.6 or later. Why it matters: terraform plan shows what would change, but it does not check that the change is right. A test checks the result: "the container must be named terraform-web", and fails the run if it is not.

Write one for Project 3. In the ~/devops-practice/terraform-web folder (the one holding main.tf), make a file called web.tftest.hcl:

Command
run "container_name_is_set" {
  command = plan
  assert {
    condition     = docker_container.web.name == "terraform-web"
    error_message = "The container must be named terraform-web."
  }
}

Word by word:

  • run "container_name_is_set" — one test run, named so you can tell which test failed.
  • command = plan — run this test as a plan (show what would change, change nothing). A plan test is fast and creates nothing. command = apply would really create things, for integration tests in a sandbox account only.
  • assert — the check. condition must be true or the test fails. docker_container.web.name is the container resource from this lesson's own main.tf — the resource nicknamed web, and its name setting. The test says that name must equal "terraform-web".
  • error_message — what the failure prints, so the next person knows what broke without reading the test.

Run it:

Command
terraform test

Word by word: terraform test finds the .tftest.hcl files and runs them. What you should see: the test passing, naming the run container_name_is_set. Then break it on purpose once — change the name in main.tf, run terraform test, watch it fail, change it back. That is the same "see it fail" drill as the fake-green-test lesson in the break-and-fix labs: a test you have never seen fail is a test you have never proven. Two cheaper checks to run with it, which this kit never names: terraform fmt -check (are the files formatted correctly, without changing them) and terraform validate (are the files valid, without creating anything). Both are fast, both run before plan.

Advanced 5 — CI deploy: plan on the request, apply on the merge

What this is: the safe pipeline shape for Terraform. Why it matters: Project 2's pipeline tests and builds a website. A Terraform pipeline applies infrastructure — it creates and deletes real things. That needs a stricter shape than a website build.

The shape, in plain words, using the same GitHub Actions workflow pattern as Project 2 and Lab 3 (.github/workflows/):

  • On every pull request: run the read-only steps — terraform fmt -check, terraform validate, terraform test, then terraform plan. The plan is posted as a comment on the request, so reviewers read exactly what would change before they approve. Nothing is created.
  • On merge to main: run terraform apply — and only with a human approval step in between (GitHub Environments can demand one named approver before the apply job runs). The apply must use exactly the plan that was reviewed, not a fresh plan made at apply time.
  • Never put cloud credentials in the workflow file. They go in GitHub secrets (named values only the pipeline can read), and the workflow reads them from there. A credential in a workflow file is a credential in the repository.

This section gives no workflow file to copy: a real Terraform pipeline needs a real cloud account and real secrets, and this kit's zero-cost setup has neither. Know the shape — plan on the request, human approval, apply on the merge — and the two rules: review the exact plan that gets applied, and keep credentials out of the files.

What you can now say, truthfully — advanced

  • "I pinned the monitoring images by digest — docker images --digests, then image: prom/prometheus@sha256:... — on top of their version tags, and pinned the Terraform image to nginx:1.27-alpine." (Only if you did Advanced 1.)
  • "I changed Grafana's default admin/admin login, kept its port bound to 127.0.0.1, and know why the default is a risk." (Only if you did Advanced 2.)
  • "I can explain remote Terraform state — S3 backend, locking with use_lockfile, encryption, versioning — and why the bucket must exist first." (Only if you did Advanced 3. Do not claim you set one up unless you did, on a real account.)
  • "I wrote a .tftest.hcl test with an assertion, ran terraform test, and watched it fail when I broke the name on purpose." (Only if you did Advanced 4.)
  • "I can describe the safe CI shape for Terraform: plan on the pull request, human approval, apply on the merge, credentials in secrets." (Only if you did Advanced 5.)

Quick check — try it yourself

Question: In the terminal, type: curl http://localhost:9090/api/v1/targets — what values appear for status and targets to show monitoring works?

Open the practice terminal to test this →

Show answer

You should see "status": "success" and "targets": "up".