Commit 41313ee9 authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'docs/use-roles-for-postgres-ha' into 'master'

Replace explicit service configuration with roles

Closes omnibus-gitlab#2952

See merge request gitlab-org/gitlab-ee!3742
parents 3bb07c40 e485f737
...@@ -217,19 +217,8 @@ On each Consul node perform the following: ...@@ -217,19 +217,8 @@ On each Consul node perform the following:
```ruby ```ruby
# Disable all components except Consul # Disable all components except Consul
bootstrap['enable'] = false roles ['consul_role']
gitlab_rails['auto_migrate'] = false
gitaly['enable'] = false
gitlab_workhorse['enable'] = false
mailroom['enable'] = false
nginx['enable'] = false
postgresql['enable'] = false
redis['enable'] = false
sidekiq['enable'] = false
prometheus['enable'] = false
unicorn['enable'] = false
consul['enable'] = true
# START user configuration # START user configuration
# Replace placeholders: # Replace placeholders:
# #
...@@ -243,6 +232,8 @@ On each Consul node perform the following: ...@@ -243,6 +232,8 @@ On each Consul node perform the following:
# END user configuration # END user configuration
``` ```
> `consul_role` was introduced with GitLab 10.3
1. [Reconfigure GitLab] for the changes to take effect. 1. [Reconfigure GitLab] for the changes to take effect.
#### Consul Checkpoint #### Consul Checkpoint
...@@ -276,19 +267,7 @@ On each database node perform the following: ...@@ -276,19 +267,7 @@ On each database node perform the following:
```ruby ```ruby
# Disable all components except PostgreSQL and Repmgr and Consul # Disable all components except PostgreSQL and Repmgr and Consul
bootstrap['enable'] = false roles ['postgres_role']
gitaly['enable'] = false
mailroom['enable'] = false
nginx['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
redis['enable'] = false
gitlab_workhorse['enable'] = false
prometheus_monitoring['enable'] = false
repmgr['enable'] = true
postgresql['enable'] = true
consul['enable'] = true
# PostgreSQL configuration # PostgreSQL configuration
postgresql['listen_address'] = '0.0.0.0' postgresql['listen_address'] = '0.0.0.0'
...@@ -327,6 +306,8 @@ On each database node perform the following: ...@@ -327,6 +306,8 @@ On each database node perform the following:
# END user configuration # END user configuration
``` ```
> `postgres_role` was introduced with GitLab 10.3
1. [Reconfigure GitLab] for the changes to take effect. 1. [Reconfigure GitLab] for the changes to take effect.
> Please note: > Please note:
...@@ -449,20 +430,7 @@ If the 'Role' column for any node says "FAILED", check the ...@@ -449,20 +430,7 @@ If the 'Role' column for any node says "FAILED", check the
```ruby ```ruby
# Disable all components except Pgbouncer and Consul agent # Disable all components except Pgbouncer and Consul agent
bootstrap['enable'] = false roles ['pgbouncer_role']
gitaly['enable'] = false
mailroom['enable'] = false
nginx['enable'] = false
redis['enable'] = false
prometheus['enable'] = false
postgresql['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
gitlab_rails['auto_migrate'] = false
pgbouncer['enable'] = true
consul['enable'] = true
# Configure Pgbouncer # Configure Pgbouncer
pgbouncer['admin_users'] = %w(pgbouncer gitlab-consul) pgbouncer['admin_users'] = %w(pgbouncer gitlab-consul)
...@@ -493,6 +461,8 @@ If the 'Role' column for any node says "FAILED", check the ...@@ -493,6 +461,8 @@ If the 'Role' column for any node says "FAILED", check the
# END user configuration # END user configuration
``` ```
> `pgbouncer_role` was introduced with GitLab 10.3
1. [Reconfigure GitLab] for the changes to take effect. 1. [Reconfigure GitLab] for the changes to take effect.
1. Create a `.pgpass` file so Consule is able to 1. Create a `.pgpass` file so Consule is able to
...@@ -603,19 +573,8 @@ On each server edit `/etc/gitlab/gitlab.rb`: ...@@ -603,19 +573,8 @@ On each server edit `/etc/gitlab/gitlab.rb`:
```ruby ```ruby
# Disable all components except Consul # Disable all components except Consul
bootstrap['enable'] = false roles ['consul_role']
gitlab_rails['auto_migrate'] = false
gitaly['enable'] = false
gitlab_workhorse['enable'] = false
mailroom['enable'] = false
nginx['enable'] = false
postgresql['enable'] = false
redis['enable'] = false
sidekiq['enable'] = false
prometheus['enable'] = false
unicorn['enable'] = false
consul['enable'] = true
consul['configuration'] = { consul['configuration'] = {
server: true, server: true,
retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13) retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13)
...@@ -630,19 +589,7 @@ On each server edit `/etc/gitlab/gitlab.rb`: ...@@ -630,19 +589,7 @@ On each server edit `/etc/gitlab/gitlab.rb`:
```ruby ```ruby
# Disable all components except PostgreSQL and Repmgr and Consul # Disable all components except PostgreSQL and Repmgr and Consul
bootstrap['enable'] = false roles ['postgres_role']
gitaly['enable'] = false
mailroom['enable'] = false
nginx['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
redis['enable'] = false
gitlab_workhorse['enable'] = false
prometheus_monitoring['enable'] = false
repmgr['enable'] = true
postgresql['enable'] = true
consul['enable'] = true
# PostgreSQL configuration # PostgreSQL configuration
postgresql['listen_address'] = '0.0.0.0' postgresql['listen_address'] = '0.0.0.0'
...@@ -782,19 +729,7 @@ On each server edit `/etc/gitlab/gitlab.rb`: ...@@ -782,19 +729,7 @@ On each server edit `/etc/gitlab/gitlab.rb`:
```ruby ```ruby
# Disable all components except PostgreSQL, Repmgr, and Consul # Disable all components except PostgreSQL, Repmgr, and Consul
bootstrap['enable'] = false roles ['postgres_role']
gitaly['enable'] = false
mailroom['enable'] = false
nginx['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
redis['enable'] = false
gitlab_workhorse['enable'] = false
prometheus_monitoring['enable'] = false
repmgr['enable'] = true
postgresql['enable'] = true
consul['enable'] = true
# PostgreSQL configuration # PostgreSQL configuration
postgresql['listen_address'] = '0.0.0.0' postgresql['listen_address'] = '0.0.0.0'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment