Notes on Building and Deploying Software

Builds and Deploys

Ideally a build and deploy should be a single step, included within the check out of the repository. Additionally the build should include and install pre-requisites if missing. You can safely assume the target OS is at least configured, but any missing packages should be installed as needed.

The core steps regardless of platform or technology follow a common pattern. A number of these steps can be performed asynchronously. For example, it is possible to run a suite of tests in parallel, rather than individually. This can save massive amounts of time. As a first approach perform all steps synchronously, only adjusting once stable.

This whole process should be executed regardless of environment. A local developer machine only differs to production in terms of topology. If you cannot execute the exact same process that you are performing upon commit, you can never be sure the commit will work. CI tooling should act as nothing more than an aggregation of stats and artefacts that are generated by invoking the build/deploy script.

Components

A working software application can be decomposed into four components.

If any of these change, trigger the feedback process as they can all change the behaviour of the application.

Automation

Speed is Key

Build and Deploy Etiquette

Infrastructure

Data