Atomic Deployments with uDeploy

Many teams are attracted to uDeploy by its notion of deploying full applications – multiple tiers, services, and components go out together. But what do you do when there is a partial failure? Most groups send alerts and let the team respond to issues on a case by case basis.

Others aggressively want to maintain their Snapshot. If one piece fails to deploy correctly, they roll everything else back. Exactly how to do that might not be obvious. Here’s the trick. Have each component deploy be set to launch rollback processes for the whole stack. Something like this:

uDeploy process design showing rollback flow.

When adding the rollback steps, choose the “Replace with last desired” option for the rollback type. This will look up the previous deployment and move to that version as appropriate for full and incremental deployments. In the image above, if the failure was in the DB deploy, the App and DB would be rolled back and the Web would be left alone as it wasn’t modified by the deployment.

If you have parallelism in the rollback or deploy process, ensuring that a rollback of a component isn’t initiated while its deployment is still going can be another gotcha. To manage that, have the first activity of both deployment and rollback component processes aquire a lock named for the component and resource. That will serialize requests to modify the component on a given target. The lock could be named something like: ${p:component.name}-${p:resource.name}

Try these atomic commits out and let us know how it works.

Introducing the Bob the Builder Anti-Pattern

If you need a build of some sort, does protocol require you to ask someone to run it? Do you have to wait until the build team Bob is back from lunch in order to perform a build? Do you have to wait for one of a few people who actually know how to do a QA deployment in order to deploy to QA? If so, then you already know Bob the Builder.

We see Bob regularly: he is supported by institutional procedures, and in some cases Bob the Builder just makes sense: Putting the build or deployment in Bob’s hands ensures the build occurs when and how it should. And for deployments to production environments, these restrictions are often necessary. Even so, the knowledge of how to do the deployment should not reside in just Bob the Builder’s head: if he wins the lottery, the rest of the team can be in big trouble. Continue reading