The Omnibus GitLab package can be used to configure a standalone Redis server. In this configuration, Redis is not scaled, and represents a single point of failure. However, in a scaled environment the objective is to allow the environment to handle more users or to increase throughput. Redis itself is generally stable and can handle many requests, so it is an acceptable trade off to have only a single instance. See the reference architectures page for an overview of GitLab scaling options.
The steps below are the minimum necessary to configure a Redis server with Omnibus GitLab:
- SSH into the Redis server.
Download and install the Omnibus GitLab package you want by using steps 1 and 2 from the GitLab downloads page. Do not complete any other steps on the download page.
/etc/gitlab/gitlab.rband add the contents:
## Enable Redis and disable all other services ## https://docs.gitlab.com/omnibus/roles/ roles ['redis_master_role'] ## Redis configuration redis['bind'] = '0.0.0.0' redis['port'] = 6379 redis['password'] = '<redis_password>' ## Disable automatic database migrations ## Only the primary GitLab application server should handle migrations gitlab_rails['auto_migrate'] = false
- Reconfigure Omnibus GitLab for the changes to take effect.
- Note the Redis node’s IP address or hostname, port, and Redis password. These will be necessary when configuring the GitLab application servers.
Advanced configuration options are supported and can be added if needed.
On the instance where GitLab is installed:
/etc/gitlab/gitlab.rbfile and add the following contents:
## Disable Redis redis['enable'] = false gitlab_rails['redis_host'] = 'redis.example.com' gitlab_rails['redis_port'] = 6379 ## Required if Redis authentication is configured on the Redis node gitlab_rails['redis_password'] = '<redis_password>'
Save your changes to
Reconfigure Omnibus GitLab for the changes to take effect.
See the Redis troubleshooting guide.