Your DevOps study space

Real explanations. Videos with tests. Fresh exams every time. Keep the streak alive and watch the XP stack up.

Capstone: ship an app end to end · DevOps Docs · StackwisePlanDevOps Capstone: ship an app end to end · DevOps Docs · StackwiseCodePython Capstone: ship an app end to end · DevOps Docs · StackwiseBuildDocker Capstone: ship an app end to end · DevOps Docs · StackwiseTestDevOps Capstone: ship an app end to end · DevOps Docs · StackwiseReleaseGit Capstone: ship an app end to end · DevOps Docs · StackwiseDeployKubernetes Capstone: ship an app end to end · DevOps Docs · StackwiseOperateLinux Capstone: ship an app end to end · DevOps Docs · StackwiseMonitorDevOps

Pick a topic

Eight tracks, each with docs, a cheat sheet, videos and tests.

How it works

One loop, repeated until it sticks.

Jump back in

Picked up from where you left off.

Free forever

Your DevOps journey starts with one click.

Sign in with Google or GitHub to open every chapter, video, test and challenge. Your progress is saved wherever you learn.

Capstone: ship an app end to end

This chapter is a project, not a lesson. You'll take a small web app from an empty folder to a live HTTPS address, with tests, a container image, an automated pipeline and basic monitoring, using every topic in these Docs. Do it once on your own and you'll have something real to show, and you'll know where your gaps are.

What you'll build

A tiny Python API with two endpoints, running in Docker on a cloud server behind HTTPS, deployed automatically whenever you merge to main. Budget a weekend. Each step names the chapter to revisit if you get stuck.

yougit pushGitHubrepo + Actions:test, build, deployghcr.iothe image, tagged :shacloud server /srv/appCaddyHTTPS, auto certsweb containerthe Python APIusershttps://push imagedeploy over SSHpullHTTPSproxy
Every piece is something an earlier chapter taught. Build it once end to end and the whole Docs will click into place.

Step 1: the project and Git

$ mkdir capstone && cd capstone
$ git init
$ python3 -m venv .venv && source .venv/bin/activate
$ printf '.venv/\n__pycache__/\n.env\n' > .gitignore

Two dependency files: requirements.txt for the app and requirements-dev.txt for development:

# requirements.txt
flask>=3.0,<4
gunicorn>=22,<24

# requirements-dev.txt
-r requirements.txt
pytest>=8,<9
$ pip install -r requirements-dev.txt

Revisit: Git chapters 1 and 2, Python chapter 7.

Step 2: the app and a test

# app.py
import os
import socket
from flask import Flask, jsonify

app = Flask(__name__)

@app.get("/")
def index():
    return jsonify(message="Hello from my capstone",
                   host=socket.gethostname(),
                   version=os.environ.get("APP_VERSION", "dev"))

@app.get("/health")
def health():
    return jsonify(status="ok")
# test_app.py
from app import app

def test_health():
    client = app.test_client()
    r = client.get("/health")
    assert r.status_code == 200
    assert r.get_json() == {"status": "ok"}
$ pytest -q
1 passed
$ flask --app app run          # try it on http://127.0.0.1:5000, then Ctrl+C
$ git add . && git commit -m "App with a health check and a test"

Revisit: Python chapters 3, 6 and 8.

Step 3: put it in a container

# Dockerfile
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
RUN useradd --create-home appuser
USER appuser
EXPOSE 8000
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "app:app"]
# .dockerignore
.venv
.git
__pycache__
.env
$ docker build -t capstone:dev .
$ docker run --rm -p 8000:8000 capstone:dev
$ curl localhost:8000/health          # from a second terminal
{"status":"ok"}

Revisit: Docker chapters 2 and 3.

Step 4: GitHub and the pipeline

Create an empty repository on GitHub, push to it, and add the workflow from the CI/CD pipeline chapter as .github/workflows/pipeline.yml. Leave out the deploy job for now; push, open the Actions tab, and check that test and build go green and that the image appears under your profile's Packages.

$ git remote add origin [email protected]:you/capstone.git
$ git branch -M main
$ git push -u origin main

Revisit: Git chapters 5 and 6, DevOps chapters 8 and 9.

Step 5: a server

Start a small Ubuntu server (an EC2 instance on the free tier works; Cloud chapter 3 walks through it) and allow inbound ports 22, 80 and 443 in its security group. Then secure it and install Docker:

$ ssh ubuntu@<server-ip>
$ sudo apt update && sudo apt upgrade -y
$ curl -fsSL https://get.docker.com | sudo sh          # Docker's official install script
$ sudo adduser --disabled-password --gecos "" deploy   # the user CI will log in as
$ sudo usermod -aG docker deploy
$ sudo mkdir -p /srv/app && sudo chown deploy: /srv/app
$ sudo ufw allow OpenSSH && sudo ufw allow 80 && sudo ufw allow 443 && sudo ufw enable

Give the deploy user the public half of your CI deploy key (a key pair made just for CI, see the pipeline chapter), and turn off password logins as shown in Linux chapter 6:

$ sudo mkdir -p /home/deploy/.ssh
$ sudo nano /home/deploy/.ssh/authorized_keys          # paste the public key, save
$ sudo chown -R deploy: /home/deploy/.ssh
$ sudo chmod 700 /home/deploy/.ssh && sudo chmod 600 /home/deploy/.ssh/authorized_keys

One trap: ports that Docker publishes skip ufw's rules, so only publish what you really want public (here, just 80 and 443).

Revisit: Linux chapters 2, 4 and 6, Cloud chapters 3 and 4.

Step 6: HTTPS and the first deploy

Point a domain (or a free subdomain) at the server with an A record, then run the app behind Caddy, a web server that gets and renews Let's Encrypt certificates by itself. Do this step as the deploy user (sudo -iu deploy), since that's the account the pipeline will use, and work in /srv/app:

# compose.yaml
services:
  web:
    image: ghcr.io/you/capstone:${TAG:-latest}
    restart: unless-stopped
    environment:
      APP_VERSION: ${TAG:-dev}
  caddy:
    image: caddy:2
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile:ro
      - caddy_data:/data
volumes:
  caddy_data:
# Caddyfile
app.example.com {
    reverse_proxy web:8000
}
$ docker login ghcr.io -u you          # a token with read:packages, if the package is private
$ docker compose up -d
$ curl https://app.example.com/health
{"status":"ok"}

Caddy reaches the app by its service name, web, because Compose puts both on one network. Only Caddy publishes ports. Revisit: Networking chapters 2 and 7, Docker chapter 4.

Step 7: automatic deploys

Add the deploy job back into the workflow, create the production environment and the SSH_KEY, DEPLOY_HOST and DEPLOY_USER secrets, and protect main. Now make a change on a branch, open a pull request, merge it, approve the deploy, and watch / report the new commit SHA as its version.

Step 8: know when it breaks

  • Logs: docker compose logs -f web on the server.
  • Uptime: point a free uptime checker at /health, or add a cron job that curls it and alerts you when it fails (Linux chapter 9).
  • Disk: old images pile up with every deploy, so schedule docker image prune -af --filter "until=168h" weekly.
  • Backups: this app keeps no data, but the moment yours does, snapshot the volume or use a managed database (Cloud chapter 5).

Revisit: DevOps chapter 7.

Going further

  • Create the server with Terraform instead of clicking (DevOps chapter 5), and install Docker on it with an Ansible playbook (DevOps chapter 6).
  • Run the same image on your kind cluster with a Deployment and a Service (Kubernetes chapter 6), then package it as a Helm chart (Kubernetes chapter 7).
  • Add a database with Compose, and a second test that uses it.
  • Write a README that explains the architecture with a small diagram. A finished project with a clear README and a green pipeline says more than any certificate.

When you get stuck

  • Work from the inside out: does curl localhost:8000/health work inside the container (docker compose exec web ...), then from the server, then from outside? The first step that fails tells you which layer to look at (Networking chapter 6).
  • Caddy can't get a certificate: DNS doesn't point at the server yet, or ports 80 and 443 are blocked in the security group. docker compose logs caddy says which.
  • 502 Bad Gateway: Caddy is fine but can't reach web; check that the web container is running and listening on 8000.

Questions

Pick an answer. Get it wrong and you can try again right away, no waiting. 10 questions per topic - pick a filter below, then use Recreate questions for a fresh set on that topic.

Fresh questions every time

Exam

A mixed test across the whole site, shuffled so you never know which topic comes next. When you submit, every mistake comes with the reason and a jump to the exact moment in the video that explains it.

30 questions 6 topics 20 minute limit Up to 70 XP
1–4 answer · ←→ move
History

Essay

0 / 200-250 words
Sample answer
History
0:00 / 0:00
Not started

on YouTube
Subscribe

Topic progress

Activity

Achievements

Settings

Your profile and your account.

Profile details

* Required. Saved in this browser until you sign in.

Letters, numbers, dots, dashes and underscores.
0 / 160

Account

Checking…

App

Install Stackwise on your phone or computer. It opens in its own window from your home screen, and the Docs and cheat sheets you've opened keep working without internet.

Only admins can see this

Dashboard

Sign-ups, activity, messages and reviews in one place.

Prove it

Certificates

Pass a topic's test and get a certificate with its own public page you can share or add to LinkedIn. Each test is 10 questions drawn at random and graded on the server; you need 8 right, you have 15 minutes, and you get one try per topic a day.

From first command to production

Linux for DevOps

A path through Linux the way DevOps engineers use it: ten stages, every command explained with its flags, examples, real output and mistakes, the combinations engineers chain together, and incidents worked through step by step. Practise everything in a safe lab folder.

Before the interview

Interview prep

Questions that come up in real DevOps interviews, with the kind of answer that lands. Say yours out loud first, then compare. Each one links to the chapter that goes deeper.

    Private to you

    My notes

    Everything you wrote down while watching and reading, in one place. Saved to your account, never shown to anyone.