Commit 8603c426 authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'docs-add-redis-ha-roles' into 'master'

Update docs to show use of high availability redis and sentinel roles

See merge request gitlab-org/gitlab-ee!3452
parents b0aca019 163d2c4d
...@@ -268,10 +268,9 @@ The prerequisites for a HA Redis setup are the following: ...@@ -268,10 +268,9 @@ The prerequisites for a HA Redis setup are the following:
1. Edit `/etc/gitlab/gitlab.rb` and add the contents: 1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
```ruby ```ruby
# Enable the master role and disable all other services in the machine # Specify server role as 'redis_master_role'
# (you can still enable Sentinel). roles ['redis_master_role']
redis_master_role['enable'] = true
# IP address pointing to a local IP that the other machines can reach to. # IP address pointing to a local IP that the other machines can reach to.
# You can also set bind to '0.0.0.0' which listen in all interfaces. # You can also set bind to '0.0.0.0' which listen in all interfaces.
# If you really need to bind to an external accessible IP, make # If you really need to bind to an external accessible IP, make
...@@ -285,6 +284,7 @@ The prerequisites for a HA Redis setup are the following: ...@@ -285,6 +284,7 @@ The prerequisites for a HA Redis setup are the following:
# Set up password authentication for Redis (use the same password in all nodes). # Set up password authentication for Redis (use the same password in all nodes).
redis['password'] = 'redis-password-goes-here' redis['password'] = 'redis-password-goes-here'
``` ```
1. Only the primary GitLab application server should handle migrations. To 1. Only the primary GitLab application server should handle migrations. To
prevent database migrations from running on upgrade, add the following prevent database migrations from running on upgrade, add the following
...@@ -296,6 +296,10 @@ The prerequisites for a HA Redis setup are the following: ...@@ -296,6 +296,10 @@ The prerequisites for a HA Redis setup are the following:
1. [Reconfigure Omnibus GitLab][reconfigure] for the changes to take effect. 1. [Reconfigure Omnibus GitLab][reconfigure] for the changes to take effect.
> Note: You can specify multiple roles like sentinel and redis as:
> roles ['redis_sentinel_role', 'redis_master_role']. Read more about high
> availability roles at https://docs.gitlab.com/omnibus/roles/
### Step 2. Configuring the slave Redis instances ### Step 2. Configuring the slave Redis instances
1. SSH into the **slave** Redis server. 1. SSH into the **slave** Redis server.
...@@ -308,11 +312,9 @@ The prerequisites for a HA Redis setup are the following: ...@@ -308,11 +312,9 @@ The prerequisites for a HA Redis setup are the following:
1. Edit `/etc/gitlab/gitlab.rb` and add the contents: 1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
```ruby ```ruby
# Enable the slave role and disable all other services in the machine # Specify server role as 'redis_slave_role'
# (you can still enable Sentinel). This will also set automatically roles ['redis_slave_role']
# `redis['master'] = false`.
redis_slave_role['enable'] = true
# IP address pointing to a local IP that the other machines can reach to. # IP address pointing to a local IP that the other machines can reach to.
# You can also set bind to '0.0.0.0' which listen in all interfaces. # You can also set bind to '0.0.0.0' which listen in all interfaces.
# If you really need to bind to an external accessible IP, make # If you really need to bind to an external accessible IP, make
...@@ -345,6 +347,10 @@ The prerequisites for a HA Redis setup are the following: ...@@ -345,6 +347,10 @@ The prerequisites for a HA Redis setup are the following:
1. [Reconfigure Omnibus GitLab][reconfigure] for the changes to take effect. 1. [Reconfigure Omnibus GitLab][reconfigure] for the changes to take effect.
1. Go through the steps again for all the other slave nodes. 1. Go through the steps again for all the other slave nodes.
> Note: You can specify multiple roles like sentinel and redis as:
> roles ['redis_sentinel_role', 'redis_slave_role']. Read more about high
> availability roles at https://docs.gitlab.com/omnibus/roles/
--- ---
These values don't have to be changed again in `/etc/gitlab/gitlab.rb` after These values don't have to be changed again in `/etc/gitlab/gitlab.rb` after
...@@ -392,7 +398,7 @@ multiple machines with the Sentinel daemon. ...@@ -392,7 +398,7 @@ multiple machines with the Sentinel daemon.
be duplicate below): be duplicate below):
```ruby ```ruby
redis_sentinel_role['enable'] = true roles ['redis_sentinel_role']
# Must be the same in every sentinel node # Must be the same in every sentinel node
redis['master_name'] = 'gitlab-redis' redis['master_name'] = 'gitlab-redis'
......
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