Fundamentals of DevOps and Software Delivery

By Yevgeniy Brikman

There are many guides out there on how to write software. This book is a guide to software delivery: that is, all the processes, tools, and techniques that are required to run software in production and maintain it on an ongoing basis. In particular, this book is a guide to DevOps, one of the methodologies used today to make software delivery vastly more efficient.

Whereas most DevOps content tends to focus primarily on culture and theory, this book is a hands-on guide that includes dozens of examples that walk you, step-by-step, through how to run real systems and real code. You’ll start with the basics—running a single server—and work all the way up to Kubernetes clusters, automated deployment pipelines, distributed data systems, and more.

By the time you’re done with the book, you will have had hands-on practice with all the core concepts and best practices of modern DevOps and software delivery.

Buy Now

About the book

This book is for individual contributors in operations (e.g., current and aspiring Site Reliability Engineers, DevOps Engineers, Sysadmins, Operations Engineers, and Release Engineers) who want to level up their knowledge of software delivery, individual contributors in dev (e.g., Software Engineers, Software Developers, Web Developers, and Full Stack Engineers) who want to learn more about the operations side of the house, and managers in engineering (e.g., Engineering Managers, Engineering Directors, CTOs, VPEs, and CIOs) who want to learn how to adopt DevOps and software delivery best practices in their organizations.

  • Personal computers vs servers
  • On-prem vs cloud
  • PaaS vs IaaS

Learn more »

  • Ad hoc scripts
  • Configuration management tools
  • Server templating tools
  • Provisioning tools

Learn more »

  • Server orchestration
  • VM orchestration
  • Container orchestration
  • Serverless orchestration

Learn more »

  • Version control
  • Build systems
  • Dependency management
  • Automated testing

Learn more »

  • Trunk-based development
  • Feature toggles
  • Deployment strategies and pipelines

Learn more »

  • Multiple environments
  • Multiple libraries
  • Multiple services

Learn more »

  • Domain Name System (DNS)
  • Virtual private clouds (VPCs)
  • Network access and hardening
  • Service discovery, service meshes

Learn more »

  • Cryptography
  • Encryption at rest
  • Encryption in transit

Learn more »

  • Relational DBs, schemas
  • NoSQL, NewSQL, queues, streams
  • File storage and CDNs
  • Backup and recovery

Learn more »

  • Logs and log aggregation
  • Metrics, dashboards, alerts
  • Observability and tracing

Learn more »

  • Infrastructureless
  • Generative AI
  • Shift left, supply chain security
  • Platform engineering

Learn more »

Open Source Code Samples

The book includes dozens of code samples for you to try, which you can find here:

https://github.com/brikis98/devops-book

About the author

Yevgeniy Brikman

Yevgeniy (Jim) Brikman is the co-founder of Gruntwork, a company that that offers products & services for setting up world-class DevOps Foundations. He's also the author of two other books published by O'Reilly: Terraform: Up & Running, the definitive book on Terraform and OpenTofu, and Hello, Startup, a hands-on guide to building products, technologies, and teams in a startup.

Previously, Jim spent more than a decade building infrastructure and products that serve hundreds of millions of users at LinkedIn, TripAdvisor, Cisco Systems, and Thomson Financial. For more info, check out ybrikman.com.

A hands-on guide

Table of Contents

1. An Introduction to DevOps & Software Delivery 19
A Primer on DevOps 20
Where DevOps Came From 21
The Evolution of DevOps 23
Adopting DevOps Practices 33
An Introduction to Deploying Apps 35
Example: Run the Sample App Locally 35
Deploying an App on a Server 37
Deploying On Prem Versus in the Cloud 39
Deploying An App Using PaaS 43
Deploying an App Using IaaS 47
Comparing PaaS and IaaS 60
Conclusion 62
2. How to Manage Your Infrastructure as Code 65
The Benefits of IaC 67
Ad Hoc Scripts 69
Example: Deploy an EC2 Instance Using a Bash Script 70
How Ad Hoc Scripts Stack Up 72
Configuration Management Tools 74
Example: Deploy an EC2 Instance Using Ansible 75
Example: Configure a Server Using Ansible 77
How Configuration Management Tools Stack Up 82
Server Templating Tools 84
Example: Create a VM Image Using Packer 86
How Server Templating Tools Stack Up 89
Provisioning Tools 90
Example: Deploy an EC2 Instance Using OpenTofu 91
Example: Update and Destroy Infrastructure Using OpenTofu 97
Example: Deploy an EC2 Instance Using an OpenTofu Module 99
Example: Deploy an EC2 Instance Using an OpenTofu Module from GitHub 104
How Provisioning Tools Stack Up 105
Using Multiple IaC Tools Together 107
Provisioning Plus Configuration Management 107
Provisioning Plus Server Templating 107
Provisioning Plus Server Templating Plus Orchestration 108
Conclusion
3. How to Deploy Many Apps 111
An Introduction to Orchestration 112
Server Orchestration 115
Example: Deploy Multiple Servers in AWS Using Ansible 115
Example: Deploy an App Securely and Reliably Using Ansible 117
Example: Deploy a Load Balancer Using Ansible and Nginx 122
Example: Roll Out Updates with Ansible 126
VM Orchestration 127
Example: Build a VM Image Using Packer 128
Example: Deploy a VM Image in an Auto Scaling Group Using OpenTofu 130
Example: Deploy an Application Load Balancer Using OpenTofu 133
Example: Roll Out Updates with OpenTofu and Auto Scaling Groups 137
Container Orchestration 141
Example: A Crash Course on Docker 143
Example: Create a Docker Image for a Node.js app 145
Example: Deploy a Dockerized App with Kubernetes 148
Example: Deploy a Load Balancer with Kubernetes 154
Example: Roll Out Updates with Kubernetes 155
Example: Deploy a Kubernetes Cluster in AWS Using EKS 157
Example: Push a Docker Image to ECR 160
Example: Deploy a Dockerized App into an EKS Cluster 162
Serverless Orchestration 164
Example: Deploy a Serverless Function with AWS Lambda 168
Example: Create a Lambda Function URL 171
Example: Roll Out Updates with AWS Lambda 173
Comparing Orchestration Options 174
Conclusion 179

A snippet of the table of contents highlighting a few of the hands-on examples in the book. Try scrolling down to see more!

A book on weight lifting can teach you principles, routines, and exercises, but it's only after you spend hours in the gym practicing, sweating, and applying what you learned that you'll be able to lift serious weight. Likewise, this book will teach you principles, techniques, and tools of DevOps and software delivery, but it's only after you spend hours writing code, debugging systems, and applying what you learned that you'll be able to achieve serious results.

That's what the dozens of hands-on code examples in this book are for. Instead of only reading, you get to learn by doing, following the step-by-step instructions to write and run a lot of code. You can find the sample code for the book in this GitHub repo.

Buy now

The Early Release of Fundamentals of DevOps and Software Delivery is now available at O'Reilly! Grab a copy of the ebook before the final version is done, so you can start learning today, receive new chapters as they are written, and provide feedback directly to the author to help shape the book:

Not an O'Reilly subscriber? Get a 30-day trial free with this link!

If you prefer to wait for the print version, you can pre-order the book now at the following stores:

Resources

Blog posts, appendices, and other useful information related to the book.

How to manage state and environments with OpenTofu

· 18 min read

Learn about OpenTofu's powerful features for managing state, and how they differ from Terraform, including how to store state, encrypt state, and how to manage state across multiple environments.

How to authenticate to AWS with IAM Identity Center

· 11 min read

Learn the modern and secure way to authenticate to AWS, both on the web and the command line, using IAM Identity Center.

Learn Git and GitHub in 15 Minutes

· 15 min read

Learn the basics of Git and GitHub in 15 minutes with this hands-on tutorial. Topics include version control, repositories, branches, commits, merges, pull requests, and more.

News

Subscribe to the Foundations of DevOps Newsletter! Get the latest news, blog posts, and talks on DevOps and software delivery. No spam, ever.

The early release and pre-orders are now available!

The early release is now available at O'Reilly Media! Grab a copy of the ebook before the final version is done so you can start learning today, and receive new chapters and updates as they are written, plus the final ebook bundle when the book is released. If you prefer to wait for the final version, you can preorder the book at online stores now!

Get the early release or pre-order now! »