The two building blocks of continuous delivery are version control and automation – and boy, do you need a lot of automation. If you’re serious about building every commit and then running a progressively tougher sequence of test and deployment steps in your delivery pipeline, you should also make sure that your version control infrastructure doesn’t start creaking under the load. That’s particularly true for Git, since cloning repositories and fetching the latest data can be intensive operations. So let’s look at supporting Git build automation.
The natural first step is to use a replicated Git repository to serve the build farm. That way the load from the build servers doesn’t impact the human users on the main repository. Git MultiSite provides the perfect solution:
New replicated peer nodes can be added at any time to serve a growing build farm.
The nodes serving the build farm can be designated as read-only for better performance and security.
Like any Git MultiSite node, a node serving a build farm is easily managed from the Git MultiSite administration console.
Sometimes your build processes can’t just use a read-only replica. They may check in modified configuration data, or simply create a tag. Do you let your main Git repository serve the build farm, or try to make the CI system use a different Git remote for write operations? After all, very few Git management solutions even offer a pass-through mirror (a mirror that forwards write activity to the master repository).
Git MultiSite’s active-active replication solves this performance challenge as well. You can use an active replicated peer node(s) to serve the build farm.
In this configuration, all read requests are purely local, and any writes are coordinated with the other Git nodes in the deployment. It’s really that seamless, since each Git MultiSite node is a fully writable peer. Git MultiSite enables the ideal configuration: build automation doesn’t put load on the Git nodes that service your developers, yet your build processes can still push data if necessary.
Finally, Git MultiSite’s flexible replication groups give you the ability to provide more peer nodes for build farms on busier projects. Less active projects are not replicated to as many nodes, saving valuable bandwidth and hardware resources.