Commit c53455e4 authored by Evan Read's avatar Evan Read

Merge branch 'geo-documents-name-your-nodes' into 'master'

Instructions to set your Geo Node Name

Closes #11501

See merge request gitlab-org/gitlab!18463
parents a6c431cf c4a4ba82
...@@ -165,10 +165,32 @@ keys must be manually replicated to the **secondary** node. ...@@ -165,10 +165,32 @@ keys must be manually replicated to the **secondary** node.
### Step 3. Add the **secondary** node ### Step 3. Add the **secondary** node
1. SSH into your GitLab **secondary** server and login as root:
```sh
sudo -i
```
1. Edit `/etc/gitlab/gitlab.rb` and add a **unique** name for your node. You will need this in the next steps:
```ruby
# The unique identifier for the Geo node.
gitlab_rails['geo_node_name'] = '<node_name_here>'
```
1. Reconfigure the **secondary** node for the change to take effect:
```sh
gitlab-ctl reconfigure
```
1. Visit the **primary** node's **Admin Area > Geo** 1. Visit the **primary** node's **Admin Area > Geo**
(`/admin/geo/nodes`) in your browser. (`/admin/geo/nodes`) in your browser.
1. Add the **secondary** node by providing its full URL. **Do NOT** check the 1. Click the **New node** button.
1. Add the **secondary** node. Use the **exact** name you inputed for `gitlab_rails['geo_node_name']` as the Name and the full URL as the URL. **Do NOT** check the
**This is a primary node** checkbox. **This is a primary node** checkbox.
![Add secondary node](img/adding_a_secondary_node.png)
1. Optionally, choose which groups or storage shards should be replicated by the 1. Optionally, choose which groups or storage shards should be replicated by the
**secondary** node. Leave blank to replicate all. Read more in **secondary** node. Leave blank to replicate all. Read more in
[selective synchronization](#selective-synchronization). [selective synchronization](#selective-synchronization).
......
...@@ -53,6 +53,19 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o ...@@ -53,6 +53,19 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o
sudo -i sudo -i
``` ```
1. Edit `/etc/gitlab/gitlab.rb` and add a **unique** name for your node:
```ruby
# The unique identifier for the Geo node.
gitlab_rails['geo_node_name'] = '<node_name_here>'
```
1. Reconfigure the **primary** node for the change to take effect:
```sh
gitlab-ctl reconfigure
```
1. Execute the command below to define the node as **primary** node: 1. Execute the command below to define the node as **primary** node:
```sh ```sh
......
...@@ -56,6 +56,11 @@ The following steps enable a GitLab cluster to serve as the **primary** node. ...@@ -56,6 +56,11 @@ The following steps enable a GitLab cluster to serve as the **primary** node.
## ##
roles ['geo_primary_role'] roles ['geo_primary_role']
##
## The unique identifier for the Geo node.
##
gitlab_rails['geo_node_name'] = '<node_name_here>'
## ##
## Disable automatic migrations ## Disable automatic migrations
## ##
...@@ -229,6 +234,11 @@ following modifications: ...@@ -229,6 +234,11 @@ following modifications:
## ##
roles ['geo_secondary_role', 'application_role'] roles ['geo_secondary_role', 'application_role']
##
## The unique identifier for the Geo node.
##
gitlab_rails['geo_node_name'] = '<node_name_here>'
## ##
## Disable automatic migrations ## Disable automatic migrations
## ##
......
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