Skip to content

Add support for ARM64 runners #102

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

Merged
merged 7 commits into from
Aug 6, 2020

Conversation

bdruth
Copy link
Contributor

@bdruth bdruth commented Jul 28, 2020

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
Copy link
Member

npalm commented Jul 28, 2020

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

@compiaffe
Copy link

@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
Copy link
Member

npalm commented Jul 29, 2020

@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
Copy link
Contributor Author

bdruth commented Jul 29, 2020

@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
Copy link
Member

npalm commented Jul 30, 2020

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
Copy link
Member

@npalm npalm left a comment

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.

@npalm
Copy link
Member

npalm commented Jul 31, 2020

Verified deployments for both with and without ARM, all works

Copy link
Member

@npalm npalm left a comment

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
Copy link
Contributor Author

bdruth commented Aug 3, 2020

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
Copy link
Contributor Author

bdruth commented Aug 3, 2020

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
Copy link
Member

npalm commented Aug 6, 2020

@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