A local PgBouncer service to be configured on each PostgreSQL node. Note that this is separate from the main PgBouncer cluster that tracks the primary.
The following IPs will be used as an example:
-`10.6.0.21`: PostgreSQL primary
...
...
@@ -548,8 +570,8 @@ in the second step, do not supply the `EXTERNAL_URL` value.
1. On every database node, edit `/etc/gitlab/gitlab.rb` replacing values noted in the `# START user configuration` section:
```ruby
# Disable all components except Patroni and Consul
roles(['patroni_role'])
# Disable all components except Patroni, PgBouncer and Consul
roles(['patroni_role','pgbouncer_role'])
# PostgreSQL configuration
postgresql['listen_address']='0.0.0.0'
...
...
@@ -594,6 +616,15 @@ in the second step, do not supply the `EXTERNAL_URL` value.
A local PgBouncer service to be configured on each PostgreSQL node. Note that this is separate from the main PgBouncer cluster that tracks the primary.
The following IPs will be used as an example:
-`10.6.0.21`: PostgreSQL primary
...
...
@@ -551,8 +573,8 @@ in the second step, do not supply the `EXTERNAL_URL` value.
1. On every database node, edit `/etc/gitlab/gitlab.rb` replacing values noted in the `# START user configuration` section:
```ruby
# Disable all components except Patroni and Consul
roles(['patroni_role'])
# Disable all components except Patroni, PgBouncer and Consul
roles(['patroni_role','pgbouncer_role'])
# PostgreSQL configuration
postgresql['listen_address']='0.0.0.0'
...
...
@@ -597,6 +619,15 @@ in the second step, do not supply the `EXTERNAL_URL` value.
A local PgBouncer service to be configured on each PostgreSQL node. Note that this is separate from the main PgBouncer cluster that tracks the primary.
The following IPs will be used as an example:
-`10.6.0.31`: PostgreSQL primary
...
...
@@ -846,8 +862,8 @@ in the second step, do not supply the `EXTERNAL_URL` value.
1. On every database node, edit `/etc/gitlab/gitlab.rb` replacing values noted in the `# START user configuration` section:
```ruby
# Disable all components except Patroni and Consul
roles(['patroni_role'])
# Disable all components except Patroni, PgBouncer and Consul
roles(['patroni_role','pgbouncer_role'])
# PostgreSQL configuration
postgresql['listen_address']='0.0.0.0'
...
...
@@ -892,6 +908,15 @@ in the second step, do not supply the `EXTERNAL_URL` value.
A local PgBouncer service to be configured on each PostgreSQL node. Note that this is separate from the main PgBouncer cluster that tracks the primary.
The following IPs will be used as an example:
-`10.6.0.21`: PostgreSQL primary
...
...
@@ -557,8 +579,8 @@ in the second step, do not supply the `EXTERNAL_URL` value.
1. On every database node, edit `/etc/gitlab/gitlab.rb` replacing values noted in the `# START user configuration` section:
```ruby
# Disable all components except Patroni and Consul
roles(['patroni_role'])
# Disable all components except Patroni, PgBouncer and Consul
roles(['patroni_role','pgbouncer_role'])
# PostgreSQL configuration
postgresql['listen_address']='0.0.0.0'
...
...
@@ -604,6 +626,15 @@ in the second step, do not supply the `EXTERNAL_URL` value.
@@ -664,9 +695,11 @@ If the 'State' column for any node doesn't say "running", check the
</a>
</div>
## Configure PgBouncer
### Configure PgBouncer
Now that the PostgreSQL servers are all set up, let's configure PgBouncer
for tracking and handling reads/writes to the primary database.
Now that the PostgreSQL servers are all set up, let's configure PgBouncer.
The following IPs will be used as an example:
-`10.6.0.31`: PgBouncer 1
...
...
@@ -891,7 +924,7 @@ a node and change its status from primary to replica (and vice versa).
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
on the page, and to select the correct Omnibus GitLab package, with the same version
and type (Community or Enterprise editions) as your current install.
1. Edit `/etc/gitlab/gitlab.rb` and add the same contents as the priimary node in the previous section by replacing `redis_master_node` with `redis_replica_node`:
1. Edit `/etc/gitlab/gitlab.rb` and add the same contents as the primary node in the previous section by replacing `redis_master_node` with `redis_replica_node`:
```ruby
# Specify server role as 'redis_replica_role' with Sentinel and enable Consul agent
...
...
@@ -1684,8 +1717,8 @@ To configure the Sidekiq nodes, on each one:
gitlab_rails['db_host']='10.6.0.20'# internal load balancer IP
A local PgBouncer service to be configured on each PostgreSQL node. Note that this is separate from the main PgBouncer cluster that tracks the primary.
The following IPs will be used as an example:
-`10.6.0.31`: PostgreSQL primary
...
...
@@ -837,8 +853,8 @@ in the second step, do not supply the `EXTERNAL_URL` value.
1. On every database node, edit `/etc/gitlab/gitlab.rb` replacing values noted in the `# START user configuration` section:
```ruby
# Disable all components except Patroni and Consul
roles(['patroni_role'])
# Disable all components except Patroni, PgBouncer and Consul
roles(['patroni_role','pgbouncer_role'])
# PostgreSQL configuration
postgresql['listen_address']='0.0.0.0'
...
...
@@ -883,6 +899,15 @@ in the second step, do not supply the `EXTERNAL_URL` value.