Railway fork. Everything Railway-specific lives under
railway/: the packer layer that builds our agent image on top of Buildkite's published one, plus its own README. The rest of this tree, includingpacker/linux/andtemplates/, is upstream's and builds their image, so a change there never reaches our pools. Put pool changes underrailway/and send everything else upstream.
mainis upstreammainplusrailway/plus five small patches to upstream files, which are what an upstream sync has to carry forward:
buildkite_spawn: agents per instance, fromvariables.tfthroughmodules/compute/{main,variables}.tfinto thebuildkite-spawnmetadata,templates/scripts/bootstrap-buildkite-agent, andtemplates/config/buildkite-agent.cfg.template(name=...-%spawn,spawn=).health_check_type/health_check_request_path: http autohealing checks (variables.tf,modules/compute/{main,variables}.tf).root_disk_typevalidation accepts hyperdisk (modules/compute/variables.tf).zonesvalidation tolerates an unknown value at plan time (variables.tf).- Metrics function audience uses the function's own URI (
modules/buildkite-agent-metrics/main.tf).Sync with
git merge upstream/mainon a branch and merge that PR with a merge commit, so upstream stays an ancestor ofmain;git diff <upstream base> main -- . ':!railway'shows exactly the patch set above and nothing else.
Terraform modules for running autoscaling Buildkite agents on Google Cloud Platform.
Full documentation is available at https://buildkite.com/docs/agent/v3/gcp/elastic-ci-stack/elastic-ci-stack.
Repository documentation:
- Agent scaling and instance updates — describes job-safe scale-in, idle-agent removal, and opportunistic template rollout
- GCP image release pipeline
The module ships with a set of default values which can be overridden as needed, but should be sufficient for most use cases.
module "elastic-ci-stack-for-gcp" {
source = "buildkite/elastic-ci-stack-for-gcp/buildkite"
version = "~> 0.4.0"
# Required
project_id = "your-gcp-project"
buildkite_organization_slug = "your-org-slug"
buildkite_agent_token = "YOUR_AGENT_TOKEN"
}MIT