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 #503

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
4 changes: 2 additions & 2 deletions .aspect/workflows/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
tasks:
- format:
queue: aspect-small
queue: aspect-small-amd64
- buildifier:
queue: aspect-small
queue: aspect-small-arm64
- test:
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
53 changes: 43 additions & 10 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 @@ -101,7 +120,7 @@ module "aspect_workflows" {
scaling_polling_frequency = 1 # check for queued jobs every 60s
warming = true
}
small = {
small-amd64 = {
agent_idle_timeout_min = 1
gh_repo = "aspect-build/rules_ts"
# Determine the workflow ID with:
Expand All @@ -110,10 +129,24 @@ module "aspect_workflows" {
gha_workflow_ids = ["66360195"] # Aspect Workflows
max_runners = 5
min_runners = 0
queue = "aspect-small"
resource_type = "small"
scaling_polling_frequency = 1 # check for queued jobs every 60s
warming = false
queue = "aspect-small-amd64"
resource_type = "small-amd64"
scaling_polling_frequency = 1 # check for queued jobs every 60s
warming = false # don't warm for faster bootstrap; these runners won't be running large builds
}
small-arm64 = {
agent_idle_timeout_min = 1
gh_repo = "aspect-build/rules_ts"
# Determine the workflow ID with:
# gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/aspect-build/rules_ts/actions/workflows
# https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#list-repository-workflows
gha_workflow_ids = ["66360195"] # Aspect Workflows
max_runners = 5
min_runners = 0
queue = "aspect-small-arm64"
resource_type = "small-arm64"
scaling_polling_frequency = 1 # check for queued jobs every 60s
warming = false # don't warm for faster bootstrap; these runners won't be running large builds
}
# The warming runner group is used for the periodic warming job that creates
# warming archives for use by other runner groups.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/aspect-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
name: Aspect Workflows
uses: ./.github/workflows/.aspect-workflows-reusable.yaml
with:
queue: aspect-small
queue: aspect-small-arm64
Loading