Skip to content

Commit d2012d5

Browse files
authored
Add guide for enterprise-level self-hosted runners with GitHub Actions (#25123)
1 parent f6ba189 commit d2012d5

50 files changed

Lines changed: 345 additions & 127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
17.5 KB
Loading
36 KB
Loading
48.8 KB
Loading

content/actions/guides.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ learningTracks:
1313
- continuous_integration
1414
- continuous_deployment
1515
- deploy_to_the_cloud
16-
- '{% ifversion ghec or ghes or ghae %}adopting_github_actions_for_your_enterprise{% endif %}'
16+
- adopting_github_actions_for_your_enterprise_ghec
17+
- adopting_github_actions_for_your_enterprise_ghes_and_ghae
1718
- hosting_your_own_runners
1819
- create_actions
1920
includeGuides:

content/actions/hosting-your-own-runners/about-self-hosted-runners.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ versions:
1212
type: overview
1313
---
1414

15-
{% data reusables.actions.ae-self-hosted-runners-notice %}
1615
{% data reusables.actions.enterprise-beta %}
1716
{% data reusables.actions.enterprise-github-hosted-runners %}
1817

1918
## About self-hosted runners
2019

21-
{% data reusables.actions.self-hosted-runner-description %} Self-hosted runners can be physical, virtual, in a container, on-premises, or in a cloud.
20+
A self-hosted runner is a system that you deploy and manage to execute jobs from {% data variables.product.prodname_actions %} on {% ifversion ghae or ghec %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}. For more information about {% data variables.product.prodname_actions %}, see "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions){% ifversion fpt %}."{% elsif ghec or ghes or ghae %}" and "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)."{% endif %}
21+
22+
{% data reusables.actions.self-hosted-runner-description %} {% data reusables.actions.self-hosted-runner-locations %}
23+
24+
{% data reusables.actions.self-hosted-runner-architecture %} {% data reusables.actions.runner-app-open-source %} When a new version is released, the runner application automatically updates itself when a job is assigned to the runner, or within a week of release if the runner hasn't been assigned any jobs.
2225

2326
You can add self-hosted runners at various levels in the management hierarchy:
2427
- Repository-level runners are dedicated to a single repository.
@@ -59,7 +62,7 @@ You can use any machine as a self-hosted runner as long at it meets these requir
5962
* The machine has enough hardware resources for the type of workflows you plan to run. The self-hosted runner application itself only requires minimal resources.
6063
* If you want to run workflows that use Docker container actions or service containers, you must use a Linux machine and Docker must be installed.
6164

62-
{% ifversion fpt or ghes > 3.2 or ghec %}
65+
{% ifversion fpt or ghes > 3.2 or ghec or ghae-issue-4462 %}
6366
## Autoscaling your self-hosted runners
6467

6568
You can automatically increase or decrease the number of self-hosted runners in your environment in response to the webhook events you receive. For more information, see "[Autoscaling with self-hosted runners](/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners)."
@@ -133,12 +136,7 @@ The self-hosted runner polls {% data variables.product.product_name %} to retrie
133136

134137
{% data reusables.actions.self-hosted-runner-ports-protocols %}
135138

136-
{% ifversion ghae %}
137-
You must ensure that the self-hosted runner has appropriate network access to communicate with the {% data variables.product.prodname_ghe_managed %} URL and its subdomains.
138-
For example, if your instance name is `octoghae`, then you will need to allow the self-hosted runner to access `octoghae.githubenterprise.com`, `api.octoghae.githubenterprise.com`, and `codeload.octoghae.githubenterprise.com`.
139-
140-
If you use an IP address allow list for your {% data variables.product.prodname_dotcom %} organization or enterprise account, you must add your self-hosted runner's IP address to the allow list. For more information, see "[Managing allowed IP addresses for your organization](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization#using-github-actions-with-an-ip-allow-list)."
141-
{% endif %}
139+
{% data reusables.actions.self-hosted-runner-communications-for-ghae %}
142140

143141
{% ifversion fpt or ghec %}
144142

@@ -242,3 +240,11 @@ Untrusted workflows running on your self-hosted runner pose significant security
242240
* Persisting unwanted or dangerous data on the machine.
243241

244242
For more information about security hardening for self-hosted runners, see "[Security hardening for {% data variables.product.prodname_actions %}](/actions/security-guides/security-hardening-for-github-actions#hardening-for-self-hosted-runners)."
243+
244+
{% ifversion ghec or ghes or ghae %}
245+
246+
## Further reading
247+
248+
- "[Getting started with self-hosted runners for your enterprise](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-self-hosted-runners-for-your-enterprise)"
249+
250+
{% endif %}

content/actions/hosting-your-own-runners/adding-self-hosted-runners.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ type: tutorial
1313
shortTitle: Add self-hosted runners
1414
---
1515

16-
{% data reusables.actions.ae-self-hosted-runners-notice %}
1716
{% data reusables.actions.enterprise-beta %}
1817
{% data reusables.actions.enterprise-github-hosted-runners %}
1918

@@ -33,6 +32,16 @@ For more information, see "[About self-hosted runners](/github/automating-your-w
3332
{% endwarning %}
3433
{% endif %}
3534

35+
{% ifversion fpt or ghec or ghes > 3.2 %}
36+
37+
You can set up automation to scale the number of self-hosted runners. For more information, see "[Autoscaling with self-hosted runners](/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners)."
38+
39+
{% endif %}
40+
41+
## Prerequisites
42+
43+
{% data reusables.actions.self-hosted-runners-prerequisites %}
44+
3645
## Adding a self-hosted runner to a repository
3746

3847
You can add self-hosted runners to a single repository. To add a self-hosted runner to a user repository, you must be the repository owner. For an organization repository, you must be an organization owner or have admin access to the repository. For information about how to add a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)."
@@ -53,6 +62,8 @@ You can add self-hosted runners to a single repository. To add a self-hosted run
5362
{% endif %}
5463
{% data reusables.actions.self-hosted-runner-check-installation-success %}
5564

65+
For more information, see "[Monitoring and troubleshooting self-hosted runners](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners)."
66+
5667
## Adding a self-hosted runner to an organization
5768

5869
You can add self-hosted runners at the organization level, where they can be used to process jobs for multiple repositories in an organization. To add a self-hosted runner to an organization, you must be an organization owner. For information about how to add a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)."
@@ -71,39 +82,31 @@ You can add self-hosted runners at the organization level, where they can be use
7182
1. Under {% ifversion ghes > 3.1 or ghae %}"Runners", click **Add new**, then click **New runner**.{% elsif ghes < 3.2 %}"Self-hosted runners", click **Add runner**."{% endif %}
7283
{% data reusables.actions.self-hosted-runner-configure %}
7384
{% endif %}
74-
7585
{% data reusables.actions.self-hosted-runner-check-installation-success %}
7686

87+
For more information, see "[Monitoring and troubleshooting self-hosted runners](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners)."
88+
7789
{% data reusables.actions.self-hosted-runner-public-repo-access %}
7890

7991
## Adding a self-hosted runner to an enterprise
8092

8193
{% ifversion fpt %}If you use {% data variables.product.prodname_ghe_cloud %}, you{% elsif ghec or ghes or ghae %}You{% endif %} can add self-hosted runners to an enterprise, where they can be assigned to multiple organizations. The organization admins are then able to control which repositories can use it. {% ifversion fpt %}For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-enterprise).{% endif %}
8294

8395
{% ifversion ghec or ghes or ghae %}
84-
8596
New runners are assigned to the default group. You can modify the runner's group after you've registered the runner. For more information, see "[Managing access to self-hosted runners](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)."
8697

8798
{% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}
88-
To add a self-hosted runner to an enterprise account, you must be an enterprise owner. For information about how to add a self-hosted runner with the REST API, see the enterprise endpoints in the [{% data variables.product.prodname_actions %} REST API](/rest/reference/actions#self-hosted-runners).
8999

90-
{% data reusables.enterprise-accounts.access-enterprise %}
91-
{% data reusables.enterprise-accounts.policies-tab %}
92-
{% data reusables.enterprise-accounts.actions-tab %}
93-
{% data reusables.enterprise-accounts.actions-runners-tab %}
94-
1. Click **New runner**.
95-
{% data reusables.actions.self-hosted-runner-configure %}
96-
{% elsif ghae or ghes < 3.4 %}
97-
To add a self-hosted runner at the enterprise level of {% data variables.product.product_location %}, you must be a site administrator.
98-
{% data reusables.enterprise-accounts.access-enterprise %}
99-
{% data reusables.enterprise-accounts.policies-tab %}
100-
{% data reusables.enterprise-accounts.actions-tab %}
101-
{% data reusables.enterprise-accounts.actions-runners-tab %}
102-
1. Click **Add new**, then click **New runner**.
103-
{% data reusables.actions.self-hosted-runner-configure %}
100+
To add a self-hosted runner to an enterprise, you must be an enterprise owner. For information about how to add a self-hosted runner with the REST API, see the enterprise endpoints in the [{% data variables.product.prodname_actions %} REST API](/rest/reference/actions#self-hosted-runners).
101+
104102
{% endif %}
103+
104+
{% data reusables.actions.self-hosted-runner-add-to-enterprise %}
105+
105106
{% data reusables.actions.self-hosted-runner-check-installation-success %}
106107

108+
For more information, see "[Monitoring and troubleshooting self-hosted runners](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners)."
109+
107110
{% data reusables.actions.self-hosted-runner-public-repo-access %}
108111

109112
### Making enterprise runners available to repositories
@@ -114,3 +117,11 @@ To make an enterprise-level self-hosted runner group available to an organizatio
114117

115118
For more information on changing runner group access settings, see "[Managing access to self-hosted runners using groups](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)."
116119
{% endif %}
120+
121+
{% ifversion ghec or ghes or ghae %}
122+
123+
## Further reading
124+
125+
- "[Getting started with self-hosted runners for your enterprise](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-self-hosted-runners-for-your-enterprise)"
126+
127+
{% endif %}

content/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ versions:
55
fpt: '*'
66
ghec: '*'
77
ghes: '>3.2'
8+
ghae: 'issue-4462'
89
type: overview
910
---
1011

11-
{% data reusables.actions.ae-self-hosted-runners-notice %}
1212
{% data reusables.actions.enterprise-beta %}
1313
{% data reusables.actions.enterprise-github-hosted-runners %}
1414

content/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ defaultPlatform: linux
1313
shortTitle: Run runner app on startup
1414
---
1515

16-
{% data reusables.actions.ae-self-hosted-runners-notice %}
1716
{% data reusables.actions.enterprise-beta %}
1817
{% data reusables.actions.enterprise-github-hosted-runners %}
1918

content/actions/hosting-your-own-runners/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ children:
2727
- /monitoring-and-troubleshooting-self-hosted-runners
2828
- /removing-self-hosted-runners
2929
---
30-
{% data reusables.actions.ae-self-hosted-runners-notice %}
30+
3131
{% data reusables.actions.enterprise-beta %}
3232
{% data reusables.actions.enterprise-github-hosted-runners %}

content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md

Lines changed: 20 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ type: tutorial
1212
shortTitle: Manage runner groups
1313
---
1414

15-
{% data reusables.actions.ae-self-hosted-runners-notice %}
1615
{% data reusables.actions.enterprise-beta %}
1716
{% data reusables.actions.enterprise-github-hosted-runners %}
1817

@@ -69,17 +68,19 @@ When creating a group, you must choose a policy that defines which repositories
6968
![Add runner group](/assets/images/help/settings/actions-org-add-runner-group.png)
7069
1. Enter a name for your runner group, and assign a policy for repository access.
7170

72-
{% ifversion ghes or ghae %} You can configure a runner group to be accessible to a specific list of repositories, or to all repositories in the organization. By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.{% endif %}
73-
71+
You can configure a runner group to be accessible to a specific list of repositories, or to all repositories in the organization.{% ifversion ghec or ghes %} By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.{% endif %}
72+
73+
{%- ifversion ghes %}
7474
{% warning %}
7575

76-
**Warning**
76+
**Warning**:
7777

7878
{% indented_data_reference reusables.actions.self-hosted-runner-security spaces=3 %}
7979

8080
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)."
8181

8282
{% endwarning %}
83+
{%- endif %}
8384

8485
![Add runner group options](/assets/images/help/settings/actions-org-add-runner-group-options.png)
8586
1. Click **Save group** to create the group and apply the policy.
@@ -93,49 +94,29 @@ Self-hosted runners are automatically assigned to the default group when created
9394

9495
When creating a group, you must choose a policy that defines which organizations have access to the runner group.
9596

96-
{% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}
97-
{% data reusables.enterprise-accounts.access-enterprise %}
98-
{% data reusables.enterprise-accounts.policies-tab %}
99-
{% data reusables.enterprise-accounts.actions-tab %}
100-
{% data reusables.enterprise-accounts.actions-runner-groups-tab %}
101-
1. Click **New runner group**.
102-
{% data reusables.actions.runner-group-assign-policy-org %}
97+
{% data reusables.actions.self-hosted-runner-groups-add-to-enterprise-first-steps %}
98+
1. To choose a policy for organization access, select the **Organization access** drop-down, and click a policy. You can configure a runner group to be accessible to a specific list of organizations, or all organizations in the enterprise.{% ifversion ghes %} By default, only private repositories can access runners in a runner group, but you can override this.{% endif %}
10399

100+
{%- ifversion ghec or ghes %}
104101
{% warning %}
105102

106-
**Warning**
103+
**Warning**:
107104

108105
{% indented_data_reference reusables.actions.self-hosted-runner-security spaces=3 %}
109106

110107
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)."
111108

112109
{% endwarning %}
113-
{% data reusables.actions.self-hosted-runner-create-group %}
114-
{% elsif ghae or ghes < 3.4 %}
115-
{% data reusables.enterprise-accounts.access-enterprise %}
116-
{% data reusables.enterprise-accounts.policies-tab %}
117-
{% data reusables.enterprise-accounts.actions-tab %}
118-
{% data reusables.enterprise-accounts.actions-runners-tab %}
119-
1. Click **Add new**, and then **New group**.
120-
121-
![Add runner group](/assets/images/help/settings/actions-enterprise-account-add-runner-group.png)
122-
1. Enter a name for your runner group, and assign a policy for organization access.
123-
124-
You can configure a runner group to be accessible to a specific list of organizations, or all organizations in the enterprise. By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.
125-
126-
{% warning %}
110+
{%- endif %}
111+
{%- ifversion ghec or ghes %}
127112

128-
**Warning**
113+
![Add runner group options](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options.png)
114+
{%- elsif ghae %}
129115

130-
{% indented_data_reference reusables.actions.self-hosted-runner-security spaces=3 %}
131-
132-
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)."
133-
134-
{% endwarning %}
135-
136-
![Add runner group options](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options.png)
116+
![Add runner group options](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options-ae.png)
117+
{%- endif %}
137118
1. Click **Save group** to create the group and apply the policy.
138-
{% endif %}
119+
139120
{% endif %}
140121

141122
## Changing the access policy of a self-hosted runner group
@@ -146,15 +127,17 @@ You can update the access policy of a runner group, or rename a runner group.
146127
{% data reusables.actions.settings-sidebar-actions-runner-groups-selection %}
147128
1. Modify the access options, or change the runner group name.
148129

130+
{%- ifversion fpt or ghec or ghes %}
149131
{% warning %}
150132

151-
**Warning**
133+
**Warning**:
152134

153135
{% indented_data_reference reusables.actions.self-hosted-runner-security spaces=3 %}
154136

155137
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)."
156138

157139
{% endwarning %}
140+
{%- endif %}
158141
{% elsif ghae or ghes < 3.4 %}
159142
{% data reusables.actions.self-hosted-runner-configure-runner-group-access %}
160143
{% endif %}
@@ -181,7 +164,7 @@ If you don't specify a runner group during the registration process, your new se
181164
{% data reusables.actions.self-hosted-runner-navigate-to-org-enterprise %}
182165
{% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}
183166
1. In the "Runners" list, click the runner that you want to configure.
184-
2. Select the Runner group dropdown menu.
167+
2. Select the **Runner group** drop-down.
185168
3. In "Move runner to group", choose a destination group for the runner.
186169
{% elsif ghae or ghes < 3.4 %}
187170
1. In the {% ifversion ghes > 3.1 or ghae %}"Runner groups"{% elsif ghes < 3.2 %}"Self-hosted runners"{% endif %} section of the settings page, locate the current group of the runner you want to move and expand the list of group members.

0 commit comments

Comments
 (0)