Skip to content

Quesiton: Runner based on label #73

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

Closed
callum-tait-pbx opened this issue Jul 14, 2020 · 5 comments
Closed

Quesiton: Runner based on label #73

callum-tait-pbx opened this issue Jul 14, 2020 · 5 comments
Labels
question Further information is requested

Comments

@callum-tait-pbx
Copy link

callum-tait-pbx commented Jul 14, 2020

Hello Again!

I've got a question, how do you support spinning up different images depending on the label? My dream solution is runners are span up as required with them avaliable at the organisation level. The runner that is span up is based on the label provided, so if it's a node-12 label for instance then a node 12 instance is span up based on a node 12 launch template. How does the setup support multiple labels?

Cheers

@callum-tait-pbx callum-tait-pbx changed the title Quesiton: Labels Quesiton: Runner based on label Jul 14, 2020
@npalm npalm added the question Further information is requested label Jul 15, 2020
@npalm
Copy link
Member

npalm commented Jul 20, 2020

@callum-tait-pbx We spin up instances based on events we get from GitHub. In other words spinning up instances is 1 to 1 connected to the connected GitHub app. The event sent by github does not contain info about the label. The only label support there is, is having multiple deployments with multiple apps, and a hard connection from repo to runner (label). Any suggestion to make it more flexible is welcome!

@lrytz
Copy link
Contributor

lrytz commented Dec 4, 2020

This would also allow testing on multiple OSs (https://github.com/philips-labs/terraform-aws-github-runner/issues/347). But as you say, the GitHub API for workflows / jobs doesn't seem to expose any information about the runs-on labels of the job.

Might be worth reaching out to GitHub support, @npalm what do you think?

@sjagoe
Copy link
Contributor

sjagoe commented Nov 10, 2021

I've just noticed that labels are now in the workflow-jobs payload!

https://docs.github.com/en/rest/reference/actions#workflow-jobs

@npalm
Copy link
Member

npalm commented Dec 2, 2021

We support the workflowjob event, and have a filter for checking on labels build in. Which can be enabled or disabled. We do not support the option to spin up different instances based on label.

For creating instances we use the launch template, to give an option for fallback in case of a spot instance is not available you can specify multiple instances types. Which leads to multiple launch instances. It seems that the way we use the launch template can be done in a better way, as suggested in #1400 . Solving this issue will remove the compleity of the launch templates we have today. And once solved supporting multiple runners tags in combination with ephemeral runners #1374 should be an option

@ScottGuymer
Copy link
Contributor

This is something that is on the roadmap and discussed further here https://github.com/philips-labs/terraform-aws-github-runner/discussions/1428

Closing this in favour of the discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants