Your DevOps study space

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

YAML in 15 minutes · DevOps Docs · StackwisePlanDevOps YAML in 15 minutes · DevOps Docs · StackwiseCodePython YAML in 15 minutes · DevOps Docs · StackwiseBuildDocker YAML in 15 minutes · DevOps Docs · StackwiseTestDevOps YAML in 15 minutes · DevOps Docs · StackwiseReleaseGit YAML in 15 minutes · DevOps Docs · StackwiseDeployKubernetes YAML in 15 minutes · DevOps Docs · StackwiseOperateLinux YAML in 15 minutes · 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.

YAML in 15 minutes

Docker Compose files, Kubernetes manifests, GitHub Actions workflows, Ansible playbooks, Helm values: they're all YAML. The format is simple, but one wrong space breaks it, and a few of its rules surprise everyone once. Learn them here and the rest of DevOps gets easier to read.

Keys and values

YAML describes data with key: value pairs. The space after the colon is required.

name: web
replicas: 3
debug: false
image: nginx:1.27      # a colon inside a value is fine when it's not followed by a space

Indentation is the structure

Nesting is shown by indentation, the same idea as Python. Use spaces only, never tabs, and be consistent; two spaces per level is the convention almost everywhere.

database:
  host: db.internal
  port: 5432
  credentials:
    user: app

Here port belongs to database, and user belongs to credentials. Move port two spaces left and it becomes a top-level key instead; nothing errors, the meaning just silently changes.

Lists

A dash and a space start each list item. Items can be simple values or whole maps, which is exactly how Kubernetes lists containers and how Actions lists steps:

ports:
  - 80
  - 443

containers:
  - name: web          # one item: a map with two keys
    image: nginx:1.27
  - name: sidecar      # the next item
    image: busybox:1.36

There's also a compact "flow" style taken from JSON: ports: [80, 443] and labels: {app: web, tier: front}. Use it for short things only.

Strings, and when to quote them

Most text needs no quotes. Single quotes keep everything exactly as written; double quotes allow escapes like \n. Quote a value when YAML might read it as something else:

  • Numbers that are really text: version: 3.10 is read as the number 3.1. Write "3.10". This is the classic bug in python-version in GitHub Actions.
  • yes, no, on, off: some tools read these as true and false. Quote them when you mean the word.
  • Leading zeros and colons: mode: 0755 can be read as an octal number, and older parsers turn 22:22 into a base-60 number. Quote file modes and port mappings like "8080:80".
  • Values starting with special characters such as *, &, !, {, [, @, ` or #.
  • Kubernetes environment variables must be strings: value: "8080", not value: 8080.

Multi-line text

Scripts inside CI files are usually written as block text:

run: |                 # | keeps every line break: perfect for shell commands
  pip install -r requirements.txt
  pytest -q

description: >          # > folds lines into one paragraph
  This text is written over
  several lines but becomes one.

Adding a minus (|- or >-) drops the final newline.

Comments, several documents and reuse

  • # starts a comment, anywhere outside quotes.
  • --- separates several documents in one file. Kubernetes uses it to put a Deployment and its Service in the same file.
  • Anchors and aliases reuse a block: &name labels it, *name repeats it, and <<: *name merges a map into another. Docker Compose (with x- fields) and GitLab CI use this a lot:
x-common: &common
  restart: unless-stopped
  logging:
    options: {max-size: "10m"}

services:
  web:
    <<: *common
    image: ghcr.io/you/web:1.0
  worker:
    <<: *common
    image: ghcr.io/you/worker:1.0

YAML and JSON

Modern YAML is a superset of JSON, so any JSON document is also valid YAML. That's why Kubernetes accepts both, and why Python chapter 8 can load either into the same dicts and lists.

YAMLname: webreplicas: 3ports: - 80 - 443env: DEBUG: falsethe same data in JSON{ "name": "web", "replicas": 3, "ports": [80, 443], "env": {"DEBUG": false}}=
Indentation in YAML does the job of JSON's braces, and a leading dash marks a list item. Both load into the same dicts and lists.

Check before you apply

$ pip install yamllint && yamllint compose.yaml           # style and syntax
$ python3 -c 'import sys, yaml; yaml.safe_load(open(sys.argv[1]))' file.yaml
$ docker compose config                                      # Compose: shows the final, merged file
$ kubectl apply --dry-run=client -f web.yaml                 # Kubernetes: validates without changing anything

For GitHub Actions, the actionlint tool catches mistakes in workflow files before you push. VS Code's YAML extension underlines most errors as you type.

Common errors

  • mapping values are not allowed here: a missing space after a colon, or a colon followed by a space inside an unquoted value. Quote the value.
  • found character '\t' that cannot start any token: a tab. Replace it with spaces, and set your editor to insert spaces.
  • did not find expected key or could not find expected ':': inconsistent indentation, usually one line off by a space.
  • cannot unmarshal number into ... of type string from Kubernetes: a number where text is expected (environment values, annotations). Quote it.

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.