Commit 2a87508e authored by Nick Nguyen's avatar Nick Nguyen Committed by Valery Sizov

Change node to site for Geo docker registry docs

parent 964c6c08
...@@ -5,16 +5,16 @@ info: To determine the technical writer assigned to the Stage/Group associated w ...@@ -5,16 +5,16 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type: howto type: howto
--- ---
# Docker Registry for a secondary node **(PREMIUM SELF)** # Docker Registry for a secondary site **(PREMIUM SELF)**
You can set up a [Docker Registry](https://docs.docker.com/registry/) on your You can set up a [Docker Registry](https://docs.docker.com/registry/) on your
**secondary** Geo node that mirrors the one on the **primary** Geo node. **secondary** Geo site that mirrors the one on the **primary** Geo site.
## Storage support ## Storage support
Docker Registry currently supports a few types of storage. If you choose a Docker Registry currently supports a few types of storage. If you choose a
distributed storage (`azure`, `gcs`, `s3`, `swift`, or `oss`) for your Docker distributed storage (`azure`, `gcs`, `s3`, `swift`, or `oss`) for your Docker
Registry on the **primary** node, you can use the same storage for a **secondary** Registry on the **primary** site, you can use the same storage for a **secondary**
Docker Registry as well. For more information, read the Docker Registry as well. For more information, read the
[Load balancing considerations](https://docs.docker.com/registry/deploying/#load-balancing-considerations) [Load balancing considerations](https://docs.docker.com/registry/deploying/#load-balancing-considerations)
when deploying the Registry, and how to set up the storage driver for the GitLab when deploying the Registry, and how to set up the storage driver for the GitLab
...@@ -24,22 +24,22 @@ integrated [Container Registry](../../packages/container_registry.md#use-object- ...@@ -24,22 +24,22 @@ integrated [Container Registry](../../packages/container_registry.md#use-object-
You can enable a storage-agnostic replication so it You can enable a storage-agnostic replication so it
can be used for cloud or local storage. Whenever a new image is pushed to the can be used for cloud or local storage. Whenever a new image is pushed to the
**primary** node, each **secondary** node will pull it to its own container **primary** site, each **secondary** site will pull it to its own container
repository. repository.
To configure Docker Registry replication: To configure Docker Registry replication:
1. Configure the [**primary** node](#configure-primary-node). 1. Configure the [**primary** site](#configure-primary-site).
1. Configure the [**secondary** node](#configure-secondary-node). 1. Configure the [**secondary** site](#configure-secondary-site).
1. Verify Docker Registry [replication](#verify-replication). 1. Verify Docker Registry [replication](#verify-replication).
### Configure **primary** node ### Configure **primary** site
Make sure that you have Container Registry set up and working on Make sure that you have Container Registry set up and working on
the **primary** node before following the next steps. the **primary** site before following the next steps.
We need to make Docker Registry send notification events to the We need to make Docker Registry send notification events to the
**primary** node. **primary** site.
1. SSH into your GitLab **primary** server and login as root: 1. SSH into your GitLab **primary** server and login as root:
...@@ -85,27 +85,29 @@ We need to make Docker Registry send notification events to the ...@@ -85,27 +85,29 @@ We need to make Docker Registry send notification events to the
gitlab-ctl reconfigure gitlab-ctl reconfigure
``` ```
### Configure **secondary** node ### Configure **secondary** site
Make sure you have Container Registry set up and working on Make sure you have Container Registry set up and working on
the **secondary** node before following the next steps. the **secondary** site before following the next steps.
The following steps should be done on each **secondary** node you're The following steps should be done on each **secondary** site you're
expecting to see the Docker images replicated. expecting to see the Docker images replicated.
Because we need to allow the **secondary** node to communicate securely with Because we need to allow the **secondary** site to communicate securely with
the **primary** node Container Registry, we need to have a single key the **primary** site Container Registry, we need to have a single key
pair for all the nodes. The **secondary** node will use this key to pair for all the sites. The **secondary** site will use this key to
generate a short-lived JWT that is pull-only-capable to access the generate a short-lived JWT that is pull-only-capable to access the
**primary** node Container Registry. **primary** site Container Registry.
1. SSH into the **secondary** node and login as the `root` user: For each application node on the **secondary** site:
1. SSH into the node and login as the `root` user:
```shell ```shell
sudo -i sudo -i
``` ```
1. Copy `/var/opt/gitlab/gitlab-rails/etc/gitlab-registry.key` from the **primary** to the **secondary** node. 1. Copy `/var/opt/gitlab/gitlab-rails/etc/gitlab-registry.key` from the **primary** to the node.
1. Edit `/etc/gitlab/gitlab.rb`: 1. Edit `/etc/gitlab/gitlab.rb`:
...@@ -114,7 +116,7 @@ generate a short-lived JWT that is pull-only-capable to access the ...@@ -114,7 +116,7 @@ generate a short-lived JWT that is pull-only-capable to access the
gitlab_rails['geo_registry_replication_primary_api_url'] = 'https://primary.example.com:5050/' # Primary registry address, it will be used by the secondary node to directly communicate to primary registry gitlab_rails['geo_registry_replication_primary_api_url'] = 'https://primary.example.com:5050/' # Primary registry address, it will be used by the secondary node to directly communicate to primary registry
``` ```
1. Reconfigure the **secondary** node for the change to take effect: 1. Reconfigure the node for the change to take effect:
```shell ```shell
gitlab-ctl reconfigure gitlab-ctl reconfigure
...@@ -123,6 +125,6 @@ generate a short-lived JWT that is pull-only-capable to access the ...@@ -123,6 +125,6 @@ generate a short-lived JWT that is pull-only-capable to access the
### Verify replication ### Verify replication
To verify Container Registry replication is working, go to **Admin Area > Geo** To verify Container Registry replication is working, go to **Admin Area > Geo**
(`/admin/geo/nodes`) on the **secondary** node. (`/admin/geo/nodes`) on the **secondary** site.
The initial replication, or "backfill", will probably still be in progress. The initial replication, or "backfill", will probably still be in progress.
You can monitor the synchronization process on each Geo node from the **primary** node's **Geo Nodes** dashboard in your browser. You can monitor the synchronization process on each Geo site from the **primary** site's **Geo Nodes** dashboard in your browser.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment