actions / actions/runner

Provide an installer for running in a service account on self hosted Mac

Open
#947 11 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement papercut tooling
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Thank you 🙇‍♀ for wanting to create a feature in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.

If you have a feature request that is relevant to this repository, the runner, then please include the information below:

Describe the enhancement
Currently the Github action runner service can only be installed by an interactive user.
This goes against what one expects from a CI i.e. run as a service independently of any user logged in.

Code Snippet
Not relevant

Additional information
Whilst it may seem a good idea to have 1 user account open a session automatically at startup, and have multiple runners installed under that user account (by running the Github agent runner many times with different names and tokens), it is not practical. Software such as Maven relies on a single .settings.xml tied to the account, so 4 runners running maven in parallel would compete and potentially corrupt the maven repo. This is just one example. We need n accounts in order to have more than 1 runner per self-hosted Mac. And they need to be service accounts in order for the runner to restart automatically.

Creating a service account on a Mac is quite difficult (there is no adduser) but it's possible (see attached).
You can then su into the service account and install the standard runner (see attached).
However, you'll find that the action runner service fails to run.
There are many causes for that: missing dirs (Library/LaunchAgents...), authorizations...

What would be really great would be the following:
-when initiating creation of a self-hosted runner from the Github UI, propose selection between UI account and service account

  • if the latter, propose a downloadable script that can be run using sudo after a chmod 777
  • the script itself would receives a few parameters (service group name, user name...)
  • it would automate the creation of the service account
  • it would automate the creation of the runner, and install a service that:
    • does not rely on interactive account pre-requisites
    • restarts automatically without requiring the user to login

create-action-runner.txt
create-ci-users.txt

NOTE: if the feature request has been agreed upon then the assignee will create an ADR. See docs/adrs/README.md

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the attached create-action-runner.txt and create-ci-users.txt files, then read docs/adrs/README.md for the repository's feature-agreement process. Define the installer requirements around service-account creation, runner setup, and automatic restart without an interactive login; done means those requirements are documented and demonstrated for self-hosted macOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, macos
Domain
ci-cd, devops, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.