Repository navigation
ci: Change to use github runner set for ci runners #659
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| # ARC (Actions Runner Controller) Deployment Guide | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Kubernetes cluster (v1.28+) | ||
| - `kubectl` configured with cluster access | ||
| - `helm` v3 installed | ||
|
|
||
| ## 1. Create a GitHub App | ||
|
|
||
| 1. Go to **GitHub Organization Settings > Developer settings > GitHub Apps > New GitHub App** | ||
| 2. Set the following: | ||
| - **GitHub App name**: e.g. `smg-k8s-arc-app` | ||
| - **Homepage URL**: any valid URL | ||
| - **Webhook**: uncheck "Active" (not needed) | ||
| 3. Grant **Repository permissions**: | ||
| - **Actions**: Read and Write | ||
| - **Administration**: Read and Write | ||
| - **Checks**: Read and Write | ||
| - **Metadata**: Read-only | ||
| 4. Click **Create GitHub App** | ||
| 5. Note the **App ID** from the app's settings page | ||
| 6. Generate a **Private Key** (PEM file) and save it | ||
|
|
||
| ## 2. Install the GitHub App | ||
|
|
||
| 1. From the GitHub App settings, click **Install App** | ||
| 2. Select the organization and choose the target repository (e.g. `lightseekorg/smg`) | ||
| 3. Click **Install** | ||
| 4. Note the **Installation ID** from the URL: `https://github.com/organizations/<org>/settings/installations/<installation-id>` | ||
|
|
||
| ## 3. Create the Kubernetes Secret | ||
|
|
||
| Edit `arc-secret-template.yaml` with the values collected above: | ||
|
|
||
| ```yaml | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: github-arc-secret | ||
| namespace: actions-runner-system | ||
| type: Opaque | ||
| stringData: | ||
| github_app_id: "<your-app-id>" | ||
| github_app_installation_id: "<your-installation-id>" | ||
| github_app_private_key: "<contents-of-your-pem-file>" | ||
| ``` | ||
|
|
||
| Create the namespace and secret: | ||
|
|
||
| ```bash | ||
| kubectl create namespace actions-runner-system | ||
| kubectl apply -f scripts/k8s-runner-resources/arc-secret-template.yaml | ||
| ``` | ||
|
|
||
| ## 4. Install the ARC Controller | ||
|
|
||
| ```bash | ||
| helm install arc \ | ||
| --namespace actions-runner-system \ | ||
| oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller | ||
| ``` | ||
|
|
||
| Verify the controller is running: | ||
|
|
||
| ```bash | ||
| kubectl get pods -n actions-runner-system -l app.kubernetes.io/name=gha-runner-scale-set-controller | ||
| ``` | ||
|
|
||
| ## 5. Install Runner Scale Sets | ||
|
|
||
| Install each runner set using its values file: | ||
|
|
||
| ```bash | ||
| # CPU runners | ||
| helm install k8s-runner-cpu \ | ||
| --namespace actions-runner-system \ | ||
| -f scripts/k8s-runner-resources/runner-values-cpu.yaml \ | ||
| oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set | ||
|
|
||
| # 4x GPU H100/A10 runners | ||
| helm install k8s-runner-gpu \ | ||
| --namespace actions-runner-system \ | ||
| -f scripts/k8s-runner-resources/runner-values-4-gpu-general.yaml \ | ||
| oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set | ||
|
|
||
| # 4x GPU H100 runners | ||
| helm install 4-gpu-h100 \ | ||
| --namespace actions-runner-system \ | ||
| -f scripts/k8s-runner-resources/runner-values-4-gpu-h100.yaml \ | ||
| oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set | ||
|
|
||
| # 2x GPU H100 runners | ||
| helm install 2-gpu-h100 \ | ||
| --namespace actions-runner-system \ | ||
| -f scripts/k8s-runner-resources/runner-values-2-gpu-h100.yaml \ | ||
| oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set | ||
|
|
||
| # 1x GPU H100 runners | ||
| helm install 1-gpu-h100 \ | ||
| --namespace actions-runner-system \ | ||
| -f scripts/k8s-runner-resources/runner-values-1-gpu-h100.yaml \ | ||
| oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set | ||
| ``` | ||
|
|
||
| ## 6. Verify | ||
|
|
||
| Check that listener pods are running for each runner set: | ||
|
|
||
| ```bash | ||
| kubectl get pods -n actions-runner-system | ||
| ``` | ||
|
|
||
| Each runner set should have a listener pod in `Running` state. Runner pods will be created on-demand when workflows target the corresponding `runs-on` label (matching `runnerScaleSetName` in each values file). | ||
|
|
||
| ## Upgrading | ||
|
|
||
| To update a runner set (e.g. after changing values): | ||
|
|
||
| ```bash | ||
| helm upgrade <runner-set-name> \ | ||
| --namespace actions-runner-system \ | ||
| -f scripts/k8s-runner-resources/<runner-set-values-file>.yaml \ | ||
| oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set | ||
| ``` | ||
|
|
||
| ## Uninstalling | ||
|
|
||
| ```bash | ||
| # Remove a runner set | ||
| helm uninstall <runner-set-name> -n actions-runner-system | ||
|
|
||
| # Remove the controller (after all runner sets are removed) | ||
| helm uninstall arc -n actions-runner-system | ||
| ``` | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file path
scripts/k8s-runner-resources/arc-secret-template.yamlis relative to the repository root. This also applies to the paths used in thehelm installcommands below. It would be clearer to instruct the user to run these commands from the root of the repository to avoid 'file not found' errors. Consider adding a note at the beginning of the section, for example:Note: All commands should be run from the root of the repository.