Skip to content

Add support for ARM64 runners - #102

Merged
npalm merged 7 commits into
github-aws-runners:developfrom
bdruth:feature/add_arm64_support
Aug 6, 2020
Merged

npalm merged 7 commits into
github-aws-runners:developfrom
bdruth:feature/add_arm64_support

Conversation

@bdruth

@bdruth bdruth commented Jul 28, 2020 •

Copy link
Copy Markdown
Contributor

Issue Endorsed by Maintainers

See https://github.com/philips-labs/terraform-aws-github-runner/issues/101

Description of the Change

Basically tracked down where architecture relevant things were hard-coded and introduced variables to manage them. Two main things: the AMI and the actions-runner download from GitHub that's sync'd to the S3 bucket.

Alternate Designs

?

Possible Drawbacks

Everything defaults to the existing behavior and only changes if it detects a Graviton/Graviton2 instance-type. Probably introduced some maintenance as new instance types are released to correctly detect them as ARM64.

Verification Process

  • Destroyed/created the example/default stack with a recent Graviton2 instance type (c6g.large).
  • Ran tests for the syncer
  • Verified successful runner creation & association to GitHub repo.

Release Notes

  • The module now supports ARM64 self-hosted runners on AWS Graviton/Graviton2 instance types (a1/6g)

Checklist:

  • Basic POC/functionality working
  • Determine if conditional for instance-type should be moved to submodule
  • Write test for syncer
  • Update README/documentation for auto-detect logic and AZ constraints
  • All repo checks are passing

Closes #101

@npalm

npalm commented Jul 28, 2020

Copy link
Copy Markdown
Member

@bdruth nice work!, we will do our best to check the PR later this week.

@compiaffe

Copy link
Copy Markdown

@bdruth Thank you for this MR, just what we needed :)

From what I understand this will not handle deciding whether to spin up a x86 machine or a arm64 machine based on the tags/labels of the run, correct?

@npalm

npalm commented Jul 29, 2020

Copy link
Copy Markdown
Member

@bdruth Thank you for this MR, just what we needed :)

From what I understand this will not handle deciding whether to spin up a x86 machine or a arm64 machine based on the tags/labels of the run, correct?

Spinning up based on the labels in the workflow requires that we extend the lambda scale up function to retrieve and parse the workflow. GitHub does not support any simple API to retrieve the information, and is not part of the event.

@bdruth

bdruth commented Jul 29, 2020

Copy link
Copy Markdown
Contributor Author

@compiaffe what @npalm said :-) there's nothing stopping anyone from having multiple stacks of runners added to a repo, though? It might be inefficient as check_run will launch runners from multiple stacks, but the labels will then sort out which gets used and the next culling will kill off the inactive ones, I think? I haven't tried this, just thinking through it.

@npalm

npalm commented Jul 30, 2020

Copy link
Copy Markdown
Member

I fully agree, launching on any check_run was our first approach. There seems no other good alternative. But I think we should find a way to create runners a bit more sophisticated. It seems that every job leads to a check_run, but not completely sure. And eacht workflow seems related to a check_suite.

@npalm
npalm self-requested a review July 30, 2020 09:47

@npalm npalm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, we really like the feature added. We only have one change request for the ICU patch.

Comment thread modules/runners/templates/user-data.sh Resolved
@npalm

npalm commented Jul 31, 2020

Copy link
Copy Markdown
Member

Verified deployments for both with and without ARM, all works

@npalm npalm left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late notice, please can you use the pre-commit hooks. Yest it missing in the contribution guide / docs (is an issue ;) ) The pre-commit hooks will format your terraform code (reason why the build is failing https://github.com/philips-labs/terraform-aws-github-runner/pull/102/checks?check_run_id=933015675). And it will updte the readme with the terraform variables

@bdruth

bdruth commented Aug 3, 2020

Copy link
Copy Markdown
Contributor Author

Sorry for the late notice, please can you use the pre-commit hooks. Yest it missing in the contribution guide / docs (is an issue ;) ) The pre-commit hooks will format your terraform code (reason why the build is failing https://github.com/philips-labs/terraform-aws-github-runner/pull/102/checks?check_run_id=933015675). And it will updte the readme with the terraform variables

Crap - sorry I missed this. I caught the formatting errors last time, will get this fixed. Mea culpa.

@bdruth

bdruth commented Aug 3, 2020

Copy link
Copy Markdown
Contributor Author

OK @npalm - I ran the pre-commit hook and everything looks good now. It made some changes in the README files, too? Not sure what to make of that, though? It wasn't even in files that I edited, mostly, and in the one README I edited, not in the area that I edited.

@npalm
npalm merged commit 9c571e5 into github-aws-runners:develop Aug 6, 2020
@npalm

npalm commented Aug 6, 2020

Copy link
Copy Markdown
Member

@bdruth thanks for your contribution, changed is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for ARM64 runners using AWS Graviton/Graviton2 instance-types.

3 participants