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

Automated provisioning of Actions runners #24750

Closed
garymoon opened this issue May 16, 2023 · 6 comments
Closed

Automated provisioning of Actions runners #24750

garymoon opened this issue May 16, 2023 · 6 comments
Labels
topic/gitea-actions related to the actions of Gitea type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@garymoon
Copy link
Contributor

Feature Description

Currently Actions runner tokens are retrieved from the web UI and are one-time use. This makes it difficult to provision runners in an automated fashion for CI and such.

Woodpecker and Drone accept a symmetic secret via environment variables for both the application and the runners, making automated provisioning zero-touch. Could such a flow be considered for Gitea please?

P.S. Since it's Gitea issuing and validating the tokens it seemed more appropriate to open this issue here, but I'm happy to move or open a companion issue on act_runner instead 👍

Screenshots

No response

@garymoon garymoon added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels May 16, 2023
@delvh
Copy link
Member

delvh commented May 16, 2023

Isn't that already implemented by #23762?
An alternative to it would be offering an API route that would need to ensure that the caller is an admin for the respective scope.

@garymoon
Copy link
Contributor Author

#23762 goes some way to making automation easier, but would still require executing the CLI in an automated fashion, extracting the token from the output, and applying it to the runner config, repeated for each runner. This would be particularly messy in an integration test.

Since runner tokens are just fixed-length random strings, would it be acceptable to have admin-supplied tokens/scopes retrieved from the ini with the ability to be reused?

@techknowlogick
Copy link
Member

perhaps me completing this PR #23761 would be helpful

@garymoon
Copy link
Contributor Author

#23761 still suffers similar shortcomings in this context. We would need to provision an admin user, create an API token, and hit the API with that token for each runner.

Perhaps fixtures are the answer, but that still leaves the issue of the tokens being one-time use, and would not alleviate the complexity of dynamically scaling runners outside of a test environment.

@wolfogre wolfogre added the topic/gitea-actions related to the actions of Gitea label May 17, 2023
@benyanke
Copy link
Contributor

Duplicate of #23703

@garymoon
Copy link
Contributor Author

So it is, bugger it. Thanks @benyanke 💙

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/gitea-actions related to the actions of Gitea type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants