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
92e60372
Commit
92e60372
authored
Oct 29, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed documentation and added redis/sentinel roles instruction
parent
1dcbff1c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
14 deletions
+54
-14
doc/administration/high_availability/redis.md
doc/administration/high_availability/redis.md
+54
-14
No files found.
doc/administration/high_availability/redis.md
View file @
92e60372
...
@@ -235,7 +235,7 @@ In `/etc/gitlab/gitlab.rb`:
...
@@ -235,7 +235,7 @@ In `/etc/gitlab/gitlab.rb`:
## Redis TCP support (will disable UNIX socket transport)
## Redis TCP support (will disable UNIX socket transport)
redis
[
'bind'
]
=
'0.0.0.0'
# or specify an IP to bind to a single one
redis
[
'bind'
]
=
'0.0.0.0'
# or specify an IP to bind to a single one
redis
[
'port'
]
=
6379
redis
[
'port'
]
=
6379
redis
[
'
requirepass
'
]
=
'redis-password-goes-here'
redis
[
'
password
'
]
=
'redis-password-goes-here'
redis
[
'master_password'
]
=
'redis-password-goes-here'
redis
[
'master_password'
]
=
'redis-password-goes-here'
```
```
...
@@ -249,7 +249,7 @@ with an additional `Slave` section as in the example below:
...
@@ -249,7 +249,7 @@ with an additional `Slave` section as in the example below:
```
ruby
```
ruby
redis
[
'bind'
]
=
'0.0.0.0'
# or specify an IP to bind to a single one
redis
[
'bind'
]
=
'0.0.0.0'
# or specify an IP to bind to a single one
redis
[
'port'
]
=
6379
redis
[
'port'
]
=
6379
redis
[
'
requirepass
'
]
=
'redis-password-goes-here'
redis
[
'
password
'
]
=
'redis-password-goes-here'
redis
[
'master_password'
]
=
'redis-password-goes-here'
redis
[
'master_password'
]
=
'redis-password-goes-here'
## Slave redis instance
## Slave redis instance
...
@@ -327,27 +327,25 @@ To setup sentinel, you edit `/etc/gitlab/gitlab.rb` file:
...
@@ -327,27 +327,25 @@ To setup sentinel, you edit `/etc/gitlab/gitlab.rb` file:
```
ruby
```
ruby
## When you install Sentinel in a separate machine, you need to control which
## When you install Sentinel in a separate machine, you need to control which
## other services will be running in it.
Take a look at the following variables
## other services will be running in it.
##
and enable or disable whenever it fits your strategy
:
##
We've simplified the choice using special "roles" settings
:
## Enabled
Redis and Sentinel
services
## Enabled
Sentinel and Redis Master
services
redis
[
'enable'
]
=
true
redis
_sentinel_role
[
'enable'
]
=
true
sentinel
[
'enable'
]
=
true
redis_master_role
[
'enable'
]
=
true
# Disabled all other services
## Enabled Sentinel and Redis Slave services
bootstrap
[
'enable'
]
=
false
redis_sentinel_role
[
'enable'
]
=
true
nginx
[
'enable'
]
=
false
redis_master_role
[
'enable'
]
=
true
postgresql
[
'enable'
]
=
false
gitlab_rails
[
'enable'
]
=
false
mailroom
[
'enable'
]
=
false
## Configure Redis
## Configure Redis
redis
[
'master_name'
]
=
'gitlab-redis'
# must be the same in every sentinel node
redis
[
'master_name'
]
=
'gitlab-redis'
# must be the same in every sentinel node
redis
[
'master_ip'
]
=
'10.0.0.1'
# ip of the initial master redis instance
redis
[
'master_ip'
]
=
'10.0.0.1'
# ip of the initial master redis instance
redis
[
'master_port'
]
=
6379
# port of the initial master redis instance
redis
[
'master_port'
]
=
6379
# port of the initial master redis instance
redis
[
'master_password'
]
=
'
your-secure-password
-here'
# the same value defined in redis['password'] in the master instance
redis
[
'master_password'
]
=
'
redis-password-goes
-here'
# the same value defined in redis['password'] in the master instance
## Configure Sentinel
## Configure Sentinel
sentinel
[
'bind'
]
=
'0.0.0.0'
# or specify an IP to bind to a single one
# sentinel['port'] = 26379 # uncomment to change default port
# sentinel['port'] = 26379 # uncomment to change default port
## Quorum must reflect the amount of voting sentinels it take to start a failover.
## Quorum must reflect the amount of voting sentinels it take to start a failover.
...
@@ -388,6 +386,48 @@ sentinel['quorum'] = 2
...
@@ -388,6 +386,48 @@ sentinel['quorum'] = 2
# sentinel['failover_timeout'] = 60000
# sentinel['failover_timeout'] = 60000
```
```
In the example above we've used
`redis_sentinel_role`
and
`redis_master_role`
which simplify the ammount of configuration changes.
If you want more control, here is what each one sets for you automatically
when enabled:
```
ruby
## Redis Sentinel Role
redis_sentinel_role
[
'enable'
]
=
true
# When Sentinel Role is enabled, the following services are enabled/disabled:
sentinel
[
'enable'
]
=
true
# This others are disabled:
redis
[
'enable'
]
=
false
bootstrap
[
'enable'
]
=
false
nginx
[
'enable'
]
=
false
postgresql
[
'enable'
]
=
false
gitlab_rails
[
'enable'
]
=
false
mailroom
[
'enable'
]
=
false
## Redis master/slave Role:
redis_master_role
[
'enable'
]
=
true
# enable only one of them
redis_slave_role
[
'enable'
]
=
true
# enable only one of them
# When Redis Master or Slave role are enabled, the following services are enabled/disabled:
# (Note that if redis and sentinel roles are combined both services will be enabled)
# When Sentinel Role is enabled, the following services are enabled/disabled:
redis
[
'enable'
]
=
true
# This others are disabled:
sentinel
[
'enable'
]
=
false
bootstrap
[
'enable'
]
=
false
nginx
[
'enable'
]
=
false
postgresql
[
'enable'
]
=
false
gitlab_rails
[
'enable'
]
=
false
mailroom
[
'enable'
]
=
false
# Redis Slave role also change this setting from default 'true' to 'false':
redis
[
'master'
]
=
false
```
---
---
The final part is to inform the main GitLab application server of the Redis
The final part is to inform the main GitLab application server of the Redis
...
...
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