Full DevOps with Python
Go from shell basics to shipping a Python service through Docker, GitHub Actions, Terraform and Kubernetes on AWS, with monitoring. Python is the glue: you write the automation yourself instead of copying commands.
What you will be able to do
- Write Python scripts and CLIs that automate servers, files and cloud APIs
- Containerise apps and run them with Docker Compose and Kubernetes
- Build CI/CD pipelines that test, build and deploy on every push
- Provision AWS infrastructure with Terraform and configure it with Ansible
- Monitor services with Prometheus and Grafana
Roadmap
Bar length shows each module's share of study time.
- 117h4 topics
Linux & networking foundations
The operating system and network every DevOps tool sits on.
Show topicsNot startedNavigate the filesystem and fix ownership and permission problems without guessing.
- Navigate with ls, cd, find and du
- Read rwx bits and octal modes
- Fix ownership with chown and chmod
- Manage users, groups and sudo
Inspect processes, read logs with journalctl and write a systemd unit.
- Inspect processes with ps, top and htop
- Send signals and kill stuck processes
- Read service logs with journalctl
- Write and enable a systemd unit
Write Bash scripts with variables, loops, conditionals and exit codes.
- Use variables, quoting and arguments
- Write if tests and case statements
- Loop over files and command output
- Check exit codes and use set -euo pipefail
- Write a backup script with functions
Explain how a request reaches a server and debug it with curl, dig, ss and ssh.
- Learn TCP/IP layers, ports and subnets
- Trace DNS lookups with dig
- Inspect HTTP requests with curl -v
- List listening sockets with ss
- Set up SSH keys and config
- 234h7 topics
Python for automation
Enough Python to replace fragile shell scripts with tested tools.
Show topicsNot startedWrite idiomatic Python with lists, dicts, comprehensions and functions.
- Practice strings, numbers and booleans
- Use lists, dicts, sets and tuples
- Write loops, conditionals and functions
- Rewrite loops as comprehensions
- Use *args, **kwargs and default arguments
- Solve 10 small automation exercises
Structure a project into modules and manage dependencies in a virtual environment.
- Split code into modules and packages
- Create and activate a venv
- Install and pin packages with pip
- Freeze dependencies to requirements.txt
Build a command-line tool that reads config files and takes arguments.
- Read and write text files safely
- Parse and emit JSON and YAML
- Define arguments and flags with argparse
- Load config with CLI overrides
- Build a config-driven CLI tool
Run and check system commands safely from Python.
- Build paths portably with pathlib
- Run commands with subprocess.run
- Capture output and check return codes
- Avoid shell=True and injection risks
- Script a disk-cleanup task
Call REST APIs with auth, retries and error handling.
- Make GET and POST calls with requests
- Send auth headers and tokens
- Handle status codes and timeouts
- Add retries with backoff
- Paginate through a public API
Add logging and tests so your automation fails loudly and predictably.
- Configure the logging module and levels
- Raise and catch specific exceptions
- Write pytest tests with assertions
- Use fixtures and parametrize
- Mock subprocess and HTTP calls
Build the service you will containerise and deploy in later modules.
- Create a FastAPI app with routes
- Validate requests with Pydantic models
- Add a health check endpoint
- Read settings from environment variables
- Test endpoints with TestClient
Module resources:Python tutorial ↗ - 34h1 topics
Git for DevOps
Version control for code and infrastructure.
Show topicsNot startedWork on branches and open pull requests confidently. (The GitHub path goes deeper.)
- Stage, commit and write good messages
- Create and switch branches
- Merge branches and resolve simple conflicts
- Push and open a pull request
- Review and merge a teammate's PR
Module resources:Pro Git book ↗ - 415h4 topics
Containers with Docker
Package the app once, run it anywhere.
Show topicsNot startedRun, inspect and debug containers and understand image layers.
- Run, stop and remove containers
- Inspect logs and exec into containers
- Understand image layers and caching
- Persist data with volumes and bind mounts
- Connect containers on a user network
Write a small, cache-friendly image for your FastAPI service.
- Write a Dockerfile for the FastAPI app
- Order layers for cache hits
- Add a multi-stage build
- Run as a non-root user
- Shrink the image with a slim base
Run the app with a database and cache using one compose file.
- Define app, Postgres and Redis services
- Wire services with networks and env vars
- Add volumes and health checks
- Start and debug the stack with compose up
Push versioned images to Docker Hub, GHCR or ECR.
- Tag images with semver and git SHA
- Push to Docker Hub or GHCR
- Authenticate and push to ECR
Module resources:Docker docs ↗ - 511h3 topics
CI/CD pipelines
Every push is tested, built and shippable.
Show topicsNot startedDesign a pipeline: lint, test, build, scan, deploy, with promotion between environments.
- Learn CI vs continuous delivery vs deployment
- Compare trunk-based and GitFlow branching
- Sketch stages from lint to deploy
Run tests, build the image and push it on every merge to main.
- Write a workflow triggered on push and PR
- Run lint and pytest in CI
- Cache pip dependencies
- Build and push the image on main
- Add a status badge to the README
Read and write a declarative Jenkinsfile.
- Learn Jenkins agents, jobs and plugins
- Write a declarative Jenkinsfile
- Add stages, post steps and credentials
- Compare Jenkins with GitHub Actions
Module resources:GitHub Actions docs ↗ - 620h4 topics
Cloud with AWS
The core services most teams actually use.
Show topicsNot startedCreate users, roles and policies without handing out admin.
- Secure the root account with MFA
- Create IAM users, groups and roles
- Write a least-privilege JSON policy
- Use roles instead of long-lived keys
- Test access with the policy simulator
Launch a reachable, locked-down server in your own VPC.
- Build a VPC with public and private subnets
- Configure route tables and gateways
- Launch EC2 with a key pair
- Lock down security groups
- Put an ALB in front of instances
Store files, run a managed database and deploy a function.
- Create an S3 bucket with lifecycle rules
- Launch an RDS Postgres instance
- Connect the app to RDS securely
- Deploy a Python Lambda function
- Trigger Lambda from S3 events
Write Python scripts that audit and clean up AWS resources.
- Configure credentials and sessions
- List EC2 instances and S3 buckets
- Handle pagination and errors
- Find untagged or idle resources
- Write a dry-run clean-up script
- 717h3 topics
Infrastructure as Code
Servers and networks described in files you can review.
Show topicsNot startedProvision a VPC and EC2 instance from code.
- Install Terraform and configure the AWS provider
- Write resources for a VPC
- Run init, plan and apply
- Use outputs and data sources
- Launch an EC2 instance from code
- Destroy everything cleanly
Reuse modules and keep state safely in S3 with locking.
- Use input variables and tfvars files
- Extract a reusable VPC module
- Consume a registry module
- Store state in S3 with locking
- Separate dev and prod environments
Configure servers idempotently with playbooks.
- Set up an inventory and SSH access
- Run ad-hoc commands
- Write a playbook with tasks and handlers
- Use variables and Jinja2 templates
- Organise tasks into roles
- Verify idempotency with a second run
- 819h4 topics
Kubernetes
Run containers at scale with self-healing and rollouts.
Show topicsNot startedExplain control plane vs nodes and run workloads on kind or minikube.
- Learn control plane and node components
- Create a local cluster with kind
- Use kubectl get, describe and logs
- Run a Pod and inspect it
- Understand namespaces and contexts
Deploy the FastAPI service with config, secrets and an ingress.
- Write a Deployment for the FastAPI app
- Expose it with a Service
- Route traffic with an Ingress
- Inject config with ConfigMaps
- Store credentials in Secrets
- Add readiness and liveness probes
Package your manifests into a chart with per-environment values.
- Learn chart structure and templates
- Convert manifests into a chart
- Add per-environment values files
- Install, upgrade and roll back releases
Script cluster checks and clean-ups in Python.
- Load kubeconfig with the Python client
- List pods and their statuses
- Script a clean-up of failed pods
Module resources:Kubernetes basics ↗ - 910h3 topics
Monitoring & observability
Know when it breaks before users do.
Show topicsNot startedExpose metrics from your app and write alerting rules.
- Run Prometheus and scrape a target
- Expose metrics with prometheus_client
- Add counters and histograms
- Write PromQL queries
- Define an alerting rule
Build a dashboard for latency, errors and saturation.
- Connect Grafana to Prometheus
- Chart latency percentiles and error rate
- Add saturation panels and variables
- Export the dashboard as JSON
Ship container logs to Loki or ELK and query them.
- Log structured JSON from the app
- Ship container logs to Loki or ELK
- Query and filter logs by label
- Correlate logs with request IDs
- 1014h1 topics
Capstone project
One repo that shows everything end to end.
Show topicsNot startedA public repo with a README diagram that you can walk an interviewer through.
- Build and test the FastAPI service
- Containerise it with a multi-stage image
- Add a GitHub Actions build pipeline
- Provision infrastructure with Terraform
- Deploy to Kubernetes with Helm
- Add Grafana dashboards and a README diagram