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
0ed3bada
Commit
0ed3bada
authored
Jan 11, 2018
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make documented instructions on FDW optional
parent
197e392c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
doc/gitlab-geo/database.md
doc/gitlab-geo/database.md
+5
-2
doc/gitlab-geo/database_source.md
doc/gitlab-geo/database_source.md
+6
-4
No files found.
doc/gitlab-geo/database.md
View file @
0ed3bada
...
...
@@ -304,10 +304,10 @@ because we have not yet configured the secondary server. This is the next step.
connections. The certificate can only be replicated by someone with access
to the private key, which is **only** present on the primary node.
1.
Configure PostgreSQL to listen on network interfaces on secondary
1.
Optional: Configure PostreSQL to enable FDW support
This step is similar to how we configured the primary instance.
We need to enable this,
even if using a single node, to enable FDW support
.
We need to enable this,
to enable FDW support, even if using a single node
.
Edit `/etc/gitlab/gitlab.rb` and add the following, replacing the IP
addresses with addresses appropriate to your network configuration:
...
...
@@ -320,6 +320,9 @@ because we have not yet configured the secondary server. This is the next step.
# gitlab database user's password (defined previously)
gitlab_rails['db_password'] = 'mypassword'
# enable fdw for the geo tracking database
geo_secondary['db_fdw'] = true
```
1.
Test that the
`gitlab-psql`
user can connect to the primary's database:
...
...
doc/gitlab-geo/database_source.md
View file @
0ed3bada
...
...
@@ -33,9 +33,8 @@ recover. See below for more details.
The following guide assumes that:
-
You are using PostgreSQL 9.6 or later
which includes the
[
`pg_basebackup` tool
][
pgback
]
and improved
[
Foreign Data Wrapper
][
FDW
]
support.
-
You are using PostgreSQL 9.6 or later which includes the
[
`pg_basebackup` tool
][
pgback
]
and improved
[
Foreign Data Wrapper
][
FDW
]
support.
-
You have a primary node already set up (the GitLab server you are
replicating from), running PostgreSQL 9.6 or later, and
you have a new secondary server set up with the same versions of the OS,
...
...
@@ -264,7 +263,7 @@ node.
bundle exec rake geo:db:migrate
```
1.
Configure the
[
PostgreSQL FDW
][
FDW
]
connection and credentials:
1.
Optional:
Configure the
[
PostgreSQL FDW
][
FDW
]
connection and credentials:
Save the script below in a file, ex. `/tmp/geo_fdw.sh` and modify the connection
params to match your environment.
...
...
@@ -291,6 +290,9 @@ node.
sudo -u postgres psql -h $GEO_DB_HOST -d $GEO_DB_NAME -p $GEO_DB_PORT -c "GRANT USAGE ON FOREIGN SERVER gitlab_secondary TO $(GEO_DB_USER);"
```
And edit the content of `database_geo.yml` and to add `fdw: true` to
the `production:` block.
### Step 4. Initiate the replication process
Below we provide a script that connects the database on the secondary node 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