Pillar #7 — DevOps 14 chương Full master Multi-cloud

DevOps — Từ zero tới production

Trụ cột thứ 7 — gói trọn DevOps lifecycle từ văn hóa đến tooling: Foundations → Git → CI/CD → Docker → Kubernetes → IaC (Terraform) → Cloud (AWS/GCP/Azure) → Secrets → Observability (Prometheus/Grafana) → SRE → DevSecOps → Performance → Production. Mỗi chương 600-900 dòng đầy đủ lý thuyết, code thật, ví dụ multi-cloud, bài tập, và quiz.

Lộ trình 14 chương

Học theo thứ tự — chương sau dựa trên chương trước. Foundations (1-4) đặt nền tảng văn hóa + tooling cơ bản. Containers (5-6) là core của DevOps hiện đại. Infra (7-8) cho phép tự động hóa hạ tầng. Operate (9-11) đưa hệ thống vào production thật. Master (12-14) chuyên sâu security, performance, reliability.

CHƯƠNG 01 · FOUNDATION

DevOps Foundations

DevOps là gì, lịch sử Dev/Ops xung đột, văn hóa CALMS, DORA metrics (4 keys), DevOps lifecycle, Agile/Lean/Toyota Way. Mindset trước tooling.

CALMS DORA Lean Lifecycle
CHƯƠNG 02 · FOUNDATION

Linux & Shell cho DevOps

systemd, users/groups, file permissions, networking basics (ip/ss/netstat), processes, cron, log management (journalctl, /var/log), troubleshooting checklist.

systemd journalctl cron SSH
CHƯƠNG 03 · FOUNDATION

Git & Workflows

Git internals, branching strategies (Gitflow, GitHub Flow, Trunk-based), monorepo vs polyrepo, semantic versioning, pull request review, conflict resolution.

Trunk-based Gitflow SemVer Monorepo
CHƯƠNG 04 · FOUNDATION

CI/CD Fundamentals

Continuous Integration vs Delivery vs Deployment, pipeline as code, GitHub Actions, GitLab CI, Jenkins, build/test/deploy stages, artifact registry, parallelization.

GitHub Actions Pipeline Artifact Cache
CHƯƠNG 05 · CONTAINERS

Containers & Docker

Container vs VM, namespaces/cgroups, Docker architecture, Dockerfile best practice, multi-stage build, image optimization, registry, networking, volumes, Docker Compose.

Dockerfile Multi-stage Compose Registry
CHƯƠNG 06 · CONTAINERS

Kubernetes

Architecture (control plane + nodes), Pods/Deployments/Services/Ingress, ConfigMaps/Secrets, namespaces, RBAC, Helm, autoscaling (HPA), troubleshooting kubectl.

Pod/Deployment Service Ingress Helm
CHƯƠNG 07 · INFRA

Infrastructure as Code

Declarative vs Imperative, Terraform deep (HCL, providers, state, modules, workspaces), drift, import, Pulumi/CloudFormation/ARM so sánh, IaC best practices.

Terraform State Modules Drift
CHƯƠNG 08 · INFRA

Cloud Platforms (AWS/GCP/Azure)

IaaS/PaaS/SaaS, compute (EC2/GCE/VM), storage (S3/GCS/Blob), networking (VPC), IAM, managed K8s (EKS/GKE/AKS), serverless (Lambda/Functions), cost & multi-cloud.

VPC IAM EKS/GKE/AKS Serverless
CHƯƠNG 09 · OPERATE

Configuration Management & Secrets

Ansible (playbook, role, inventory), config vs code, environment-specific config, Vault, AWS Secrets Manager, GitOps (ArgoCD/Flux), 12-factor app principles.

Ansible Vault ArgoCD 12-factor
CHƯƠNG 10 · OPERATE

Monitoring & Observability

Three pillars (logs/metrics/traces), Prometheus + PromQL, Grafana, ELK/Loki, OpenTelemetry, Jaeger distributed tracing, alerting (Alertmanager, PagerDuty), SLI/SLO/SLA.

Prometheus Grafana OTel SLO
CHƯƠNG 11 · OPERATE

Site Reliability Engineering

SRE vs DevOps, error budget, toil reduction, postmortems (blameless), incident command (ICS), chaos engineering, on-call best practice, capacity planning, runbook.

Error Budget Toil Postmortem Chaos
CHƯƠNG 12 · MASTER

DevSecOps

Shift-left security, SAST/DAST/SCA, container scan (Trivy, Snyk), secrets scanning (gitleaks), supply chain (SBOM, Sigstore, SLSA), policy as code (OPA), compliance (SOC2, ISO 27001).

SAST/DAST Trivy SBOM OPA
CHƯƠNG 13 · MASTER

Performance & Scaling

Load testing (k6, Locust), profiling (CPU/heap), autoscaling (HPA/VPA/cluster), caching layers, CDN, database scaling, capacity planning, performance budget, FinOps.

k6 HPA/VPA CDN FinOps
CHƯƠNG 14 · MASTER

Production Mastery

HA multi-region, DR (RTO/RPO, backup, failover), deployment strategies (blue-green/canary/rolling), feature flags, A/B testing, Platform Engineering, IDP, Backstage.

HA/DR Canary Feature Flag IDP

Cách học hiệu quả

  1. Đọc giáo trình tổng quan trước để có bản đồ tư duy: Culture → Tooling → Containers → Infra → Operate → Master.
  2. Học theo thứ tự 1→14. Chương sau dựa trên trước (Kubernetes phải biết Docker; Observability phải biết hệ thống chạy).
  3. Code thật từ chương 4 trở đi. CI/CD, Docker, K8s không thể học bằng đọc — phải tay đặt vào terminal.
  4. Setup lab cá nhân: Docker Desktop / minikube / kind cho K8s, AWS Free Tier hoặc GCP $300 credit, GitHub repo riêng cho practice.
  5. Đọc kỹ "Why" thay vì "How". Tool đến và đi — Jenkins → GitHub Actions → ArgoCD → ?, nhưng nguyên lý (immutability, idempotency, declarative) là vĩnh cửu.
  6. Mỗi chương có quiz + bài tập — đừng skip. Đó là test bạn thực sự hiểu hay chỉ đọc lướt.
"DevOps không phải team mới, không phải job title, không phải tool. Đó là cách làm việc: dev và ops cùng chịu trách nhiệm cho việc code chạy đúng trong production."

4 chỉ số DORA — Đo lường DevOps

Google đã nghiên cứu 6 năm, hơn 30,000 dev, kết luận: high-performing team luôn vượt low-performing team trên 4 metric này. Đây là kim chỉ nam đo "DevOps thật sự" hay "DevOps cosplay".

Deployment Frequency
Multi/day
Elite: deploy nhiều lần/ngày · Low: ít hơn 1 lần/tháng
Lead Time for Changes
< 1 hour
Elite: commit → prod < 1 giờ · Low: hơn 6 tháng
MTTR (Mean Time to Recover)
< 1 hour
Elite: recover < 1 giờ · Low: hơn 1 tuần
Change Failure Rate
0-15%
Elite: 0-15% deploy bị lỗi · Low: 46-60%