Commit 2d3c3ab1 authored by Stan Hu's avatar Stan Hu

Merge branch 'fix-geo-16-docs' into 'master'

Fix Geo docs for 10.6

Closes #5259, #5264, and #5265

See merge request gitlab-org/gitlab-ee!4954
parents 2a62c238 b6991b20
# Geo configuration
# Geo configuration (GitLab Omnibus)
>**Note:**
This is the documentation for the Omnibus GitLab packages. For installations
......@@ -73,6 +73,7 @@ they must be manually replicated to the secondary.
```
gitlab-ctl reconfigure
gitlab-ctl restart
```
### Step 2. Manually replicate primary SSH host keys
......@@ -146,20 +147,20 @@ keys must be manually replicated to the secondary node.
1. Click the **Add node** button.
1. SSH into your GitLab **secondary** server and restart the services:
```
gitlab-ctl restart
```
```bash
gitlab-ctl restart
```
Check if there are any common issue with your Geo setup by running:
Check if there are any common issue with your Geo setup by running:
```
gitlab-rake gitlab:geo:check
```
```bash
gitlab-rake gitlab:geo:check
```
1. SSH into your GitLab **primary** server and login as root to verify the
secondary is reachable or there are any common issue with your Geo setup:
```
```bash
gitlab-rake gitlab:geo:check
```
......
# Geo configuration
# Geo configuration (source)
>**Note:**
This is the documentation for installations from source. For installations
......@@ -69,6 +69,12 @@ be manually replicated to the secondary.
chown git:git /home/git/gitlab/config/secrets.yml
chmod 0600 /home/git/gitlab/config/secrets.yml
```
1. Restart GitLab
```bash
service gitlab restart
```
Once restarted, the secondary will automatically start replicating missing data
from the primary in a process known as backfill. Meanwhile, the primary node
......@@ -98,11 +104,11 @@ Read [Manually replicate primary SSH host keys][configuration-replicate-ssh]
service gitlab restart
```
Check if there are any common issue with your Geo setup by running:
Check if there are any common issue with your Geo setup by running:
```bash
bundle exec rake gitlab:geo:check
```
```bash
bundle exec rake gitlab:geo:check
```
1. SSH into your GitLab **primary** server and login as root to verify the
secondary is reachable or there are any common issue with your Geo setup:
......
# Geo database replication
# Geo database replication (GitLab Omnibus)
>**Note:**
This is the documentation for the Omnibus GitLab packages. For installations
......@@ -155,6 +155,10 @@ The following guide assumes that:
addresses with addresses appropriate to your network configuration:
```ruby
##
## Geo Primary role
## - configure dependent flags automatically to enable Geo
##
geo_primary_role['enable'] = true
##
......@@ -164,10 +168,11 @@ The following guide assumes that:
postgresql['listen_address'] = '1.2.3.4'
##
# Secondary addresses
# Primary and Secondary addresses
# - replace '1.2.3.4' with the primary public or VPC address
# - replace '5.6.7.8' with the secondary public or VPC address
##
postgresql['md5_auth_cidr_addresses'] = ['5.6.7.8/32']
postgresql['md5_auth_cidr_addresses'] = ['1.2.3.4/32','5.6.7.8/32']
##
## Replication settings
......@@ -187,7 +192,7 @@ The following guide assumes that:
1. Optional: If you want to add another secondary, the relevant setting would look like:
```ruby
postgresql['md5_auth_cidr_addresses'] = ['5.6.7.8/32','9.10.11.12/32']
postgresql['md5_auth_cidr_addresses'] = ['1.2.3.4/32', '5.6.7.8/32','9.10.11.12/32']
```
You may also want to edit the `wal_keep_segments` and `max_wal_senders` to
......@@ -312,19 +317,30 @@ The following guide assumes that:
addresses with addresses appropriate to your network configuration:
```ruby
# Secondary addresses
# - replace '5.6.7.8' with the secondary public or VPC address
##
## Geo Secondary role
## - configure dependent flags automatically to enable Geo
##
geo_secondary_role['enable'] = true
##
## Secondary address
## - replace '5.6.7.8' with the secondary public or VPC address
##
postgresql['listen_address'] = '5.6.7.8'
postgresql['md5_auth_cidr_addresses'] = ['5.6.7.8/32']
# gitlab database user's password (defined previously)
##
## Database credentials password (defined previously in primary node)
## - replicate same values here as defined in primary node
##
postgresql['sql_user_password'] = 'fca0b89a972d69f00eb3ec98a5838484'
gitlab_rails['db_password'] = 'mypassword'
# enable fdw for the geo tracking database
##
## Enable FDW support for the Geo Tracking Database (improves performance)
##
geo_secondary['db_fdw'] = true
# make this a secondary Geo node
geo_secondary_role['enable'] = true
```
For external PostgreSQL instances, [see additional instructions][external postgresql].
......@@ -471,16 +487,16 @@ the instructions below:
1. Edit `/etc/gitlab/gitlab.rb` with the connection params and credentials
```ruby
# note this is shared between both databases,
# make sure you define the same password in both
gitlab_rails['db_password'] = 'mypassword'
geo_secondary['db_host'] = '2.3.4.5' # change to the correct public IP
geo_secondary['db_port'] = 5431 # change to the correct port
geo_secondary['db_fdw'] = true # enable FDW
geo_postgresql['enable'] = false # don't use internal managed instance
```
```ruby
# note this is shared between both databases,
# make sure you define the same password in both
gitlab_rails['db_password'] = 'mypassword'
geo_secondary['db_host'] = '2.3.4.5' # change to the correct public IP
geo_secondary['db_port'] = 5431 # change to the correct port
geo_secondary['db_fdw'] = true # enable FDW
geo_postgresql['enable'] = false # don't use internal managed instance
```
1. Reconfigure GitLab for the changes to take effect:
......
# Geo database replication
# Geo database replication (source)
>**Note:**
This is the documentation for installations from source. For installations
......
# Geo
# Geo (development)
Geo feature requires that we orchestrate a lot of components together.
For the Database we need to setup a streaming replication. Any operation on disk
......
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