Hands-on DevOps labs
30 labs and 130 graded tasks. Each lab starts a fresh machine just for you, with a terminal in the browser, and checks your work on that machine. The first lab of each skill is free.
Linux
Build a project folder, lock down a secrets file, hunt errors across real log files with grep and pipes, and automate a backup with your first script.
- Build a project folder
- Lock down a secrets file
- Hunt the errors
- Automate a backup with a script
Answer business questions from an orders CSV, find the noisiest clients and status codes in a web server access log, and safely rewrite a config file in place with sed.
- Report on the orders CSV
- Who is hitting the web server?
- Revenue with awk
- Rewrite a config file with sed -i
Track down a runaway CPU hog, stop a process that ignores SIGTERM, lower the priority of a live job without restarting it, and run a long report safely in the background with nohup.
- Stop the CPU hog
- A process that ignores SIGTERM
- Lower the priority of a live job
- Run a long job safely in the background
Create a team with its own group, give it a shared folder that keeps the right group on every file, grant one narrow sudo permission through a validated sudoers.d drop-in, and lock a departing account without deleting it.
- Onboard the dev team
- A shared team folder
- Grant one narrow sudo permission
- Offboard the intern
Map the machine's addresses, routes and DNS server, unmask a mystery process listening on a port, run and probe your own web server, and learn why /etc/hosts and dig disagree.
- Network inventory
- Unmask the mystery listener
- Run and probe your own web server
- Give your site a name, and ask real DNS
Hunt down large and old files with find, clean up safely, work out where the disk space went, switch a release with a symlink, and package a release as tar.gz and zip without the junk.
- What is filling the disk?
- Clean up safely
- Measure, then link
- Package release v5
Shell scripting
Write four small Bash scripts that store values in variables, quote them safely, capture command output and make decisions with if, [[ ]] and case, just like real monitoring and ops scripts.
- A greeting script that survives tricky input
- A disk usage alert with exit codes
- Inspect a path with file tests
- Classify files with case
Generate environment folders with for loops, read a server inventory line by line, and build a small function library with return codes that another script reuses.
- Generate environment folders with for loops
- Read a server inventory line by line
- Write a function library
- Reuse the library in a report script
Handle arguments safely with "$@", build a deploy command with getopts flags and a usage message, harden a fragile script with set -euo pipefail, and return meaningful exit codes from a config validator.
- Show the arguments exactly as received
- A deploy command with getopts
- Harden a fragile script
- A config validator with meaningful exit codes
Turn a busy web server access log and an application log into answers: status code counts, the noisiest clients, errors per component and a complete report file, using awk, sort and uniq.
- Count responses per status code
- Find the noisiest clients
- Summarise application errors
- Write the incident report file
Write correct crontab schedules for root, avoid the PATH and % traps that make cron jobs fail silently, and build a cleanup script that logs with timestamps and uses flock so two copies never run at once.
- Schedule three jobs for root
- Avoid the PATH and % traps
- A cleanup script for cron
- Never run twice at the same time
Write scripts that clean up after themselves with trap and mktemp, can be re-run safely, log with timestamps, and survive a flaky dependency with retries and exponential backoff.
- Bundle a release with a cleanup trap
- A provisioning script you can run twice
- A reusable log function
- Retry a flaky command with exponential backoff
Git
Set up your Git identity, create a repository, make your first commits, keep junk and secrets out with .gitignore, and read history with log and diff.
- Tell Git who you are
- Create a repository and make your first commit
- Keep logs and secrets out of Git
- Review a change, commit it and read history
Build two features on their own branches, merge one with a fast-forward and one with a real merge commit, then tidy up the branches you no longer need.
- Work on a feature branch
- Merge with a fast-forward
- Merge with a merge commit
- Delete the merged branches
Two teammates changed the same config line. Start the merge, read the conflict markers, resolve to the agreed content, and settle a second conflict by taking one side.
- Start the merge and find the conflict
- Resolve to the agreed content and finish the merge
- Settle a conflict by taking one side
A repository full of everyday mistakes: discard a stray edit, unstage a secret, fix a bad commit message, revert a broken commit on a shared branch, squash WIP commits and rescue "lost" work with the reflog.
- Clean up the working tree
- Fix the last commit with amend
- Revert a bad commit on a shared branch
- Squash WIP commits with reset --soft
- Throw work away, then rescue it with the reflog
Work against a shared repository like a real team: clone it, push your work, play a teammate in a second clone, recover from a rejected push with pull --rebase, and set up tracking branches.
- Clone the shared repo and push a commit
- Play a teammate in a second clone
- Bring Priya's work into your clone
- Recover from a rejected push
- Share a branch with tracking
Park unfinished work with stash, rebase a feature branch onto main, squash it into one clean commit, tag releases, and cherry-pick a single hotfix without its debug baggage.
- Park unfinished work with stash
- Rebase the feature branch onto main
- Squash the feature into one commit and ship it
- Tag two releases
- Cherry-pick the hotfix and resume your work
Docker
Run nginx in a container, serve your own page from a bind mount, build and run your own image, then clean up like a professional.
- Run a web server
- Serve your own page
- Build and run your own image
- Clean up
Give Redis a named volume, prove the data survives deleting the container, move files out with a bind mount, then back up a volume to a tar file and restore it into a fresh one.
- Run Redis on a named volume
- Prove the data survives the container
- Get files out with a bind mount
- Back up the volume to a tar file
- Restore into a fresh volume
Build a small private network where containers find each other by name, expose only a gateway to the outside world, join a container to two networks, and clean up a network that is still in use.
- Create a network and a private API
- Reach the API by name
- Publish only the gateway
- One container, two networks
- Remove a network that is still in use
Describe a web app, Redis and an nginx proxy in one compose.yaml, start it with one command, configure it with environment variables, scale it, read its logs and tear it down without losing data.
- Write compose.yaml and start the app
- Configure with environment variables
- Scale the web service
- Find answers in the logs
- Tear down, keep the data
Take a static site generator from a careless single-stage build to a production image: .dockerignore, a multi-stage build on pinned tags, a non-root user, a HEALTHCHECK and build arguments.
- Keep secrets out of the build context
- A multi-stage build on pinned tags
- Non-root and healthy
- Stamp the version with a build argument
Five containers are broken in five different ways: a process that exits at once, a missing environment variable, a permissions error, a port clash and a crash loop. Find each cause with logs, inspect and exec, then fix it.
- pay-api stops as soon as it starts
- stats exits with an error
- notes returns 403 Forbidden
- new-web never started
- worker is in a crash loop
Kubernetes
On your own single-node cluster: create a namespace, deploy nginx, expose it with a Service, scale it, and debug a broken deployment.
- Create a namespace
- Deploy the app
- Expose it with a Service
- Scale and label
- Fix a broken deployment
Create ConfigMaps and Secrets from literals and files, feed them to nginx as environment variables and mounted files, then change the config and roll it out.
- Create a ConfigMap and a Secret
- Use the config in a deployment
- Mount the Secret as files
- Change the config and roll it out
Add readiness and liveness probes, fix a probe that lies, ship a new image with a safe rolling update, then survive a broken release and roll it back.
- Deploy with probes
- Fix a probe that lies
- Ship version 1.27 safely
- Ship a broken release
- Roll back
Claim a volume from the local-path storage class, write data from one pod and read it from another, then run a small StatefulSet where every replica gets its own disk.
- Claim a volume
- Write data to the volume
- Prove the data survives
- Run a StatefulSet
- Scale down and keep the data
Four workloads are broken in the triage namespace. Read the signals Kubernetes gives you, find each root cause, and fix it.
- Stop the CrashLoopBackOff
- Fix the ImagePullBackOff
- Schedule the Pending pod
- Fix the empty Service
Run batch work with Jobs and CronJobs, fix a failing migration Job, then fence a team namespace with requests, limits, a LimitRange and a ResourceQuota.
- Run a parallel Job
- Fix the failing migration Job
- Schedule a CronJob and run it now
- Fence the team-a namespace
- Deploy inside the guardrails