The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Bought separately
$232
Minimum price
$69.00
$99.00
About the Bundle
About the Books
Mastering Terraform is a hands-on, production-grade guide to infrastructure as code for platform engineers, cloud architects, and DevOps engineers who already live in a terminal. It starts from a blank directory and works through HCL syntax, providers, state, modules, variables, and expressions, then climbs into remote backends, team collaboration, Terragrunt dependency management, testing, policy as code, secrets handling, drift detection, observability, cost control, multi-cloud and Kubernetes usage, GitOps delivery, failure recovery, and version upgrades.
Every chapter pairs runnable HCL and Bash with real command output to interpret, the pitfalls that bite in production, a hands-on exercise, and a recap checklist you can paste into a runbook. Version-sensitive details are flagged: S3-native state locking in Terraform v1.11.0, early evaluation in `backend` blocks, ephemeral variables and write-only attributes in OpenTofu v1.11, native `terraform test` with provider mocking, and the AWS Cloud Control provider's 950+ generated resources.
You will learn to write and package reusable modules, wire inputs and outputs as contracts, choose between `count` and `for_each`, plan for replacement, configure S3, Azure Blob, and GCS backends with locking, split state and refactor with `moved` blocks, and build CI pipelines with GitHub Actions, GitLab CI, Atlantis, and HCP Terraform. Policy enforcement covers TFLint rules, Checkov, and OPA/Rego checks for encryption, tagging, and public ingress.
The capstone deploys a blue-green web application end to end: ECS services with weighted ALB routing, health verification before a traffic switch, automated rollback, Rego policies, and a CI pipeline. You finish with an operational runbook, a deployment roadmap, and an operational checklist.
Move from your first `terraform init` to a multi-environment AWS platform built with HCL, reusable modules, remote state, policy gates, and pull-request pipelines.
**Terraform in Practice** teaches the mechanics and the operational judgment behind Infrastructure as Code. You will learn how Terraform compares configuration, state, and real cloud infrastructure to build a plan; write HCL using types, expressions, functions, dynamic blocks, and dependency-safe patterns; manage remote state, locking, workspaces, imports, and state migrations; and structure modules that other teams can consume.
The production chapters cover secrets with ephemeral values and AWS Secrets Manager, validation with `terraform fmt`, `terraform validate`, `tflint`, and `terraform-docs`, security scanning with Checkov, tfsec, Trivy, OPA, and Conftest, and automated testing with `terraform test`, mocks, and Terragrunt. You will configure GitHub Actions with OIDC authentication, Atlantis, HCP Terraform, and Terraform Enterprise, plus drift detection, observability, cost controls, and incremental adoption of existing infrastructure.
A four-part AWS walkthrough assembles networking, DNS, TLS, load balancing, ECS, RDS, Secrets Manager, monitoring, cost policies, and CI/CD into a complete stack. Each chapter includes checklists and failure-recovery exercises, while the debugging chapter covers plan errors, partial applies, state corruption, provider failures, and emergency recovery.
The book also compares OpenTofu, Terragrunt, Atlantis, Pulumi, and CloudFormation, with Terraform 1.17.x and OpenTofu 1.10.x as its reference versions.
Start with a single control node, then build an Ansible automation practice that can configure, test, deploy, observe, and recover a real infrastructure. You’ll learn how to install `ansible-core`, define static and dynamic inventories, resolve variable precedence, select modules instead of raw commands, and structure plays with loops, conditionals, tags, and error handling.
The book then moves into the practices that separate a working playbook from production automation: Jinja2 templates, reusable roles, idempotency, handlers, collections, secrets management with Ansible Vault and SOPS, CI/CD and GitOps, cloud inventory at scale, observability, and failure recovery. You’ll also learn to test automation with Molecule and `ansible-lint`, troubleshoot failures systematically, and build reusable platform patterns such as golden paths, composition layers, self-service workflows, and versioning practices.
A complete walkthrough ties everything together: configure `ansible.cfg`, create an inventory, build `common`, `checkout`, and `edge` roles, run deployments, verify a zero-change second run, add Molecule scenarios, connect CI/CD, and write an operational rollback runbook. Every chapter includes runnable YAML, Python, and Jinja2 examples, expected output, common pitfalls, exercises, and a recap checklist.
Build a dependable Ansible automation practice for Linux, cloud, and Kubernetes infrastructure. Starting with a local playbook, you will learn how to write idempotent tasks, organize static and dynamic inventories, package reusable roles, control variable precedence, render templates, and manage services with handlers.
The handbook then covers collections, modules, plugins, conditionals, loops, Vault, identity, secret rotation, and testing with syntax checks, linting, and Molecule. You will connect automation to Git, CI/CD, and GitOps workflows before orchestrating it through AWX or Ansible Automation Platform.
Later chapters address execution environments, scaling across domains, multi-cloud automation with AWS, Azure, and Google Cloud, and Kubernetes deployment with Helm and dynamic inventory. You will also add observability, audit trails, supply-chain hardening, and policy checks.
Practical walkthroughs include a zero-downtime web platform rollout with health gates and rollback, plus a field guide for diagnosing connection, permission, idempotence, variable, template, inventory, and runner failures. Each chapter includes runnable examples, failure scenarios, common pitfalls, and a concise recap.
By the end, you will have a versioned automation platform built on reviewable code, tested changes, controlled secrets, scheduled execution, and repeatable recovery procedures.
Docker rewards practitioners who stop treating it as a command-line wrapper around `chroot`. This book builds that mental model from the kernel primitives up — namespaces, cgroups, overlay filesystems, the client/daemon/BuildKit/containerd split — and then spends the bulk of its pages on the work that actually fills pager windows at 3 a.m.: writing lean multi-stage Dockerfiles, wiring Compose for a real service topology with PostgreSQL and Redis, shipping reproducible multi-platform images through CI, scanning and signing artifacts, deploying them, instrumenting them with Prometheus and Grafana, and debugging them when they misbehave.
Every chapter pairs explanation with runnable YAML, Dockerfile, Bash, and Python, states the expected output, flags the pitfalls that bite teams who learned Docker from Stack Overflow answers, and closes with a recap checklist.
What you will be able to do after reading it:
- Explain container behavior from the kernel up: PID namespaces and signal semantics, cgroup limits, layered filesystems, and what an image manifest actually contains.
- Write Dockerfiles that age well: correct `ENTRYPOINT`/`CMD` contracts with an init process, cache-friendly layer ordering, `.dockerignore`, multi-stage builds, non-root users, and healthchecks.
- Use BuildKit features deliberately: cache mounts, bind mounts, secret mounts, multi-platform builds, Bake as build-as-code, and provenance attestations.
- Publish images reproducibly: reference syntax, digests, a local TLS registry, tag promotion policy, and verifying what you pushed.
- Manage state and networking: volumes, bind mounts, tmpfs, storage drivers, backups and migration, the five network drivers, port publishing, and container DNS.
- Run multi-service stacks with Compose, including healthcheck-gated `depends_on`, profiles, `develop` watch mode, and `extends`/`include`.
- Test containerized applications at every level, from unit tests without a container to image smoke tests, integration tests, and end-to-end suites.
- Build CI/CD pipelines that build once and promote by digest, in GitHub Actions, GitLab CI, or Jenkins.
- Secure the supply chain with Trivy scanning, misconfiguration policies, Sigstore/cosign signing and attestations, and a complete security gate.
- Observe production with Prometheus metrics, structured logging, health and readiness endpoints, alerting, OpenTelemetry tracing, and provisioned Grafana dashboards.
- Set CPU and memory limits, measure throttling and OOM behavior, and benchmark a container against a host baseline.
- Debug systematically using decision trees, health logs, filesystem inspection, `nsenter`-style toolbox containers, and a repeatable runbook.
Includes a 14-chapter capstone that builds, scans, signs, deploys, observes, breaks on purpose, rolls back, and tears down a full application stack, plus a production-readiness checklist and an addendum covering Compose v5 scheduled jobs.
Build a GitHub Actions delivery platform from an empty repository through production deployment and rollback. You’ll learn workflow anatomy, including triggers, filters, expressions, job dependencies, outputs, conditions, concurrency, and runner filesystem cleanup. Then you’ll choose between hosted and self-hosted runners, configure runner labels and matrix builds, and manage caching for scale.
Security chapters cover least-privilege `GITHUB_TOKEN` permissions, secret handling, OIDC short-lived credentials, SHA-pinned actions, SLSA provenance, artifact attestations, Sigstore Cosign signing, static analysis, CodeQL, OpenSSF Scorecard, and repository rulesets.
The book shows how to structure quality gates, reuse workflows and composite actions across monorepos, build containers with Docker Buildx and BuildKit, publish to npm and PyPI, and automate pull requests with merge queues, CODEOWNERS, and preview environments. Deployment sections cover rolling, blue/green, canary, and progressive delivery on AWS, Azure, and GCP with GitHub Environments as approval gates.
You’ll also build pipeline observability, incident response runbooks, cost dashboards, and a complete sample application that moves from commit to container image, Kubernetes rollout, drift check, and rollback.
Every chapter includes runnable YAML and shell, expected output, common failure modes, exercises, and a recap checklist.
GitLab CI/CD in Action is a hands-on guide to building delivery pipelines you can trust with real applications. It starts from a blank repository and a short YAML file, then works deliberately through pipeline anatomy (pipelines, jobs, stages, the DAG, `rules` versus stages, `when: always`), runners and executor choice, the YAML keyword toolkit, variables and secrets, artifacts versus caches, containerised builds, testing and quality gates, reusable configuration, merge requests and merge trains, environments and deployment strategies, pipeline security, package registries, and observability and troubleshooting.
Every chapter names real tools, real version boundaries and real tier limits, with runnable YAML and shell you can paste into your own repository. You will set up a project, register a runner, and read a pipeline log like a diagnostic tool. You will learn when `needs` beats stage ordering, why `CI_JOB_TOKEN` exists and where it does not work, how protected and masked variables differ, how to gate merges on coverage thresholds and security scans, and how to roll out blue-green deployments with environment-scoped secrets.
Three end-to-end walkthroughs close the book: a Node.js API, a containerised Python service, and a multi-project monorepo — each with a full pipeline, deploy script and smoke test. Appendices cover version-dependent behaviour, project settings, Docker executor hardening, and a false-positive workflow for scanner findings.
Written for developers, platform engineers, DevOps practitioners and technical leads who know Git and the command line but want to master the operational reality of shipping to production.
Advanced PowerShell Scripting: Engineering Reliable Automation
This book is for Windows administrators, DevOps engineers, SREs, and developers who already know cmdlets, pipelines, and variables but need automation that survives contact with production. It is not a syntax tutorial — it explains why your `foreach` loop mutates underneath you and how to write it so it cannot.
**Build the engine.** Replace hashtables with classes, enums, attributes, and nullability constraints that catch typos before deployment. Architect modules around manifests with pinned versions, PSResourceGet distribution, and build pipelines. Structure error handling so a caller can distinguish "failed" from "succeeded with nothing to do," then add structured logging with PSFramework, correlation identifiers, meaningful exit codes, and diagnostic transcripts.
**Verify it.** Write Pester 6 suites — including the mock scoping change that breaks suites relying on fall-through — with unit and integration separation, data-driven tests, and coverage. Gate merges with PSScriptAnalyzer 1.25.0, custom rules, the `PSModule/Invoke-ScriptAnalyzer` GitHub Action, and formatting standards.
**Secure it.** Threat-model privileged automation, then apply the five controls: logging pillars, AMSI, Constrained Language Mode, execution policy and signing, and safe design principles. Enforce least privilege with JEA role capabilities and session configurations, plus constrained runspaces for cross-platform work. Handle secrets with SecretManagement and SecretStore, Azure Key Vault, and managed-identity secretless patterns that avoid storing credentials entirely.
**Execute at scale.** Declarative automation with DSC v3 configuration documents, `--what-if`, and custom resources. Parallelism with `ForEach-Object -Parallel` and `Start-ThreadJob`, plus profiling and the `+=` optimization in 7.5. Isolation and reproducibility with containers. Cloud automation with the Microsoft Graph SDK and Azure, including rate-limit handling and the `Az` module's asynchronous provisioning problem.
**Ship it.** GitHub Actions pipelines with OIDC, reusable workflows, composite actions, and hardened self-hosted runners. Cross-platform design covering path handling, case sensitivity, encodings, and the `curl` alias trap.
Closes with two full enterprise walkthroughs — a Windows server configuration platform and a cross-platform fleet management service — plus a six-stage deployment plan and a troubleshooting guide organized by symptom.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.