Skip to content

Commit 86be310

Browse files
authored
Merge pull request #21756 from github/repo-sync
repo sync
2 parents 6d0da7b + 1d757a4 commit 86be310

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

content/admin/enterprise-management/caching-repositories/configuring-a-repository-cache.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Configuring a repository cache
3-
intro: 'You can configure a repository cache by creating a new appliance, connecting the repository cache to your primary appliance, and configuring replication of repository networks to the repository cache.'
3+
intro: 'You can configure a repository cache for {% data variables.product.product_name %} by creating a new instance, connecting the repository cache to your primary instance, and configuring replication of repository networks to the repository cache.'
44
versions:
55
ghes: '*'
66
type: how_to
@@ -34,13 +34,14 @@ Then, when told to fetch `https://github.example.com/myorg/myrepo`, Git will ins
3434
## Configuring a repository cache
3535

3636
{% ifversion ghes = 3.3 %}
37-
1. On your primary {% data variables.product.prodname_ghe_server %} appliance, enable the feature flag for repository caching.
37+
{% data reusables.enterprise_installation.ssh-into-instance %}
38+
1. To enable repository caching, run the following command.
3839

3940
```
4041
$ ghe-config cluster.cache-enabled true
4142
```
4243
{%- endif %}
43-
1. Set up a new {% data variables.product.prodname_ghe_server %} appliance on your desired platform. This appliance will be your repository cache. For more information, see "[Setting up a {% data variables.product.prodname_ghe_server %} instance](/admin/guides/installation/setting-up-a-github-enterprise-server-instance)."
44+
1. Set up a new {% data variables.product.prodname_ghe_server %} instance on your desired platform. This instance will be your repository cache. For more information, see "[Setting up a {% data variables.product.prodname_ghe_server %} instance](/admin/guides/installation/setting-up-a-github-enterprise-server-instance)."
4445
{% data reusables.enterprise_installation.replica-steps %}
4546
1. Connect to the repository cache's IP address using SSH.
4647

@@ -62,11 +63,22 @@ Then, when told to fetch `https://github.example.com/myorg/myrepo`, Git will ins
6263
$ ghe-repl-setup PRIMARY-IP
6364
```
6465

65-
1. Set a `cache_location` for the repository cache, replacing *CACHE-LOCATION* with an alphanumeric identifier, such as the region where the cache is deployed. Also set a datacenter name for this cache; new caches will attempt to seed from another cache in the same datacenter.
66+
{% ifversion ghes < 3.6 %}
67+
1. Set a `cache-location` for the repository cache, replacing *CACHE-LOCATION* with an alphanumeric identifier, such as the region where the cache is deployed. Also set a datacenter name for this cache; new caches will attempt to seed from another cache in the same datacenter.
6668

6769
```shell
6870
$ ghe-repl-node --cache CACHE-LOCATION --datacenter REPLICA-DC-NAME
6971
```
72+
{% else %}
73+
1. To configure the repository cache, use the `ghe-repl-node` command and include the necessary parameters.
74+
- Set a `cache-location` for the repository cache, replacing *CACHE-LOCATION* with an alphanumeric identifier, such as the region where the cache is deployed. The *CACHE-LOCATION* value must not be any of the subdomains reserved for use with subdomain isolation, such as `assets` or `media`. For a list of reserved names, see "[Enabling subdomain isolation](/enterprise/admin/guides/installation/enabling-subdomain-isolation#about-subdomain-isolation)."
75+
- Set a `cache-domain` for the repository cache, replacing *EXTERNAL-CACHE-DOMAIN* with the hostname Git clients will use to access the repository cache. If you do not specify a `cache-domain`, {% data variables.product.product_name %} will prepend the *CACHE-LOCATION* value as a subdomain to the hostname configured for your instance. For more information, see "[Configuring a hostname](/admin/configuration/configuring-network-settings/configuring-a-hostname)."
76+
- New caches will attempt to seed from another cache in the same datacenter. Set a `datacenter` for the repository cache, replacing *REPLICA-DC-NAME* with the name of the datacenter where you're deploying the node.
77+
78+
```shell
79+
$ ghe-repl-node --cache CACHE-LOCATION --cache-domain EXTERNAL-CACHE-DOMAIN --datacenter REPLICA-DC-NAME
80+
```
81+
{% endif %}
7082

7183
{% data reusables.enterprise_installation.replication-command %}
7284
{% data reusables.enterprise_installation.verify-replication-channel %}

0 commit comments

Comments
 (0)