Skip to content
StackPractices

Tag: devops

Browse 117 practical software engineering resources tagged with "devops". Discover code recipes, design patterns, documentation templates, and in-depth guides to help you build, deploy, and maintain production-ready solutions involving devops.

Parse Log Files

How to parse and analyze server log files using Python, Java, and JavaScript.

Database Schema Evolution

Evolve database schemas safely with backward-compatible changes, versioned migrations, and online DDL operations in production environments.

Ansible Playbook for Server Configuration

How to write and run Ansible playbooks for provisioning, configuring, and managing servers with idempotent tasks, roles, and inventory files.

Deploy Containers to AWS ECS with Fargate

How to deploy Docker containers to AWS ECS using Fargate serverless compute with Terraform and GitHub Actions

Background Jobs

How to schedule and run background jobs using cron, task queues, and workers.

Backup Rotation Script in Bash

Automated backup with retention policies using bash and find.

Bash Scripting for DevOps Automation and System Tasks

How to write reliable Bash scripts for automating deployments, system monitoring, log rotation, and routine maintenance tasks

Blue-Green Deployment

Deploy with zero downtime using blue-green environments, instant traffic switching, and automated rollback capabilities.

Chaos Engineering

Build resilient systems by intentionally injecting failures and observing how your distributed services respond and recover.

CI/CD Pipeline Setup

Set up automated CI/CD pipelines for testing, building, and deploying applications with GitHub Actions and what works.

CLI Tool with Argument Parsing

How to build a professional command-line interface with argument parsing, flags, and subcommands.

Container Image Security Scanning with Trivy

Scan Docker images for vulnerabilities, misconfigurations, and secrets using Trivy, integrate scanning into CI/CD pipelines, and enforce image policies before deployment to production

Cron Jobs

How to schedule and manage recurring tasks using cron syntax across Linux, Python, and Node.js.

Docker Basics

How to containerize an application, write a Dockerfile, and run containers with Docker Compose.

Local Microservices Development with Docker Compose

Orchestrate multi-service local environments with Docker Compose including databases, caches, message brokers, and reverse proxies with hot reload and shared networks

Override Docker Compose Configs per Environment

How to use Docker Compose override files for environment-specific configurations, covering dev, test, staging, production, profiles, and secrets management.

Slim Production Images with Multi-Stage Docker Builds

How to build minimal production Docker images using multi-stage builds with distroless base images, covering Go, Node.js, Python, and Java examples with image size reduction.

Environment Variables

How to read, set, and manage environment variables securely across Python, JavaScript, and Java.

Feature Flags

How to implement feature toggles to safely roll out, test, and rollback functionality without deploying code.

Generate Sitemaps Live

How to build and serve live XML sitemaps from your application data, with multi-language support, pagination, and automatic lastmod dates.

Git Workflow

A practical branching strategy for teams: feature branches, pull requests, and clean commit history.

GitHub Actions CI/CD

How to build and deploy with GitHub Actions using workflows, matrices, caching, and secrets.

Across Multiple OS and Language Versions with GitHub

How to use GitHub Actions matrix strategy to test across multiple operating systems, language versions, and configurations with include, exclude, and dynamic matrices.

Share Workflow Logic with GitHub Actions Reusable Workflows

How to create and consume reusable workflows in GitHub Actions, covering inputs, secrets, conditional jobs, matrix strategy, and organization-wide sharing.

Implement Graceful Shutdown and Zero-Downtime Restarts

How to implement graceful shutdown and zero-downtime restarts for web servers, workers, and containers

Observability Dashboards with Grafana and Prometheus

Build interactive Grafana dashboards that visualize Prometheus metrics with panels, variables, and alerts for thorough service observability

Health Check Endpoint

How to implement a production-ready health check endpoint for monitoring and load balancers.

Deploy Applications to Kubernetes with Helm Charts

Package, version, and deploy Kubernetes applications using Helm charts with value overrides, template functions, and release management for reproducible infrastructure

Immutable Infrastructure

Build immutable infrastructure with versioned machine images and containers to eliminate configuration drift and ensure reproducible deployments.

Canary Deployments with Istio Service Mesh

How to use Istio traffic splitting to perform safe canary deployments by gradually shifting user traffic between application versions

Mount Configs and Secrets into Kubernetes Pods

How to mount ConfigMaps and Secrets into Kubernetes pods using env vars, volumes, projected volumes, and secret management with external secrets.

Package Kubernetes Manifests with Helm Charts

How to create, template, and deploy Kubernetes applications using Helm charts, covering values, conditionals, ranges, hooks, subcharts, and library charts.

Parse and Validate YAML/JSON Configuration

How to parse and validate application configuration files using YAML and JSON schemas.

Set Up Pre-Commit Hooks

How to set up pre-commit hooks with husky, lint-staged, and pre-commit to enforce code quality before commits

Metrics Collection and Alerting with Prometheus

Instrument applications and infrastructure with Prometheus metrics, configure alerting rules, and set up recording rules for efficient monitoring of service health

Retry Logic with Exponential Backoff

How to implement resilient retry logic with exponential backoff and jitter for transient failures in network and API calls.

Manage Application Secrets Securely

How to store, rotate, and inject API keys, database passwords, and certificates without hardcoding them in source code or environment files.

Setup CI with GitLab Pipelines

How to configure GitLab CI/CD pipelines for testing, building, and deploying applications using .gitlab-ci.yml with stages, jobs, caching, and runners.

Setup SSL Certificates with Let's Encrypt

How to obtain, install, and auto-renew SSL certificates using Certbot with Nginx, Apache, and standalone modes for HTTPS-enabled deployments.

Provision an AWS VPC with Terraform

How to use Terraform to provision a production-ready AWS VPC with public and private subnets, NAT gateways, and security groups

Store Terraform State in S3 with DynamoDB Locking

How to configure Terraform remote state with S3 backend and DynamoDB locking, covering state isolation, workspace management, encryption, and CI/CD integration.

Isolate Environments with Terraform Workspaces

How to use Terraform workspaces for environment isolation, covering workspace creation, conditional resources, variable management, and migration to separate state files.

Traffic Mirroring

Mirror production traffic to staging environments for realistic testing, shadow deployments, and performance validation without user impact.

Cloud Cost Optimization

Reduce cloud infrastructure costs with right-sizing, reserved instances, spot instances, and automated resource scheduling across AWS, GCP, and Azure.

Task Queues and RPC with RabbitMQ and AMQP

Implement reliable task distribution and request-reply patterns using RabbitMQ with durable queues, dead-letter exchanges, and prefetch for controlled concurrency

Log Aggregation

Centralize logs from distributed services with ELK, Fluentd, and Loki for search, alerting, and troubleshooting in production.

Prometheus API Monitoring

Monitor API performance and health with Prometheus metrics, custom collectors, and alerting rules.

Structured Logging

Implement structured logging with JSON output, correlation IDs, and log aggregation for production observability.

Container Security Scanning

Scan container images for vulnerabilities, misconfigurations, and secrets with Trivy, Clair, and Snyk before deploying to production.

External Configuration Store Pattern

Centralize application configuration outside of deployment artifacts to support live updates and multi-environment management.

Auto-Scaling Policy Template

A template for documenting scale-up and scale-down rules for cloud infrastructure.

Backup & Restore Verification Template

A template for documenting database and file backup verification procedures.

Bug Triage Template

A template for classifying and routing bug reports by severity and impact.

Change Management Template

A template for documenting CAB reviews and rollback criteria for production changes.

CI/CD Pipeline Design Template

A template for documenting CI/CD pipeline stages, gates, environments, deployment strategies, rollback procedures, and security scanning.

Cloud Cost Allocation Template

A template for tracking team and environment cloud cost allocation.

Cross-Region Failover Test Template

A template for documenting multi-region disaster recovery test procedures.

Dependency Upgrade Runbook

A step-by-step runbook for upgrading project dependencies safely.

Deployment Checklist Template

A pre-release verification checklist for safe production deployments.

Deployment Rollback Runbook

Runbook for rolling back failed deployments safely: rollback triggers, Kubernetes rollback, blue-green deployment rollback, canary rollback, database migration rollback, verification steps, and post-rollback procedures with code examples for kubectl, Helm, and ArgoCD.

Docker Image Hardening Checklist

Checklist for hardening Docker container images for production: base image selection, user permissions, file system restrictions, network isolation, resource limits, secret management, vulnerability scanning, and CI/CD integration with Dockerfile examples.

Downtime Communication Template

A template for internal and external outage messaging during service downtime.

Escalation Policy Template

A template for defining incident severity levels and on-call escalation paths.

Helm Chart Review Checklist

A checklist for reviewing Helm charts covering values, templates, security, resource limits, probes, RBAC, and best practices.

Infrastructure as Code Review Template

A template for reviewing Terraform and CloudFormation infrastructure code.

Kubernetes Pod Disruption Budget Template

A template for defining Pod Disruption Budgets to control voluntary disruptions during node drains, upgrades, and maintenance windows.

Kubernetes Resource Quotas Template

Template for defining Kubernetes resource quotas per namespace: CPU and memory limits, object count quotas, storage quotas, LimitRanges for default requests, priority class integration, and monitoring with examples for multi-tenant clusters.

Network Security Template

A template for documenting VPC, firewall, and DNS security rules inventory.

On-Call Runbook Template

A template documenting common alerts and step-by-step response procedures for on-call engineers.

Patch Management Template

A template for scheduling, testing, and deploying security patches across environments.

Performance Regression Template

A template for comparing benchmarks and creating action plans when performance degrades.

Rollout Communication Template

A template for release notes and stakeholder updates during capability rollouts.

Service Level Objective Template

A template for defining SLOs, SLIs, and error budgets for reliable service management.

SSL Certificate Renewal Template

A template for tracking SSL certificate expiration and renewal workflows.

Terraform Module Versioning Policy

Policy for versioning and publishing Terraform modules: semantic versioning rules, breaking change management, module registry publishing, changelog requirements, deprecation process, and CI/CD integration with examples for Terraform Cloud and private registries.

Terraform State Management Policy

A policy for managing Terraform state files: backend configuration, locking, isolation, access control, versioning, and disaster recovery.

Weekly Ops Review Template

A template for summarizing incidents, costs, performance, and action items in weekly operations reviews.

API Status Page Template

A template for a public API status page that communicates uptime, incidents, and maintenance windows to consumers.

Bug Report Template

A structured bug report template to help teams reproduce, triage, and resolve defects faster with clear reproduction steps and expected behavior.

Capacity Planning Template

A reusable template for planning system capacity, estimating growth, and preventing performance bottlenecks before they happen.

Changelog Template

A structured changelog template following Keep a Changelog conventions for tracking project releases.

Code of Conduct Template

A community code of conduct template to establish inclusive, respectful collaboration standards.

Contributing Guide Template

A ready-to-use template for open-source and internal project contribution guidelines.

Disaster Recovery Plan Template

A disaster recovery plan template for documenting RTO/RPO targets, failover procedures, and recovery runbooks that minimize downtime during catastrophic failures.

Environment Setup Guide Template

A template for documenting how to set up local development, staging, and production environments consistently and reproducibly.

Feature Request Template

A structured capability request template to help teams evaluate, prioritize, and implement new capabilities with clear user value and acceptance criteria.

Onboarding Guide Template

A thorough onboarding guide template to help new team members get productive quickly.

Post-Deployment Verification Checklist Template

A checklist template for verifying deployments: health checks, smoke tests, metric validation, and rollback readiness before declaring all-clear.

Pull Request Template

A thorough pull request template to standardize code reviews and improve merge quality.

README Template

A production-ready README template for open-source and internal projects.

Release Notes Template

A release notes template that communicates changes clearly to users, operators, and stakeholders with categories, upgrade instructions, and known issues.

Runbook Template

A reusable template for operational runbooks: incident response, deployment procedures, and routine tasks.

Service Level Objective (SLO) Document Template

An SLO document template that defines reliability targets, error budgets, and escalation policies for services and platforms.

Event-Driven Architecture — Queues, Topics, and Streams

A practical guide to event-driven architecture: events vs commands, message brokers, patterns like CQRS and Saga, and when to choose async over sync.

Monolith to Microservices — Migration Strategies

A practical guide to decomposing monoliths: strangler fig, branch by abstraction, and incremental extraction patterns that reduce risk and preserve business continuity.

What Works in Code Review — For Authors and Reviewers

A practical guide to useful code reviews: how to write reviewable code, give constructive feedback, and keep reviews fast and focused.

CI/CD Pipeline Guide

A practical guide to building CI/CD pipelines with GitHub Actions, testing, deployment strategies, and rollback procedures.

Complete Guide to CI/CD with GitHub Actions

Build CI/CD pipelines from scratch with GitHub Actions. Covers workflows, runners, matrix builds, caching, secrets, environments, deployment strategies, and reusable workflows.

Complete Guide to Docker in Production

Run Docker containers in production with confidence. Covers multi-stage builds, distroless images, health checks, image scanning, resource limits, logging, secrets, multi-arch builds, and container runtime security with practical Dockerfile examples.

Complete Guide to GitOps with ArgoCD

Deploy Kubernetes applications with GitOps using ArgoCD. Covers installation, ApplicationSets, sync strategies, Helm/Kustomize, RBAC, and multi-cluster management.

Complete Guide to GitOps in Production

Implement GitOps with ArgoCD and Flux. Covers declarative infrastructure, drift reconciliation, automated rollbacks, progressive delivery, multi-cluster management, secret management with SOPS, and CI/CD pipeline integration with practical YAML examples.

Complete Guide to Kubernetes Networking

Master Kubernetes networking. Covers Services, Ingress, NetworkPolicies, CNI plugins, DNS, service mesh, load balancing, external traffic, mTLS, and troubleshooting with practical YAML manifests and configuration examples.

Complete Guide to Monitoring and Alerting

Build a production monitoring stack. Covers Prometheus, Grafana, AlertManager, metrics instrumentation, alert rules, runbooks, SLI/SLO/SLA, distributed tracing with Jaeger, log aggregation, and on-call best practices with practical configuration examples.

Complete Guide to Terraform Modules

Build reusable Terraform modules with proper structure, inputs, outputs, and versioning. Covers module composition, testing, and registry publishing.

Complete Guide to Terraform in Production

Manage infrastructure as code with Terraform in production. Covers modules, state management, workspaces, drift detection, remote backends, variable validation, sentinel policies, and CI/CD integration with practical HCL examples.

Blue-Green and Canary Deployments

A practical guide to deployment strategies: blue-green, canary, rolling, and feature flags. Minimize risk and rollback time when releasing to production.

Docker for Developers — A Complete Guide

Learn Docker from the ground up: images, containers, Dockerfiles, networks, volumes, and Docker Compose for local development.

Git Branching Strategies: A Practical Guide

Compare trunk-based development, GitFlow, and GitHub Flow. Choose the right branching strategy for your team size, release cadence, and CI/CD maturity.

Infrastructure as Code — Terraform and Pulumi

A practical guide to managing infrastructure as code: benefits of declarative vs imperative approaches, state management, modules, and testing infrastructure changes.

Kubernetes Basics for Application Developers

Learn the core Kubernetes concepts every developer needs: Pods, Services, Deployments, ConfigMaps, and basic kubectl commands.

Logging, Monitoring & Observability Guide

A guide to building observable systems with structured logging, metrics, and distributed tracing.

Monitoring and Alerting — Metrics, Logs, and Dashboards

A practical guide to observability: the three pillars (metrics, logs, traces), RED and USE methods, alert design, and building dashboards that actually help.

On-Call and Incident Response Playbook

A practical playbook for on-call engineers: triage, escalation, communication, and postmortems. Reduce MTTR and build a resilient incident response culture.

Technical Documentation Strategy: Docs as Code

A practical guide to treating documentation as code: versioning, review workflows, structure, and tools that keep docs accurate, discoverable, and maintainable.

Web Performance Optimization Guide

A thorough guide to optimizing web application performance for better Core Web Vitals and user experience.