Software Delivery in Small Batches

The Principle of Feedback, or the second way of DevOps, describes using right to left feedback in the value stream.

Show Notes

The DevOps Handbook & Accelerate are the source material for this episode. 

The Principle of Feedback, or the second way of DevOps, describes using right to left feedback in the value stream. This episode explores how telemetry is more than error data or alerts. When used right (i.e. paired with experimentation), telemetry provides an objective way to move towards shared goals. 

Books
★ Support this podcast on Patreon ★

Creators & Guests

Host
Adam Hawkins
Software Delivery Coach

What is Software Delivery in Small Batches?

Adam Hawkins presents the theory and practices behind software delivery excellence. Topics include DevOps, lean, software architecture, continuous delivery, and interviews with industry leaders.

[00:00:00] Hello and welcome. I'm your host, Adam Hawkins. Each episode, I share a small batch of software engineering theory and best practices. If you enjoy this podcast and please subscribe and share it with your friends and colleagues.

[00:00:17] The process used to write code and deploy it to production is the biggest contributor to your team's velocity.

[00:00:23] You've probably been in the situation where something is seriously broken in production and you need deploy a fix. Right away. You may have even tried to circumvent the existing process to deploy it faster. So simply put the faster team can write and deploy code to production, the better.

[00:00:38] This is the principle of flow or the first way of DevOps. The DevOps handbook provides a two-step process for achieving fast flow from development to production.

[00:00:48] Step 1, use trunk-based development and continuous integration.

[00:00:52] Step 2, use continuous delivery. Now you've probably heard these terms before. They’re thrown around and often used incorrectly continuous integration is a prime example.

[00:01:03] So I'll do my best to clarify the right and proper way to achieve fast flow from development to production. The goal at the end of each development cycle is to produce production-ready builds, built, from master that have been verified in a production-like environment and validated with automated tests.

[00:01:19] That's continuous delivery. In a nutshell, continuous deployment takes it one step further by automatically pushing code to production. But that's a topic for another episode for now. Let's start with trunk-based development. I bet the mere mention of trunk makes some of you shudder. Some of you may even be thinking trunk, what is madman talking about?

[00:01:39] SVN for? we use git so what's the point? Well, the point is to reduce cycle times from development to production, Trunk-based development, optimizes for team productivity instead of individual productivity, which is a great way to achieve that. goal.

[00:01:54] The trunk-based development. boils down to keeping branches small and maintaining an incremental straight line of development branches.

[00:02:01] Should be merged to trunk r master? At the end of each day, It must also be covered by automated tests. So it's clear which commits are broken. This is the origin of continuous integration. And believe me, they’re a lot of continuous things in DevOps]. this practice ensure commits are smaller, thus easier to write test, and deploy to production, hence improving times from development to.

[00:02:22] production. I can hear some of you saying, Adam, wait, what are you talking about? Why does this make any sense? What am I supposed to do with my feature branches? what about those epic branches that are open for weeks? Well, my answers to that question lies in a perspective shift regarding individual roles are and what a team values.

[00:02:41] But I want to put these questions in another way.

[00:02:44] Ask yourself this question, Would you rather work in your topic branch for as long as possible, or would rather get your code out the door and into production? I choose production and I think you should too, but I don't want to get too far into the weeds on this area because it's somewhat controversial.

[00:03:01] So check the show notes for more links in discussion on this topic for now. Let's move forward to continuous delivery. The idea here behind continuous delivery is to connect commits from trunk or master to an automated deployment pipeline that verifies builds are fit for production. Naturally, this requires varying levels of tests and automation.

[00:03:20] Now don't get lost in the statements from the blogosphere that you need, Docker or microservices and all this stuff to achieve these goals. These proclamations miss the point that technical practices like infrastructure as code and automated testing are more important than specific technologies. Let me repeat that practices are more important than specific technologies, so there's no prescriptive solution, but I'll provide you an outline.

[00:03:44] Step 1, Deploy code to a staging environment.

[00:03:48] Step 2, run a test against staging.

[00:03:51] Step 3, deploy code to production. Ideally using a blue-green strategy or Canary.

[00:03:57] Step 4, run smoke tests against production.

[00:04:01] Step 5, Is it all good? Well, great. You're done. If not, then rollback. then expand out to more pre-production environments as necessary.

[00:04:11] You may have a dedicated performance testing environment or a manual QA environment, or, whatever floats your boat. really, honestly, it doesn't matter how many environments you have as long as the promotion and verification is automated as much as possible. However, your number of environments will grow over time as your deployment pipeline becomes more rigorous.

[00:04:31] Alright, That's enough for this batch. The principle of flow covers reducing cycle times from development to production. Trunk-based development backed by continuous integration and continuous delivery is the best way to achieve that. The book accelerate provides two metrics to measure flow lead time and deployment frequency lead time is how long it takes to go from commit to production.

[00:04:53] Deployment frequency is simply how often deploys happen. Accelerate also breaks down these metrics into tiers. Top-tier lead times are under. an hour. This means a developer can start working on and deliver completed code to production in under an hour, mid their lead times range between one week and a month. So where does your team stack up?

[00:05:15] Anyway, that's a wrap on this episode, head over to the podcasts’ website, smallbatches.dev for a transcript show notes and links to my review and further analysis on both the DevOps handbook and accelerate until the next one. Good luck out there and happing shipping.