8 Off-hour deployments

 

This chapter covers

  • Longer release cycles and their impact to the team’s deployment confidence
  • Automation techniques for deployments
  • The value of code deployment artifacts
  • Feature flags for releasing incomplete code

Deployments are sometimes big, scary events. Sometimes the ritual around these deployments can be justified. But it’s much more common that the eventfulness of your deployments is a symptom of something deeper going on with your deployment strategies. Off-hour deployments are an antipattern that feels justified in protecting your organization. But in reality, you’re treating the symptom instead of the problem. If you get calendar invites for routine deployments, there might be a better way.

8.1 War story

Patrick runs the product organization at the FunCo company. One day his phone rings, and it’s Jaheim from the sales department. Jaheim has been working his way into a sales meeting with Quantisys, a large player in the market. He finally got a chance to demo the software in front of the Quantisys senior leadership team, and they absolutely fell in love with it.

But like all dream deals, there’s a catch. The software needs to integrate with Quantisys’s current billing system. Jaheim knows that billing integrations are high on the list of features the development team is working on. He hopes that if he can get the integration Quantisys needs prioritized and implemented quickly, it might be enough to salvage the deal.

8.2 The layers of a deployment

8.3 Making deployments routine affairs

8.3.1 Accurate preproduction environments

8.3.2 Staging will never be exactly like production

8.4 Frequency reduces fear

8.5 Reducing fear by reducing risk

8.6 Handling failure in the layers of the deployment process

8.6.1 Feature flags

8.6.2 When to toggle off your feature flag

8.6.3 Fleet rollbacks

8.6.4 Deployment artifact rollbacks

8.6.5 Database-level rollbacks

8.7 Creating deployment artifacts

8.7.1 Leveraging package management

8.7.2 Configuration files in packages