Queue Workflows for Specific Instance Types / Arch / OS #1428
Replies: 6 comments 8 replies
-
@nc-billingsj I use several i.e. I have |
Beta Was this translation helpful? Give feedback.
-
Adding the use case
|
Beta Was this translation helpful? Give feedback.
-
How to support different instance types / architectures / runner os?Option 1 - deployng the stack multiple timesDeploy the stack one time per instance / arch / os type This requires one webhook or webhook app per deployment to route events for scaling. Requires the webhook only accept jobs meant for the stack. The lambdas for scaling could use the same app in the multiple stacks. Pros:
Cons:
Option 2 - Build in via mutliple deployments of the runner stackA second option could be let the webhook distribute the evetns based on the label to a queue. Per queue connect a runner module that scales for the required instance type / arch / os. The solution cuould be relalied by a submodule that acts a root module which can read config for mutlipel type of runners. Creates a queue and runner per type. Pros:
Cons:
Option 3In this option all the logic is handled in the lambda. Based on the job labels it should look up an config and do the scaling. Pro:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
Chiming in on this discussion as I feel we have a similar use case pending regarding workflows. Question:
Having a parameter like the following would be nice:
|
Beta Was this translation helpful? Give feedback.
-
Thinking of option 1, if the webhook lambda is triggered with workflow_job event but the label provided does not match any label to runner_extra_labels, then is the event dropped by the webhook lambda? Or is it put in the SQS queue and then dropped by the scale up lambda? |
Beta Was this translation helpful? Give feedback.
-
We started on implementation, see https://github.com/philips-labs/terraform-aws-github-runner/pull/2472 |
Beta Was this translation helpful? Give feedback.
-
Hello!
I have a use case where I need to allocate certain Github Actions Workflows to specific EC2 instance types. For example, Workflow_1 needs to run on a t3.small, while Workflow_2 needs to run on a t3.large. I thought that #1019 would enable this support. I expected that I could specify
instance_types = ["t3.small", "t3.large"]
andrunner_extra_labels = "ci-runner-small,ci-runner-large
and then set Workflow_1runs-on: "ci-runner-small
and Workflow_2runs-on: "ci-runner-large"
; basically mapping a runner label to an instance type. However, that doesn't seem to work since all labels are used for each launch template. Is there a way to achieve this? Thank you in advance.Beta Was this translation helpful? Give feedback.
All reactions