Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
291de4ae
Commit
291de4ae
authored
Nov 30, 2017
by
James Ramsay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix feedback from Jarv
parent
3e1be05f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
doc/gitlab-geo/database.md
doc/gitlab-geo/database.md
+17
-16
No files found.
doc/gitlab-geo/database.md
View file @
291de4ae
...
...
@@ -26,7 +26,7 @@ connect to secondary database servers (which are read-only too).
In many databases documentation you will see "primary" being referenced as "master"
and "secondary" as either "slave" or "standby" server (read-only).
Since GitLab 9.4:
We recommend using
[
PostgreSQL replication
We recommend using
[
PostgreSQL replication
slots
](
https://medium.com/@tk512/replication-slots-in-postgresql-b4b03d277c75
)
to ensure the primary retains all the data necessary for the secondaries to
recover. See below for more details.
...
...
@@ -151,10 +151,10 @@ will not be able to perform all necessary configuration steps. Refer to
For security reasons, PostgreSQL does not listen on any network interfaces
by default. However, GitLab Geo requires the secondary to be able to
connect to the primary's database. For this reason, we need the
IP address
of
each node.
connect to the primary's database. For this reason, we need the
address of
each node.
If you are using a cloud provider, you can lookup the
IP
addresses for each
If you are using a cloud provider, you can lookup the addresses for each
geo node through their management console. A table of terminology is
provided below because terminology varies between vendors.
...
...
@@ -163,13 +163,13 @@ will not be able to perform all necessary configuration steps. Refer to
| Interface address | Private address | Internal address |
| Public address | Public address | External address |
To lookup the
IP
address of a geo node, on the geo node execute:
To lookup the address of a geo node, on the geo node execute:
```bash
# Interface
IP
address
# Interface address
ip route get 255.255.255.255 | awk '{print $NF; exit}'
# Public
IP
address
# Public address
curl ipinfo.io/ip
```
...
...
@@ -181,6 +181,11 @@ will not be able to perform all necessary configuration steps. Refer to
| `postgresql['listen_address']` | Primary's interface address |
| `postgresql['trust_auth_cidr_addresses']` | Primary's interface address |
| `postgresql['md5_auth_cidr_addresses']` | Secondary's public addresses |
The `listen_address` option opens PostgreSQL up to network connections
with the interface corresponding to the given address. See [the PostgreSQL
documentation](https://www.postgresql.org/docs/9.6/static/runtime-config-connection.html)
for more details.
Depending on your network configuration, the suggested addresses may not
be correct. If your primary and secondary connect over a local
...
...
@@ -194,17 +199,17 @@ will not be able to perform all necessary configuration steps. Refer to
```ruby
geo_primary_role['enable'] = true
# Primary
IP
address
# - replace '1.2.3.4' with the primary interface
IP
address
# Primary address
# - replace '1.2.3.4' with the primary interface address
postgresql['listen_address'] = '1.2.3.4'
postgresql['trust_auth_cidr_addresses'] = ['127.0.0.1/32','1.2.3.4/32']
# Secondary
IP
addresses
# - replace '5.6.7.8' with the secondary public
IP
address
# Secondary addresses
# - replace '5.6.7.8' with the secondary public address
postgresql['md5_auth_cidr_addresses'] = ['5.6.7.8/32']
# Replication settings
#
Since 9.4: S
et this to be the number of Geo secondary nodes you have
#
- s
et this to be the number of Geo secondary nodes you have
postgresql['max_replication_slots'] = 1
# postgresql['max_wal_senders'] = 10
# postgresql['wal_keep_segments'] = 10
...
...
@@ -212,10 +217,6 @@ will not be able to perform all necessary configuration steps. Refer to
For external PostgreSQL instances, [see additional instructions][external postgresql].
The `listen_address` option opens PostgreSQL up to network connections
with the interface corresponding to the given IP. See [the PostgreSQL
documentation](https://www.postgresql.org/docs/9.6/static/runtime-config-connection.html)
for more details.
1.
Optional: If you want to add another secondary, the relevant setting would look like:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment