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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
d9e8bb4b
Commit
d9e8bb4b
authored
Apr 20, 2018
by
Stan Hu
Committed by
Marin Jankovski
Apr 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation on how to configure Redis Sentinel by persistent class
parent
6d2c7cbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
doc/administration/high_availability/redis.md
doc/administration/high_availability/redis.md
+41
-0
No files found.
doc/administration/high_availability/redis.md
View file @
d9e8bb4b
...
@@ -650,6 +650,47 @@ gitlab_rails['redis_sentinels'] = [
...
@@ -650,6 +650,47 @@ gitlab_rails['redis_sentinels'] = [
Omnibus GitLab configures some things behind the curtains to make the sysadmins'
Omnibus GitLab configures some things behind the curtains to make the sysadmins'
lives easier. If you want to know what happens underneath keep reading.
lives easier. If you want to know what happens underneath keep reading.
### Running multiple Redis clusters
GitLab supports running
[
separate Redis clusters for different persistent
classes
](
https://docs.gitlab.com/omnibus/settings/redis.html#running-with-multiple-redis-instances
)
:
cache, queues, and shared_state. To make this work with Sentinel:
1.
Set the appropriate variable in
`/etc/gitlab/gitlab.rb`
for each instance you are using:
```ruby
gitlab_rails['redis_cache_instance'] = REDIS_CACHE_URL
gitlab_rails['redis_queues_instance'] = REDIS_QUEUES_URL
gitlab_rails['redis_shared_state_instance'] = REDIS_SHARED_STATE_URL
```
**Note**: Redis URLs should be in the format: `redis://:PASSWORD@SENTINEL_MASTER_NAME`
1. PASSWORD is the plaintext password for the Redis instance
2. SENTINEL_MASTER_NAME is the Sentinel master name (e.g. `gitlab-redis-cache`)
1.
Include an array of hashes with host/port combinations, such as the following:
```ruby
gitlab_rails['redis_cache_sentinels'] = [
{ host: REDIS_CACHE_SENTINEL_HOST, port: PORT1 },
{ host: REDIS_CACHE_SENTINEL_HOST2, port: PORT2 }
]
gitlab_rails['redis_queues_sentinels'] = [
{ host: REDIS_QUEUES_SENTINEL_HOST, port: PORT1 },
{ host: REDIS_QUEUES_SENTINEL_HOST2, port: PORT2 }
]
gitlab_rails['redis_shared_state_sentinels'] = [
{ host: SHARED_STATE_SENTINEL_HOST, port: PORT1 },
{ host: SHARED_STATE_SENTINEL_HOST2, port: PORT2 }
]
```
1.
Note that for each persistence class, GitLab will default to using the
configuration specified in
`gitlab_rails['redis_sentinels']`
unless
overriden by the settings above.
1.
Be sure to include BOTH configuration options for each persistent classes. For example,
if you choose to configure a cache instance, you must specify both
`gitlab_rails['redis_cache_instance']`
and
`gitlab_rails['redis_cache_sentinels']`
for GitLab to generate the proper configuration files.
1.
Run
`gitlab-ctl reconfigure`
### Control running services
### Control running services
In the previous example, we've used
`redis_sentinel_role`
and
In the previous example, we've used
`redis_sentinel_role`
and
...
...
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