-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Issue Inquiry: Intention to Integrate gitea-actions-runner and github-act-runner as Service #1
Comments
I'm open to add this to both projects. Yes it would be great if some platforms have integrated service support. Till today I only self-hosted the linux binaries via a custom systemd script / ran from cli.
I didn't look that much into golang native services support. As far as I know only windows has special reqirements for binaries to run as service. In case "github.com/kardianos/service" would break building some binary platforms I would prefer to put it into a conditionally compiled file, liky the survey integration. |
Yes, it supports multiple platforms, including windows, linux, and macos. Windows can start a native windows service through https://github.com/kardianos/service/blob/master/example/simple/main.go#L47. Using |
"github.com/kardianos/service" framework does not break its build. I would prefer to integrate into the gitea-actions-runner and github-act-runner projects |
We will see, github-act-runner compiles for a os like plan9 not all go packages compile for unusual go targets. Most notable the docker go package in 2021. Obviously this can be enabled for windows/linux/macOS and would compile to them |
Great, you could try adding support for the "github.com/kardianos/service" framework to gitea-actions-runner for windows/linux/macOS? As for github-act-runner, can you create a branch to indicate that service install only supports windows/linux/macOS? The advantage of the "github.com/kardianos/service" framework is that it can be installed and uninstalled at any time. gitea-actions-runner adds this feature, which means that deployment on multiple machines does not require additional writing of cumbersome systemd scripts. |
See I need to look later into a graceful stop / handling service failure..
We need to think about service description, name etc. e.g. allow to customize it.
|
Thank you very much for your patch, but I seem to have encountered some problems. I will provide you with a detailed report later. I will help you conduct all-round testing on windows, linux, and macos M2 |
The commands svc install, svc start, svc stop, and svc uninstall under Linux and Windows are working well based on my current testing. If there are any issues later, I will notify you promptly. However, there seem to be some problems under macOS. BUG Reproduction on macOS:
At this point, act_runner attempts to install the gitea-actions-runner.plist file in the At the same time, in the file
And in the file
After executing the start command:
The content of
|
I also tried executing it directly through the command, but it seems to still have the same error.
Then I added sudo to execute, and the result was ok
|
I made the extra logfile optional and no longer stop failing open it. Seems like macOS has it's own log file, windows has no traditional log files. This sounds like your service user / normal user has no permission to write to that file, did you ever ran the svc as root and later as regular user? |
|
In summary, although the service is installed through |
By the way, for example:
I will open another issue later to describe the problem. |
based on your psaux is pwsh also run as root, which don't have a Runner.Worker process? grep is running as your user |
No, if I pass the command |
If I simply run the command |
Please pull my last change to the pr and rebuilt the binary. This is no longer a fatal error |
|
So it cannot read Can you try a different more permissive folder for the service? What are the owner / permissions of the |
Based on cebafc3, add the following code to run in UserService mode and successfully solve the problem.
ok fix
Note: Be sure to add Refer to https://github.com/gitlabhq/gitlab-runner/blob/main/commands/service_darwin.go#L12C1-L16C3 in gitlab-runner |
Problem Description:
I am currently in the process of self-hosted deployment and opt not to use Docker. Instead, I intend to deploy gitea-actions-runner and github-act-runner directly. However, I've encountered difficulties when attempting to run these two tools as service services, particularly on Windows systems, where an error code 1503 is thrown.
I noticed that a user has submitted a pull request for the official act_runner and has added support for running it as a service on Windows, Linux, and macOS. It appears that they utilized the "github.com/kardianos/service" framework for wrapping act_runner into a service.
Supplementary Information:
I also observed that gitlab-runner follows a similar approach by adopting the "github.com/kardianos/service" framework for encapsulation. This transformation enables gitlab-runner to function as a genuine service. The relevant code can be found at commands/multi.go and commands/service.go.
My Questions:
@ChristopherHX, are you interested in adding gitea-actions-runner and github-act-runner as service services? Have you considered adopting a similar approach, using the "github.com/kardianos/service" framework or other similar solutions, to simplify the deployment and runtime processes across different platforms? Thank you for your response.
The text was updated successfully, but these errors were encountered: