The Calvinverse organization provides a number of repositories that contain all the necessary code to create a build environment based on the idea of immutable infrastructure. In other words resources, e.g. virtual machines or containers, are created with all the required applications and tooling in place. Once a specific version of a resources is created it is never be changed, neither in the resource form or when deployed as an instance. If changes are required then a new version of the resource is created, tested and released. Once the resource is released new instances based on this resource can be deployed.

The repositories describe resources different resources which are needed to create a fully functioning build environment, for instance:

  • A build controller: This resource collects build jobs and sends them to the build executors which process the jobs.
  • A build executor: This resource processes a build job and executes the actual build.
  • An artefact repository: This resource stores artefacts that were created during a build and allows other builds or processes to consume these artefacts.

The different resources can be combined into a relatively simple or small build system which may consist of only a few machines, or they may be combined into a far more complicated environment which consists of many different services for those cases where the build workflow is more complex.

The code in the repositories will either create a Hyper-V virtual machine image or a Docker container. However a different virtualization platform is desired changes can be made to the Packer configurations relatively easy to change the type of images that are generated.

Available resources

The Calvinverse organisation contains a number of repositories with resources that can be used to create a build system. These resources fall into one of the following groups:

  • Base resources - Resources on which other resources are based. For instance there are resources that define a VM with just an operating system installed and prepared. These base VM images will then be used by other resources as their base, thereby reducing the build times for these more advanced resources because the base resource provides an up to date operating system install and all the common applications.
  • Build resources - Resources which define parts of the build infrastructure, e.g. the build controller or build executors.
  • Supporting resources - Resources which define parts of the infrastructure which support the work of the build resources, e.g. artefact servers or logging and metrics services.

In general at least some of the base and build resources are needed to build a functional build system. The other resources may be required if a larger build system needs to be created.

In order to get started creating a build system the first thing to do is to create the resources that will make up the build system. Once the resource images have been created one needs to decide on the way the resources are going to be assembled into a functioning build environment. Part of this process involves storing the global configurations for all the resources in a sensible way.