Commit a9f6667d authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch 'mk/geo-node-name-guidance' into 'master'

Mention Geo node naming guidance in more places

See merge request gitlab-org/gitlab!67914
parents a97b0d49 1cd22eea
......@@ -186,13 +186,13 @@ keys must be manually replicated to the **secondary** site.
1. Edit `/etc/gitlab/gitlab.rb` and add a **unique** name for your site. You need this in the next steps:
```ruby
# The unique identifier for the Geo site.
##
## The unique identifier for the Geo site. See
## https://docs.gitlab.com/ee/user/admin_area/geo_nodes.html#common-settings
##
gitlab_rails['geo_node_name'] = '<site_name_here>'
```
We recommend mentioning specific names for the `geo_node_name` such as `gitlab-usa` instead of generic names, such as `geo`.
This makes the failover process easier because the physical location does not change, but the Geo site role can.
1. Reconfigure **each Rails and Sidekiq node on your secondary** site for the change to take effect:
```shell
......
......@@ -20,7 +20,7 @@ as well.
NOTE:
You can also use a load balancer to distribute web UI or API traffic to
[multiple Geo **secondary** sites](../../../user/admin_area/geo_nodes.md#multiple-secondary-nodes-behind-a-load-balancer).
[multiple Geo **secondary** sites](../../../user/admin_area/geo_nodes.md#multiple-secondary-sites-behind-a-load-balancer).
Importantly, the **primary** site cannot yet be included. See the feature request
[Support putting the **primary** behind a Geo node load balancer](https://gitlab.com/gitlab-org/gitlab/-/issues/10888).
......
......@@ -66,12 +66,10 @@ The following steps enable a GitLab site to serve as the Geo **primary** site.
```ruby
##
## The unique identifier for the Geo site. It's recommended to use a
## physical location as a name, for example "us-east", instead of
## "secondary" or "geo". It's case-sensitive, and most characters are
## allowed. It should be the same for all nodes in a Geo site.
## The unique identifier for the Geo site. See
## https://docs.gitlab.com/ee/user/admin_area/geo_nodes.html#common-settings
##
gitlab_rails['geo_node_name'] = '<node_name_here>'
gitlab_rails['geo_node_name'] = '<site_name_here>'
##
## Disable automatic migrations
......@@ -210,12 +208,10 @@ then make the following modifications:
geo_logcursor['enable'] = true
##
## The unique identifier for the Geo site. It's recommended to use a
## physical location as a name, for example "eu-west", instead of
## "secondary" or "geo". It's case-sensitive, and most characters are
## allowed. It should be the same for all nodes in a Geo site.
## The unique identifier for the Geo site. See
## https://docs.gitlab.com/ee/user/admin_area/geo_nodes.html#common-settings
##
gitlab_rails['geo_node_name'] = '<node_name_here>'
gitlab_rails['geo_node_name'] = '<site_name_here>'
##
## Disable automatic migrations
......@@ -313,12 +309,10 @@ application nodes above, with some changes to run only the `sidekiq` service:
gitlab_rails['enable'] = true
##
## The unique identifier for the Geo site. It's recommended to use a
## physical location as a name, for example "eu-west", instead of
## "secondary" or "geo". It's case-sensitive, and most characters are
## allowed. It should be the same for all nodes in a Geo site.
## The unique identifier for the Geo site. See
## https://docs.gitlab.com/ee/user/admin_area/geo_nodes.html#common-settings
##
gitlab_rails['geo_node_name'] = '<node_name_here>'
gitlab_rails['geo_node_name'] = '<site_name_here>'
##
## Disable automatic migrations
......
......@@ -69,11 +69,14 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o
sudo -i
```
1. Edit `/etc/gitlab/gitlab.rb` and add a **unique** name for your node:
1. Edit `/etc/gitlab/gitlab.rb` and add a **unique** name for your site:
```ruby
# The unique identifier for the Geo node.
gitlab_rails['geo_node_name'] = '<node_name_here>'
##
## The unique identifier for the Geo site. See
## https://docs.gitlab.com/ee/user/admin_area/geo_nodes.html#common-settings
##
gitlab_rails['geo_node_name'] = '<site_name_here>'
```
1. Reconfigure the **primary** node for the change to take effect:
......
......@@ -34,9 +34,10 @@ developed and tested. We aim to be compatible with most external
roles ['geo_primary_role']
##
## The unique identifier for the Geo site.
## The unique identifier for the Geo site. See
## https://docs.gitlab.com/ee/user/admin_area/geo_nodes.html#common-settings
##
gitlab_rails['geo_node_name'] = '<geo_site_name_here>'
gitlab_rails['geo_node_name'] = '<site_name_here>'
```
1. Reconfigure the **primary** node for the change to take effect:
......
......@@ -5,61 +5,60 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type: howto
---
# Geo nodes Admin Area **(PREMIUM SELF)**
# Geo sites Admin Area **(PREMIUM SELF)**
You can configure various settings for GitLab Geo nodes. For more information, see
You can configure various settings for GitLab Geo sites. For more information, see
[Geo documentation](../../administration/geo/index.md).
On either the primary or secondary node:
On either the primary or secondary site:
1. On the top bar, select **Menu >** **{admin}** **Admin**.
1. On the left sidebar, select **Geo > Nodes**.
## Common settings
All Geo nodes have the following settings:
All Geo sites have the following settings:
| Setting | Description |
| --------| ----------- |
| Primary | This marks a Geo Node as **primary** node. There can be only one **primary** node; make sure that you first add the **primary** node and then all the others. |
| Name | The unique identifier for the Geo node. Must match the setting `gitlab_rails['geo_node_name']` in `/etc/gitlab/gitlab.rb`. The setting defaults to `external_url` with a trailing slash. |
| Primary | This marks a Geo site as **primary** site. There can be only one **primary** site. |
| Name | The unique identifier for the Geo site. It's highly recommended to use a physical location as a name. Good examples are "London Office" or "us-east-1". Avoid words like "primary", "secondary", "Geo", or "DR". This makes the failover process easier because the physical location does not change, but the Geo site role can. All nodes in a single Geo site use the same site name. Nodes use the `gitlab_rails['geo_node_name']` setting in `/etc/gitlab/gitlab.rb` to lookup their Geo site record in the PostgreSQL database. If `gitlab_rails['geo_node_name']` is not set, then the node's `external_url` with trailing slash is used as fallback. The value of `Name` is case-sensitive, and most characters are allowed. |
| URL | The instance's user-facing URL. |
The node you're reading from is indicated with a green `Current node` label, and
the **primary** node is given a blue `Primary` label. Remember that you can only make
changes on the **primary** node!
The site you're currently browsing is indicated with a blue `Current` label, and
the **primary** node is listed first as `Primary site`.
## **Secondary** node settings
## **Secondary** site settings
**Secondary** nodes have a number of additional settings available:
**Secondary** sites have a number of additional settings available:
| Setting | Description |
|---------------------------|-------------|
| Selective synchronization | Enable Geo [selective sync](../../administration/geo/replication/configuration.md#selective-synchronization) for this **secondary** node. |
| Repository sync capacity | Number of concurrent requests this **secondary** node will make to the **primary** node when backfilling repositories. |
| File sync capacity | Number of concurrent requests this **secondary** node will make to the **primary** node when backfilling files. |
| Selective synchronization | Enable Geo [selective sync](../../administration/geo/replication/configuration.md#selective-synchronization) for this **secondary** site. |
| Repository sync capacity | Number of concurrent requests this **secondary** site will make to the **primary** site when backfilling repositories. |
| File sync capacity | Number of concurrent requests this **secondary** site will make to the **primary** site when backfilling files. |
## Geo backfill
**Secondary** nodes are notified of changes to repositories and files by the **primary** node,
**Secondary** sites are notified of changes to repositories and files by the **primary** site,
and will always attempt to synchronize those changes as quickly as possible.
Backfill is the act of populating the **secondary** node with repositories and files that
existed *before* the **secondary** node was added to the database. Since there may be
Backfill is the act of populating the **secondary** site with repositories and files that
existed *before* the **secondary** site was added to the database. Since there may be
extremely large numbers of repositories and files, it's infeasible to attempt to
download them all at once, so GitLab places an upper limit on the concurrency of
these operations.
How long the backfill takes is a function of the maximum concurrency, but higher
values place more strain on the **primary** node. From [GitLab 10.2](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3107),
the limits are configurable. If your **primary** node has lots of surplus capacity,
values place more strain on the **primary** site. From [GitLab 10.2](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3107),
the limits are configurable. If your **primary** site has lots of surplus capacity,
you can increase the values to complete backfill in a shorter time. If it's
under heavy load and backfill is reducing its availability for normal requests,
you can decrease them.
## Using a different URL for synchronization
The **primary** node's Internal URL is used by **secondary** nodes to contact it
The **primary** site's Internal URL is used by **secondary** sites to contact it
(to sync repositories, for example). The name Internal URL distinguishes it from
[External URL](https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab)
which is used by users. Internal URL does not need to be a private address.
......@@ -68,13 +67,13 @@ Internal URL defaults to external URL, but you can also customize it:
1. On the top bar, select **Menu >** **{admin}** **Admin**.
1. On the left sidebar, select **Geo > Nodes**.
1. Select **Edit** on the node you want to customize.
1. Select **Edit** on the site you want to customize.
1. Edit the internal URL.
1. Select **Save changes**.
WARNING:
We recommend using an HTTPS connection while configuring the Geo nodes. To avoid
breaking communication between **primary** and **secondary** nodes when using
We recommend using an HTTPS connection while configuring the Geo sites. To avoid
breaking communication between **primary** and **secondary** sites when using
HTTPS, customize your Internal URL to point to a load balancer with TLS
terminated at the load balancer.
......@@ -84,14 +83,14 @@ using an internal URL that is not accessible to the users will result in the
OAuth authorization flow not working properly, as the users will get redirected
to the internal URL instead of the external one.
## Multiple secondary nodes behind a load balancer
## Multiple secondary sites behind a load balancer
In GitLab 11.11, **secondary** nodes can use identical external URLs as long as
a unique `name` is set for each Geo node. The `gitlab.rb` setting
In GitLab 11.11, **secondary** sites can use identical external URLs as long as
a unique `name` is set for each Geo site. The `gitlab.rb` setting
`gitlab_rails['geo_node_name']` must:
- Be set for each GitLab instance that runs `puma`, `sidekiq`, or `geo_logcursor`.
- Match a Geo node name.
- Match a Geo site name.
The load balancer must use sticky sessions in order to avoid authentication
failures and cross site request errors.
......
import { helpPagePath } from '~/helpers/help_page_helper';
export const SELECTIVE_SYNC_SHARDS = 'selectiveSyncShards';
export const SELECTIVE_SYNC_NAMESPACES = 'selectiveSyncNamespaceIds';
export const VALIDATION_FIELD_KEYS = {
......@@ -10,20 +12,28 @@ export const VALIDATION_FIELD_KEYS = {
MINIMUM_REVERIFICATION_INTERVAL: 'minimumReverificationInterval',
};
export const NODE_NAME_MORE_INFO =
'https://docs.gitlab.com/ee/administration/geo/replication/configuration.html#step-3-add-the-secondary-node';
export const NODE_NAME_MORE_INFO = helpPagePath('user/admin_area/geo_nodes.html', {
anchor: 'common-settings',
});
export const NODE_INTERNAL_URL_MORE_INFO =
'https://docs.gitlab.com/ee/user/admin_area/geo_nodes.html#using-a-different-url-for-synchronization';
export const NODE_INTERNAL_URL_MORE_INFO = helpPagePath('user/admin_area/geo_nodes.html', {
anchor: 'using-a-different-url-for-synchronization',
});
export const SELECTIVE_SYNC_MORE_INFO =
'https://docs.gitlab.com/ee/administration/geo/replication/configuration.html#selective-synchronization';
export const SELECTIVE_SYNC_MORE_INFO = helpPagePath(
'administration/geo/replication/configuration.html',
{ anchor: 'selective-synchronization' },
);
export const OBJECT_STORAGE_MORE_INFO =
'https://docs.gitlab.com/ee/administration/geo/replication/object_storage.html';
export const OBJECT_STORAGE_MORE_INFO = helpPagePath(
'administration/geo/replication/object_storage.html',
);
export const REVERIFICATION_MORE_INFO =
'https://docs.gitlab.com/ee/administration/geo/disaster_recovery/background_verification.html#repository-re-verification';
export const REVERIFICATION_MORE_INFO = helpPagePath(
'administration/geo/disaster_recovery/background_verification.html',
{ anchor: 'repository-re-verification' },
);
export const BACKFILL_MORE_INFO =
'https://docs.gitlab.com/ee/user/admin_area/geo_nodes.html#geo-backfill';
export const BACKFILL_MORE_INFO = helpPagePath('user/admin_area/geo_nodes.html', {
anchor: 'geo-backfill',
});
......@@ -16,6 +16,7 @@ import {
const localVue = createLocalVue();
localVue.use(Vuex);
jest.mock('~/helpers/help_page_helper');
jest.mock('~/lib/utils/url_utility', () => ({
visitUrl: jest.fn().mockName('visitUrlMock'),
}));
......
......@@ -8,6 +8,7 @@ import axios from '~/lib/utils/axios_utils';
import { visitUrl } from '~/lib/utils/url_utility';
import { MOCK_SYNC_NAMESPACES, MOCK_NODE, MOCK_ERROR_MESSAGE, MOCK_NODES_PATH } from '../mock_data';
jest.mock('~/helpers/help_page_helper');
jest.mock('~/flash');
jest.mock('~/lib/utils/url_utility', () => ({
visitUrl: jest.fn().mockName('visitUrlMock'),
......
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