A Maturity Model for Build Automation
Join the DZone community and get the full member experience.Join For Free
how does your engineering organization build and deliver products to its customers? similar to the well-known capability maturity model , the maturity level of a build automation system falls into one of the following: chaotic, repeatable, defined, managed, or optimized.
let’s take a look at the differences in these levels for a popular project, phantomjs . at the start of the project, it was tricky to build phantomjs unless you were a seasoned c++ developer. but over time, more things were automated, and eventually engineers without c++ backgrounds could run the build as well. at some point, a vagrant-based setup was introduced and building deployable binaries became trivial. the virtualized build workflow is both predictable and consistent.
the first level, chaotic , is familiar to all new hires in a growing organization. you arrive in the new office and on that first day, an it guy hands you a laptop. now it is up to you to figure out all the necessary bits and pieces to start becoming productive. commonly it takes several days to set up your environment – that’s several days before you can get any work done. of course, it is still a disaster if the build process itself can be initiated in one step .
this process is painful and eventually someone will step up and write documentation on how to do it. sometimes it is a grassroots, organic activity in the best interest of all. effectively, this makes the process much more repeatable ; the chance of going down the wrong path is reduced.
just like any other type of document, build setup documentation can be out of sync without people realizing it. a new module may be added last week, which suddenly implies a new dependency. an important configuration file has changed and therefore simply following the outdated wiki leads to a mysterious failure.
to overcome this problem, consistency must be mandated by a
process. in many cases, this is as simple as a standardized bootstrap script which resolves and pulls the dependency automatically (
, etc). any differences in the initial environment are normalized by that script. you do not need to remember all the yum-based setup when running centos and recall the apt-get counterparts when handling an ubuntu box. at this level, product delivery via continuous deployment and integration becomes possible. no human interaction is necessary to prepare the build machine to start producing the artifacts.
in this wonderful and heterogenous environment it is unfortunately challenging to track delivery consistency. upgrading the os can trigger a completely different build. a test which fails on a rhel-based is not reproducible on the engineer’s macbook. we are lucky that virtualization (virtualbox) or containment (docker) can be leveraged to ensure a managed build environment. there is no need to install, provision, and babysit a virtualized build machine (even on windows, thanks to powershell and especially chocolatey). anyone in the world can get a brand-new computer running a fresh operating system, get the bootstrap script, and start kicking the build right away.
there are two more benefits of this managed automation level. firstly , a multi-platform application is easier to build since the process of creating and provisioning the virtual machine happens automatically. secondly , it enables every engineer to check the testing/staging environment in isolation, i.e. without changing their own development setup. point of fact, tools like vagrant are quickly becoming popular because they give engineers and devops such power.
the last level is the continuous optimizing state. as the name implies, this step refers to ongoing workflow refinements. for example, this could involve speeding up the overall build process which is pretty important in a large software project. other types of polishes concern the environment itself, whether creating the virtual machine from the .iso image (packer) or distributing the build jobs to a cloud-based array of ec2/gce boxes.
my experience with automated build refinement may be described like this:
- chaotic: hunt the build dependencies by hand
- repeatable: follow the step-by-step instructions from a wiki page
- defined: have the environment differences normalized by a bootstrapping script
- managed: use vagrant to create and provision a consistent virtualized environment
- optimizing: let packer prepare the vm from scratch
how is your personal experience through these different maturity levels?
note : special thanks to ann robson for reviewing and proofreading the draft of this blog post.
Published at DZone with permission of Ariya Hidayat, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.