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
39aee3da
Commit
39aee3da
authored
Nov 30, 2017
by
James Ramsay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Second significant attempt
parent
d8f5b8ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
19 deletions
+30
-19
doc/gitlab-geo/database.md
doc/gitlab-geo/database.md
+30
-19
No files found.
doc/gitlab-geo/database.md
View file @
39aee3da
...
...
@@ -80,6 +80,7 @@ will not be able to perform all necessary configuration steps. Refer to
else.
1.
Set up TLS support for the PostgreSQL primary server
> **Warning**: Only skip this step if you **know** that PostgreSQL traffic
> between the primary and secondary will be secured through some other
> means, e.g., a known-safe physical network path or a site-to-site VPN that
...
...
@@ -153,31 +154,42 @@ will not be able to perform all necessary configuration steps. Refer to
connect to the primary's database. For this reason, we need the IP address
of each node.
To lookup the interface IP address of the primary, on the primary execute:
```bash
# Primary interface IP address
ip route get 255.255.255.255 | awk '{print $NF; exit}'
```
If you are use a cloud provider, you can lookup the IP addresses for each
geo node through their management console. A table of terminology is
provided below because terminology varies between vendors.
Depending on your network configuration, the primary and secondary may
connect over the public internet, a local area network, or a virtual
network connecting availability zones like Amazon's [Virtual Private
Cloud](https://aws.amazon.com/vpc/). If you are using a local or virtual
network use the interface IP address, otherwise use the public IP address.
| GitLab Terminology | Amazon Web Services | Google Cloud Platform |
|-----|-----|-----|-----|
| Interface address | Private address | Internal address |
| Public address | Public address | External address |
To lookup
addresses, on the secondary
execute:
To lookup
the IP address of a geo node, on the geo node
execute:
```bash
#
Secondary i
nterface IP address
#
I
nterface IP address
ip route get 255.255.255.255 | awk '{print $NF; exit}'
#
Secondary p
ublic IP address
#
P
ublic IP address
curl ipinfo.io/ip
```
In most instances, the following addresses will be used to configure
GitLab Geo:
| Configuration | Address |
|-----|-----|
| `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 |
Depending on your network configuration, the suggested addresses may not
be correct. For example, if your primary and secondary connect over a local
area network, or a virtual network connecting availability zones like
Amazon's [Virtual Private Cloud](https://aws.amazon.com/vpc/) you should
use the secondary's interface address for `postgresql['md5_auth_cidr_addresses']`.
Edit `/etc/gitlab/gitlab.rb` and add the following, replacing the
secondary
IP addresses with addres
s appropriate to your network configuration:
Edit `/etc/gitlab/gitlab.rb` and add the following, replacing the
IP
addresses with addresse
s appropriate to your network configuration:
```ruby
geo_primary_role['enable'] = true
...
...
@@ -188,8 +200,7 @@ will not be able to perform all necessary configuration steps. Refer to
postgresql['trust_auth_cidr_addresses'] = ['127.0.0.1/32','1.2.3.4/32']
# Secondary IP addresses
# - local/virtual networks: replace '5.6.7.8' with the secondary interface IP address
# - otherwise: replace '5.6.7.8' with the secondary public IP address
# - replace '5.6.7.8' with the secondary public IP address
postgresql['md5_auth_cidr_addresses'] = ['5.6.7.8/32']
# Replication settings
...
...
@@ -209,7 +220,7 @@ will not be able to perform all necessary configuration steps. Refer to
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','
11.22.33.44
/32']
postgresql['md5_auth_cidr_addresses'] = ['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
...
...
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