You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using these Terraform modules you can quickly deploy Self Hosted Github Runners for jobs in your GitHub Actions workflows
6
-
7
-
## [Self Hosted Runners on GKE](modules/gh-runner-gke/README.md)
8
-
9
-
The `gh-runner-gke` module provisions the resources required to deploy Self Hosted Runners on GCP infrastructure using GKE.
10
-
11
-
This includes
12
-
13
-
- Enabling necessary APIs
14
-
- VPC
15
-
- GKE Cluster
16
-
- Kubernetes Secret
17
-
18
-
Below are some examples:
4
+
## Description
5
+
Using these Terraform modules you can quickly deploy self-hosted GitHub Runners for jobs in your GitHub Actions workflows
19
6
20
-
### [Self Hosted runners on GKE that support Docker Workflows](examples/gh-runner-gke-dind/README.md)
7
+
##Modules
21
8
22
-
This example shows how to deploy Self Hosted Runners on GKE that supports Docker Workflows.
9
+
### [Self Hosted Runners on GKE](modules/gh-runner-gke/)
10
+
The `gh-runner-gke` module provisions the resources required to deploy Self Hosted Runners on GCP infrastructure using GKE. This module follows the guidance for using [Actions Runner Controller](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller#installing-actions-runner-controller) provided by GitHub
23
11
24
-
### [Simple Self Hosted Runners on GKE](examples/gh-runner-gke-simple/README.md)
25
-
26
-
This example shows how to deploy a simple GKE Self Hosted Runner.
12
+
Examples:
13
+
-[Simple Self Hosted Runners on GKE](examples/gh-runner-gke-simple/)
14
+
-[Self Hosted runners on GKE that support Docker Workflows](examples/gh-runner-gke-dind/)
15
+
-[Self Hosted runners on GKE that support Docker Workflows in rootless configuration](examples/gh-runner-gke-dind-rootless/)
27
16
28
17
More examples of [Self Hosted Runners on GKE/Anthos](https://github.com/github-developer/self-hosted-runners-anthos).
29
18
30
-
## [Self Hosted Runners on Managed Instance Groups using VMs](modules/gh-runner-mig-vm/README.md)
31
19
20
+
### [Self Hosted Runners on Managed Instance Groups using VMs](modules/gh-runner-mig-vm/)
32
21
The `gh-runner-mig-vm` module provisions the resources required to deploy Self Hosted Runners on GCP infrastructure using Managed Instance Groups.
33
22
34
-
This includes
35
-
36
-
- Enabling necessary APIs
37
-
- VPC
38
-
- NAT & Cloud Router
39
-
- Service Account for MIG
40
-
- MIG Instance Template
41
-
- MIG Instance Manager
42
-
- FW Rules
43
-
- Secret Manager Secret
44
-
45
-
Deployment of Managed Instance Groups requires a [Google VM image](https://cloud.google.com/compute/docs/images) with a startup script that downloads and configures the Runner or a pre-baked image with the runner installed.
46
-
47
-
Below are some examples:
48
-
49
-
### [Simple Self Hosted Runner on MIG VMs](examples/gh-runner-mig-native-simple/README.md)
50
-
51
-
This example shows how to deploy a MIG Self Hosted Runner with startup scripts.
52
-
53
-
### [Self Hosted Runner on MIG VMs from Packer Image](examples/gh-runner-mig-native-packer/README.md)
54
-
55
-
This example shows how to deploy a MIG Self Hosted Runner with an image pre-baked using Packer.
56
-
57
-
## [Self Hosted Runners on Managed Instance Groups using Container VMs](modules/gh-runner-mig-container-vm/README.md)
23
+
Examples:
24
+
-[Simple Self Hosted Runner on MIG VMs](examples/gh-runner-mig-native-simple/)
25
+
-[Self Hosted Runner on MIG VMs from Packer Image](examples/gh-runner-mig-native-packer/)
58
26
27
+
### [Self Hosted Runners on Managed Instance Groups using Container VMs](modules/gh-runner-mig-container-vm/)
59
28
The `gh-runner-mig-container-vm` module provisions the resources required to deploy Self Hosted Runners on GCP infrastructure using Managed Instance Groups.
60
29
61
-
This includes
62
-
63
-
- Enabling necessary APIs
64
-
- VPC
65
-
- NAT & Cloud Router
66
-
- MIG Container Instance Template
67
-
- MIG Instance Manager
68
-
- FW Rules
30
+
Examples:
31
+
-[Simple Self Hosted Runner on MIG Container VMs](examples/gh-runner-mig-container-vm-simple/)
32
+
-[Self Hosted runners on MIG Container VMs that support Docker Workflows](examples/gh-runner-mig-container-vm-dind/)
69
33
70
-
Below are some examples:
34
+
### [GitHub OIDC](modules/gh-oidc/)
35
+
This module handles the opinionated creation of infrastructure necessary to configure [Workload Identity pools](https://cloud.google.com/iam/docs/workload-identity-federation#pools) and [providers](https://cloud.google.com/iam/docs/workload-identity-federation#providers) for authenticating to GCP using GitHub Actions OIDC tokens.
71
36
72
-
### [Self Hosted runners on MIG Container VMs that support Docker Workflows](examples/gh-runner-mig-container-vm-dind/README.md)
73
-
74
-
This example shows how to deploy a Self Hosted Runner that supports Docker Workflows on MIG Container VMs.
75
-
76
-
### [Simple Self Hosted Runner on MIG Container VMs](examples/gh-runner-mig-container-vm-simple/README.md)
77
-
78
-
This example shows how to deploy a Self Hosted Runner on MIG Container VMs.
37
+
Examples:
38
+
-[Simple Workload Identity configuration for GitHub OIDC](examples/oidc-simple/)
79
39
80
40
81
41
## Requirements
@@ -94,5 +54,11 @@ The following dependencies must be available:
94
54
Refer to the [contribution guidelines](./CONTRIBUTING.md) for
- Previously, the name of the created GKE cluster appended `repo_name` as a suffix. Now, the value of the suffix is set via `cluster_suffix`, as runner clusters can be created for workflows more than one GitHub repo. To prevent cluster deletion when upgrading, set the value of `cluster_suffix` to the previous value of `repo_name`.
29
+
- The module now prefers authentication via GitHub App installation. Follow the instructions for [authenticating to ARC via GitHub App](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/authenticating-to-the-github-api#authenticating-arc-with-a-github-app), and provide the necessary values to the module instead of the previous repo authentication values. Upgrading will destroy the previously created `runner_k8s_config` kubernetes secret, so previous GitHub Runner images may fail.
30
+
- Previously, the GKE cluster service account was provided with the `roles/storage.objectViewer` role to enable pulling images from Container Registry. The module no longer requires access to Container Registry, and so IAM membership has been removed. If your cluster relies on this role, you will need to add it again manually.
# Self Hosted runners on GKE that support dind-rootless
2
+
3
+
## Overview
4
+
5
+
This example shows how to deploy runners that support Docker Workflows on GKE in a rootless configuration. This example is based on the instructions published in [Deploying GitHub Action Runners on GKE with dind-rootless](https://medium.com/google-cloud/github-action-runners-on-gke-with-dind-rootless-bd54e23516c9).
6
+
7
+
More examples of [Self Hosted Runners on GKE/Anthos](https://github.com/github-developer/self-hosted-runners-anthos).
8
+
9
+
## Deployment
10
+
11
+
1. Follow the instructions in the [GitHub documentation](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/authenticating-to-the-github-api#authenticating-arc-with-a-github-app) to create a GitHub App for authenticating ARC
12
+
13
+
1. Gather the values for your GitHub App ID, GitHub App Installation ID, and GitHub App Private Key from the instructions linked above.
14
+
15
+
1. Substitute your values into the example [`main.tf`](main.tf). Modify any other values as needed. For a full list of available variables, refer to the [module documentation](../../modules/gh-runner-gke/).
16
+
17
+
1. Execute Terraform commands to create the required resources.
18
+
```sh
19
+
terraform init
20
+
terraform apply
21
+
```
22
+
23
+
1. Your runners should become active at `https://github.com/organizations/ORGANIZATION/settings/actions/runners`.
24
+
25
+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
26
+
## Inputs
27
+
28
+
| Name | Description | Type | Default | Required |
0 commit comments