-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkflows.tf
More file actions
executable file
·157 lines (144 loc) · 5.59 KB
/
workflows.tf
File metadata and controls
executable file
·157 lines (144 loc) · 5.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
locals {
customer_id = "writechoice"
}
module "aspect_workflows" {
customer_id = local.customer_id
providers = {
aws = aws.workflows
}
source = "https://static.aspect.build/aspect/5.15.11/terraform-aws-aspect-workflows.zip"
aspect_artifacts_bucket = "aw-artifacts-${local.region}"
vpc_id = module.vpc.vpc_id
vpc_subnets = module.vpc.private_subnets
vpc_subnets_public = module.vpc.public_subnets
enable_function_reserved_concurrency = false # requires a quota bump on new deployments
support = {
alert_aspect = true
enable_ssm_access = true
support_role_name = aws_iam_role.support.name
operator_role_name = aws_iam_role.operator.name
}
# WORKFLOWS_TEMPLATE: Export traces to Honeycomb
# telemetry = {
# destinations = {
# honeycomb = {
# dataset = "workflows"
# team_secret = aws_secretsmanager_secret.honeycomb_api_key
# }
# }
# }
remote = {
frontend = {
min_scaling = 1
max_scaling = 20
}
debug_tools = true
# WORKFLOWS_TEMPLATE: Customize your remote cache size.
# Ask Aspect about right sizing the remote cache size & throughput for your build.
storage = {
# 2 shards with 937GiB SSDs each = 1.874TiB cache size
num_shards = 2
instance_type = "im4gn.large"
# In 5.15, the use_capacity_provider default will flip to true. In 5.16, we will drop
# support for capacity provides for AWS storage nodes.
use_capacity_provider = false
# WORKFLOWS_TEMPLATE: Enable mirroring to duplicate each shard. This makes the cache
# more resiliant to data but also doubles the compute costs for the cache.
# mirror = true
}
# WORKFLOWS_TEMPLATE: Uncomment the `remote_execution` block to enable remote execution.
# Ask Aspect about right sizing the remote execution cluster to your workloads.
# remote_execution = {
# executors = {
# default = {
# platform = "Linux"
# image = "ghcr.io/catthehacker/ubuntu:act-22.04@sha256:5f9c35c25db1d51a8ddaae5c0ba8d3c163c5e9a4a6cc97acd409ac7eae239448"
# workers = [
# {
# scaling = {
# minimum = 0
# maximum = 10
# fast = {}
# }
# ec2 = {
# instance_type = "m6id.xlarge"
# }
# }
# ]
# }
# }
# }
}
delivery_enabled = true
warming_sets = {
default = {}
}
# WORKFLOWS_TEMPLATE: You can add tags to the resources created by aspect workflows
# for the purposes of tracking / cost analysis.
# Note that workflows adds the following tag to all resources by default
# "created-by": "aspect-workflows"
# tags = {
# "some-tag-key": "some-tag-value"
# }
resource_types = {
# WORKFLOWS_TEMPLATE: `small` runner type is recommended for the Setup Aspect Workflows steps on Buildkite
# and GitHub Actions. You can remove this runner type if not using Buildkite or GitHub Actions for your CI.
small = {
instance_types = ["t3a.small"]
image_id = data.aws_ami.runner_image.id
# WORKFLOWS_TEMPLATE: You can add tags to the resources from a specific resource type.
# Note that workflows adds the following tag to all resources by default
# "created-by": "aspect-workflows"
# tags = {
# "some-resource-tag-key": "some-resource-tag-value"
# }
}
default = {
instance_types = ["m6id.xlarge"]
image_id = data.aws_ami.runner_image.id
}
}
# WORKFLOWS_TEMPLATE:
hosts = ["gl",]
# GitLab runner groups
gl_runner_groups = {
# The `default` runner group is used for general bazel tasks such as build & test.
default = {
agent_idle_timeout_min = 120
max_runners = 50
min_runners = 0
project_id = "75349277" # Project ID of the GitLab repository under test
queue = "aspect-default"
resource_type = "default"
scaling_polling_frequency = 2 # check for new jobs every 30s
warming = true
}
# The `small` runner group is used for the Setup Aspect Workflows pipeline step.
# These are intentionally small, inexpensive, long-lived instances that are not
# meant for running bazel tasks.
small = {
agent_idle_timeout_min = 720
max_runners = 4
min_runners = 0
project_id = "75349277" # Project ID of the GitLab repository under test
queue = "aspect-small"
resource_type = "small"
scaling_polling_frequency = 2 # check for new jobs every 30s
warming = false # no need to warm this runner since it doesn't run bazel
}
# The `warming` running group is used for the warming job to create warming
# archives used by other runner groups to pre-warm external repositories
# during bootstrap in order to speed up their first jobs.
warming = {
agent_idle_timeout_min = 1
max_runners = 1
min_runners = 0
project_id = "75349277" # Project ID of the GitLab repository under test
policies = { warming_manage : module.aspect_workflows.warming_management_policies["default"].arn }
queue = "aspect-warming"
resource_type = "default"
warming = false # do not warm runners used to generate warming archives
}
}
// Insert additional runner groups here as needed
}