2023-08-23 18:04:40 +00:00
|
|
|
data "google_compute_image" "runner_image" {
|
|
|
|
# Aspect's GCP aspect-workflows-images project provides public Aspect Workflows GCP images for
|
|
|
|
# getting started during the trial period. We recommend that all Workflows users build their own
|
|
|
|
# GCP images and keep up-to date with patches. See
|
|
|
|
# https://docs.aspect.build/v/workflows/install/packer for more info and/or
|
|
|
|
# https://github.com/aspect-build/workflows-images for example packer scripts and BUILD targets
|
|
|
|
# for building GCP images for Workflows.
|
|
|
|
project = "aspect-workflows-images"
|
2023-10-03 17:21:01 +00:00
|
|
|
name = "aspect-workflows-debian-11-minimal-1-5-0"
|
2023-08-23 18:04:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module "aspect_workflows" {
|
2023-09-28 00:19:33 +00:00
|
|
|
# Project & region configuration. This is optional. Alternately, you may configure a global
|
|
|
|
# provider project & region and the Workflows module will default to that.
|
|
|
|
project = local.project
|
|
|
|
region = local.region
|
|
|
|
|
2023-08-23 18:04:40 +00:00
|
|
|
# Aspect Workflows terraform module
|
2023-10-07 18:11:23 +00:00
|
|
|
source = "https://s3.us-east-2.amazonaws.com/static.aspect.build/aspect/5.8.0-rc12/workflows-gcp/terraform-gcp-aspect-workflows.zip"
|
2023-08-23 18:04:40 +00:00
|
|
|
|
|
|
|
# Network properties
|
|
|
|
network = google_compute_network.workflows_network.id
|
|
|
|
subnetwork = google_compute_subnetwork.workflows_subnet.id
|
|
|
|
|
2023-09-26 16:36:37 +00:00
|
|
|
# Number of nodes & machine type in the kubernetes cluster where the remote cache & observability
|
|
|
|
# services run.
|
2023-09-28 00:19:33 +00:00
|
|
|
k8s_cluster = {
|
|
|
|
node_count = 3
|
|
|
|
machine_type = "e2-standard-2"
|
|
|
|
}
|
2023-08-23 18:04:40 +00:00
|
|
|
|
|
|
|
# Remote cache configuration
|
|
|
|
remote = {
|
|
|
|
cache_shards = 3
|
2023-09-26 16:36:37 +00:00
|
|
|
cache_size_gb = 384
|
|
|
|
load_balancer_replicas = 2
|
2023-08-23 18:04:40 +00:00
|
|
|
replicate_cache = false
|
|
|
|
}
|
|
|
|
|
|
|
|
# CI properties
|
|
|
|
hosts = ["cci"]
|
|
|
|
|
|
|
|
# Warming set definitions
|
|
|
|
warming_sets = {
|
|
|
|
default = {}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Resource types for use by runner groups
|
|
|
|
resource_types = {
|
|
|
|
default = {
|
|
|
|
# Aspect Workflows requires machine types that have local SSD drives. See
|
|
|
|
# https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison for full list
|
|
|
|
# of machine types availble on GCP.
|
|
|
|
machine_type = "n1-standard-4"
|
|
|
|
image_id = data.google_compute_image.runner_image.id
|
|
|
|
use_preemptible = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# CircleCI runner group definitions
|
|
|
|
cci_runner_groups = {
|
|
|
|
# The default runner group is use for the main build & test workflows.
|
|
|
|
default = {
|
2023-08-31 05:27:49 +00:00
|
|
|
agent_idle_timeout_min = 1
|
|
|
|
job_max_run_time_min = 5 * 60
|
|
|
|
max_runners = 10
|
|
|
|
min_runners = 0
|
|
|
|
resource_type = "default"
|
|
|
|
scaling_polling_frequency = 3 # check for queued jobs every 20s
|
|
|
|
warming = true
|
2023-08-23 18:04:40 +00:00
|
|
|
}
|
|
|
|
# The warming runner group is used for the periodic warming job that creates
|
|
|
|
# warming archives for use by other runner groups.
|
|
|
|
warming = {
|
|
|
|
agent_idle_timeout_min = 1
|
|
|
|
job_max_run_time_min = 5 * 60
|
|
|
|
max_runners = 1
|
|
|
|
min_runners = 0
|
|
|
|
resource_type = "default"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# This varies by each customer. This one is dedicated to bazel-lib.
|
|
|
|
pagerduty_integration_key = "23a940f08d58430fc012ef9bb3fed2e0"
|
|
|
|
}
|