Skip to content

Redis Sentinel support for gitlab-shell

To fully support Redis Sentinel effort in GitLab: gitlab-org/gitlab-ce#3355 we need to make a few changes in gitlab.yml for gitlab-shell as described here: gitlab-shell#29 (closed).


Following gitlab's resque.yml syntax, for config.yml we are going to add a sentinelskey in redis:

# Redis settings used for pushing commit notices to gitlab
redis:
  bin: /usr/bin/redis-cli
  # host: 127.0.0.1
  # port: 6379
  # pass: redispass # Allows you to specify the password for Redis
  database: 0
  socket: /var/run/redis/redis.sock # Comment out this line if you want to use TCP or Sentinels
  namespace: resque:gitlab
  sentinels: 
    -
      host: localhost
      port: 26380 # point to sentinel, not to redis port
    -
      host: slave2
      port: 26381 # point to sentinel, not to redis port

Checklist:

  • config.yml includes sentinels itens
  • config.yml sentinel is only enabled when host / port is available
  • config.yml when sentinel is enabled no socket is defined