Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use ARM instances for small runner group #213

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .aspect/workflows/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# See https://docs.aspect.build/v/workflows/config
---
queue: aspect-small
queue: aspect-small-arm64
tasks:
- format:
queue: aspect-small-amd64
- buildifier:
- gazelle:
- test:
Expand Down
165 changes: 82 additions & 83 deletions .aspect/workflows/terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .aspect/workflows/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws",
version = "~> 4.58.0"
version = "~> 5.30.0"
}
}
}
Expand Down
44 changes: 36 additions & 8 deletions .aspect/workflows/terraform/workflows.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ provider "aws" {
}
}

data "aws_ami" "runner_ami" {
data "aws_ami" "runner_amd64_ami" {
# Aspect's AWS account 213396452403 provides public Aspect Workflows images for getting started
# during the trial period. We recommend that all Workflows users build their own AMIs and keep
# up-to date with patches. See https://docs.aspect.build/v/workflows/install/packer for more info
Expand All @@ -24,6 +24,20 @@ data "aws_ami" "runner_ami" {
}
}

data "aws_ami" "runner_arm64_ami" {
# Aspect's AWS account 213396452403 provides public Aspect Workflows images for getting started
# during the trial period. We recommend that all Workflows users build their own AMIs 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 AMIs for Workflows.
owners = ["213396452403"]
most_recent = true
filter {
name = "name"
values = ["aspect-workflows-al2023-gcc-arm64-*"]
}
}

module "aspect_workflows" {
providers = {
aws = aws.workflows
Expand Down Expand Up @@ -73,14 +87,19 @@ module "aspect_workflows" {
# Aspect Workflows requires instance types that have nvme drives. See
# https://aws.amazon.com/ec2/instance-types/ for full list of instance types available on AWS.
instance_types = ["c5ad.xlarge"]
image_id = data.aws_ami.runner_ami.id
image_id = data.aws_ami.runner_amd64_ami.id
}
"small" = {
"small-amd64" = {
# Aspect Workflows requires instance types that have nvme drives. See
# https://aws.amazon.com/ec2/instance-types/ for full list of instance types available on AWS.
# TODO: switch to Graviton processor when 5.9.0-beta.3 or rc.0 is out
instance_types = ["c5ad.large"]
image_id = data.aws_ami.runner_ami.id
image_id = data.aws_ami.runner_amd64_ami.id
}
"small-arm64" = {
# Aspect Workflows requires instance types that have nvme drives. See
# https://aws.amazon.com/ec2/instance-types/ for full list of instance types available on AWS.
instance_types = ["m6gd.medium"]
image_id = data.aws_ami.runner_arm64_ami.id
}
}

Expand All @@ -96,12 +115,21 @@ module "aspect_workflows" {
scaling_polling_frequency = 3 # check for queued jobs every 20s
warming = true
}
small = {
small-amd64 = {
agent_idle_timeout_min = 1
max_runners = 5
min_runners = 0
queue = "aspect-small-amd64"
resource_type = "small-amd64"
scaling_polling_frequency = 3 # check for queued jobs every 20s
warming = false # don't warm for faster bootstrap; these runners won't be running large builds
}
small-arm64 = {
agent_idle_timeout_min = 1
max_runners = 5
min_runners = 0
queue = "aspect-small"
resource_type = "small"
queue = "aspect-small-arm64"
resource_type = "small-arm64"
scaling_polling_frequency = 3 # check for queued jobs every 20s
warming = false # don't warm for faster bootstrap; these runners won't be running large builds
}
Expand Down