Skip to content

Commit 3762085

Browse files
authored
chore: switch to smaller 'small' instances without nvme drives (#1413)
1 parent c21bbcd commit 3762085

1 file changed

Lines changed: 37 additions & 12 deletions

File tree

.aspect/workflows/terraform/workflows.tf

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,38 @@ module "aspect_workflows" {
4848
default = {}
4949
}
5050

51-
# Resource types for use by runner groups
51+
# Resource types for use by runner groups. Aspect recommends machines types that have SSD drives
52+
# for large Bazel workflows. See
53+
# https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison for list of
54+
# machine types availble on GCP.
5255
resource_types = {
5356
default = {
54-
# Aspect Workflows requires machine types that have local SSD drives. See
55-
# https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison for full list
56-
# of machine types availble on GCP.
57-
machine_type = "n1-standard-4"
58-
image_id = data.google_compute_image.runner_image.id
57+
machine_type = "n1-standard-4"
58+
image_id = data.google_compute_image.runner_image.id
59+
# While preemtible instances are possible to provision and we use them here on this open source
60+
# repository as a demonstration of how to reduce compute costs, they are not recommended for
61+
# repositories where the occasional CI failures due to a machine being preemted mid-job are not
62+
# acceptable.
5963
use_preemptible = true
6064
}
6165
small = {
62-
# Aspect Workflows requires machine types that have local SSD drives. See
63-
# https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison for full list
64-
# of machine types availble on GCP.
65-
machine_type = "n1-standard-1"
66-
image_id = data.google_compute_image.runner_image.id
66+
machine_type = "e2-small"
67+
num_ssds = 0
68+
image_id = data.google_compute_image.runner_image.id
69+
# While preemtible instances are possible to provision and we use them here on this open source
70+
# repository as a demonstration of how to reduce compute costs, they are not recommended for
71+
# repositories where the occasional CI failures due to a machine being preemted mid-job are not
72+
# acceptable.
73+
use_preemptible = true
74+
}
75+
micro = {
76+
machine_type = "e2-micro"
77+
num_ssds = 0
78+
image_id = data.google_compute_image.runner_image.id
79+
# While preemtible instances are possible to provision and we use them here on this open source
80+
# repository as a demonstration of how to reduce compute costs, they are not recommended for
81+
# repositories where the occasional CI failures due to a machine being preemted mid-job are not
82+
# acceptable.
6783
use_preemptible = true
6884
}
6985
}
@@ -81,14 +97,23 @@ module "aspect_workflows" {
8197
warming = true
8298
}
8399
small = {
84-
agent_idle_timeout_min = 1
100+
agent_idle_timeout_min = 10
85101
max_runners = 10
86102
min_runners = 0
87103
queue = "aspect-small"
88104
resource_type = "small"
89105
scaling_polling_frequency = 3 # check for queued jobs every 20s
90106
warming = false # don't warm for faster bootstrap; these runners won't be running large builds
91107
}
108+
micro = {
109+
agent_idle_timeout_min = 60 * 12
110+
max_runners = 10
111+
min_runners = 0
112+
queue = "aspect-micro"
113+
resource_type = "micro"
114+
scaling_polling_frequency = 3 # check for queued jobs every 20s
115+
warming = false # don't warm for faster bootstrap; these runners won't be running large builds
116+
}
92117
# The warming runner group is used for the periodic warming job that creates
93118
# warming archives for use by other runner groups.
94119
warming = {

0 commit comments

Comments
 (0)