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
Jérome Perrin
gitlab-ce
Commits
178d5ae9
Commit
178d5ae9
authored
Nov 16, 2016
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rearrange Redis HA source installations sections
parent
a75c5f19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
24 deletions
+33
-24
doc/administration/high_availability/redis_source.md
doc/administration/high_availability/redis_source.md
+33
-24
No files found.
doc/administration/high_availability/redis_source.md
View file @
178d5ae9
# Configuring
Redis for GitLab HA (Source Install)
# Configuring
non-Omnibus Redis for GitLab HA
We highly recommend that you use Omnibus GitLab packages, as we can optimize
This is the documentation for configuring a Highly Available Redis setup when
required packages specifically for GitLab, and we will take care of upgrading
you have installed Redis all by yourself and not using the bundled one that
comes with the Omnibus packages.
We cannot stress enough the importance of reading the
[
Overview section
](
redis.md#overview
)
of the Omnibus Redis HA as it provides
some invaluable information to the configuration of Redis. Please proceed to
read it before going forward with this guide.
We also highly recommend that you use the Omnibus GitLab packages, as we
optimize them specifically for GitLab, and we will take care of upgrading Redis
to the latest supported version.
to the latest supported version.
If you
are building packages for a specific distro, or trying to build some
If you
're not sure whether this guide is for you, please refer to
internal automation, you can check this documentation to learn about the
[
Available configuration setups
](
redis.md#available-configuration-setups
)
in
minimal setup, required changes, etc
.
the Omnibus Redis HA documentation
.
If you want to see the documentation for Omnibus GitLab Install, please
---
[
read it here
](
redis.md
)
.
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**
**Table of Contents**
-
[
Configur
e your own Redis server
](
#configure
-your-own-redis-server
)
-
[
Configur
ing your own Redis server
](
#configuring
-your-own-redis-server
)
-
[
Configuring Master Redis instance
](
#configuring
-master-redis-instance
)
-
[
Step 1. Configuring the master Redis instance
](
#step-1-configuring-the
-master-redis-instance
)
-
[
Configuring Slave Redis instances
](
#configuring
-slave-redis-instances
)
-
[
Step 2. Configuring the slave Redis instances
](
#step-2-configuring-the
-slave-redis-instances
)
-
[
Configuring Redis Sentinel instances
](
#configuring
-redis-sentinel-instances
)
-
[
Step 3. Configuring the Redis Sentinel instances
](
#step-3-configuring-the
-redis-sentinel-instances
)
-
[
GitLab setup
](
#gitlab-setup
)
-
[
Step 4. Configuring the GitLab application
](
#step-4-configuring-the-gitlab-application
)
-
[
Example
configurations
](
#example-configuration
s
)
-
[
Example
of minimal configuration with 1 master, 2 slaves and 3 Sentinels
](
#example-of-minimal-configuration-with-1-master-2-slaves-and-3-sentinel
s
)
-
[
Configuring Redis Master
](
#configuring-redis-master
)
-
[
Configuring Redis Master
](
#configuring-redis-master
)
-
[
Configuring Redis Slaves
](
#configuring-redis-slaves
)
-
[
Configuring Redis Slaves
](
#configuring-redis-slaves
)
-
[
Configuring Redis Sentinel
](
#configuring-redis-sentinel
)
-
[
Configuring Redis Sentinel
](
#configuring-redis-sentinel
)
...
@@ -28,7 +36,7 @@ If you want to see the documentation for Omnibus GitLab Install, please
...
@@ -28,7 +36,7 @@ If you want to see the documentation for Omnibus GitLab Install, please
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Configur
e
your own Redis server
## Configur
ing
your own Redis server
Redis server must be configured to use TCP connection instead of socket,
Redis server must be configured to use TCP connection instead of socket,
and since Redis
`3.2`
, you must define a password to receive external
and since Redis
`3.2`
, you must define a password to receive external
...
@@ -41,8 +49,7 @@ To configure Redis to use TCP connection you need to define both
...
@@ -41,8 +49,7 @@ To configure Redis to use TCP connection you need to define both
`bind`
and
`port`
. You can bind to all interfaces (
`0.0.0.0`
) or specify the
`bind`
and
`port`
. You can bind to all interfaces (
`0.0.0.0`
) or specify the
IP of the desired interface (for ex. one from an internal network).
IP of the desired interface (for ex. one from an internal network).
### Step 1. Configuring the master Redis instance
### Configuring Master Redis instance
You need to make the following changes in
`redis.conf`
:
You need to make the following changes in
`redis.conf`
:
...
@@ -61,7 +68,7 @@ You need to make the following changes in `redis.conf`:
...
@@ -61,7 +68,7 @@ You need to make the following changes in `redis.conf`:
See
[
example configuration
](
#configuring-redis-master
)
below.
See
[
example configuration
](
#configuring-redis-master
)
below.
###
Configuring S
lave Redis instances
###
Step 2. Configuring the s
lave Redis instances
1.
Follow same instructions for Redis Master
1.
Follow same instructions for Redis Master
...
@@ -71,7 +78,7 @@ See [example configuration](#configuring-redis-master) below.
...
@@ -71,7 +78,7 @@ See [example configuration](#configuring-redis-master) below.
See
[
example configuration
](
#configuring-redis-slaves
)
below.
See
[
example configuration
](
#configuring-redis-slaves
)
below.
###
Configuring
Redis Sentinel instances
###
Step 3. Configuring the
Redis Sentinel instances
Sentinel is a special type of Redis server. It inherits most of the basic
Sentinel is a special type of Redis server. It inherits most of the basic
configuration options you can define in
`redis.conf`
, with specific ones
configuration options you can define in
`redis.conf`
, with specific ones
...
@@ -122,7 +129,7 @@ And the sentinel specific ones:
...
@@ -122,7 +129,7 @@ And the sentinel specific ones:
See
[
example configuration
](
#configuring-redis-sentinel
)
below.
See
[
example configuration
](
#configuring-redis-sentinel
)
below.
##
GitLab setup
##
# Step 4. Configuring the GitLab application
You can enable or disable Sentinel support at any time in new or existing
You can enable or disable Sentinel support at any time in new or existing
installations. From the GitLab application perspective, all it requires is
installations. From the GitLab application perspective, all it requires is
...
@@ -141,7 +148,7 @@ which ideally should not have Redis or Sentinels in the same machine for a HA se
...
@@ -141,7 +148,7 @@ which ideally should not have Redis or Sentinels in the same machine for a HA se
1.
Restart GitLab for the changes to take effect.
1.
Restart GitLab for the changes to take effect.
## Example
configuration
s
## Example
of minimal configuration with 1 master, 2 slaves and 3 Sentinel
s
In this example we consider that all servers have an internal network
In this example we consider that all servers have an internal network
interface with IPs in the
`10.0.0.x`
range, and that they can connect
interface with IPs in the
`10.0.0.x`
range, and that they can connect
...
@@ -247,12 +254,13 @@ sentinel failover_timeout 30000
...
@@ -247,12 +254,13 @@ sentinel failover_timeout 30000
## Troubleshooting
## Troubleshooting
We have a more detailed
[
Troubleshooting
](
redis.md#troubleshooting
)
explained in the documentation for Omnibus
We have a more detailed
[
Troubleshooting
](
redis.md#troubleshooting
)
explained
Install. Here we will list only the things that are specific to a
**Source**
install.
in the documentation for Omnibus GitLab installations. Here we will list only
the things that are specific to a source installation.
If you get an error in GitLab like:
`Redis::CannotConnectError: No sentinels available.`
,
If you get an error in GitLab like:
`Redis::CannotConnectError: No sentinels available.`
,
there may be something wrong with your configuration files or it can be related
there may be something wrong with your configuration files or it can be related
to
[
this issue
][
gh-531
]
.
to
[
this
upstream
issue
][
gh-531
]
.
It's a bit non-intuitive the way you have to config
`resque.yml`
and
It's a bit non-intuitive the way you have to config
`resque.yml`
and
`sentinel.conf`
, otherwise
`redis-rb`
will not work properly.
`sentinel.conf`
, otherwise
`redis-rb`
will not work properly.
...
@@ -287,3 +295,4 @@ production:
...
@@ -287,3 +295,4 @@ production:
When in doubt, please read
[
Redis Sentinel documentation
](
http://redis.io/topics/sentinel
)
When in doubt, please read
[
Redis Sentinel documentation
](
http://redis.io/topics/sentinel
)
[
gh-531
]:
https://github.com/redis/redis-rb/issues/531
[
gh-531
]:
https://github.com/redis/redis-rb/issues/531
[
downloads
]:
https://about.gitlab.com/downloads
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