## When running the Geo tracking database on a separate machine, disable it
## here and allow connections from the tracking database host. And ensure
## the tracking database IP is in postgresql['md5_auth_cidr_addresses'] above.
##
geo_postgresql['enable']=false
##
## Disable all other services that aren't needed. We had to enable
## geo_secondary_role to cause some configuration changes to postgresql, but
## the role enables single-node services by default.
##
alertmanager['enable']=false
consul['enable']=false
geo_logcursor['enable']=false
gitaly['enable']=false
gitlab_exporter['enable']=false
gitlab_workhorse['enable']=false
nginx['enable']=false
node_exporter['enable']=false
pgbouncer_exporter['enable']=false
prometheus['enable']=false
redis['enable']=false
redis_exporter['enable']=false
patroni['enable']=false
sidekiq['enable']=false
sidekiq_cluster['enable']=false
puma['enable']=false
```
After making these changes, [reconfigure GitLab](../../restart_gitlab.md#omnibus-gitlab-reconfigure) so the changes take effect.
Follow the [Geo database replication instructions](../setup/database.md).
If using an external PostgreSQL instance, refer also to
If using an external PostgreSQL instance, refer also to
[Geo with external PostgreSQL instances](../setup/external_database.md).
[Geo with external PostgreSQL instances](../setup/external_database.md).
### Step 3: Configure the tracking database on the **secondary** node
### Step 3: Configure the Geo tracking database on the Geo **secondary** site
NOTE:
If you want to run the Geo tracking database in a multi-node PostgreSQL cluster,
This documentation assumes the tracking database runs on
then follow [Configuring Patroni cluster for the tracking PostgreSQL database](../setup/database.md#configuring-patroni-cluster-for-the-tracking-postgresql-database).
only a single machine, rather than as a PostgreSQL cluster.
Configure the tracking database.
If you want to run the Geo tracking database on a single node, then follow
the instructions below.
1. Generate an MD5 hash of the desired password for the database user that the
1. Generate an MD5 hash of the desired password for the database user that the
GitLab application uses to access the tracking database:
GitLab application uses to access the tracking database:
...
@@ -254,8 +152,8 @@ Configure the tracking database.
...
@@ -254,8 +152,8 @@ Configure the tracking database.
Use this hash to fill in `<tracking_database_password_md5_hash>` in the next
Use this hash to fill in `<tracking_database_password_md5_hash>` in the next
step.
step.
1.Edit `/etc/gitlab/gitlab.rb` in the tracking database machine, and add the
1.On the machine where the Geo tracking database is intended to run, add the
following:
following to `/etc/gitlab/gitlab.rb`:
```ruby
```ruby
##
##
...
@@ -271,29 +169,8 @@ Configure the tracking database.
...
@@ -271,29 +169,8 @@ Configure the tracking database.