gitlab: Setup sidekiq service
authorKirill Smelkov <kirr@nexedi.com>
Fri, 8 Jan 2016 09:23:55 +0000 (12:23 +0300)
committerKirill Smelkov <kirr@nexedi.com>
Sun, 17 Jan 2016 21:39:30 +0000 (00:39 +0300)
commit4c127fddf6fac74dd5b0ead5fd3925f912930cc2
treeee32a878f7e9918ed07512fed82fb2563b45270b
parent76e371cd824ff4168e29a9bb858fa0b403c1c1ee
gitlab: Setup sidekiq service

Sidekiq[1] is used in GitLab as background jobs manager - i.e. if a
request handler needs to spawn some non-light job - it adds it to
sidekiq queue (in Redis) and relies on sidekiq service to later pick
this job up and execute it.

The service is setup with just to run bin/gitlab-sidekiq with
appropriate queues (extracted from omnibus-gitlab) and appropriate
settings to controlling GitLab's sidekiq Out-Of-Memory killer[2].

NOTE Unlike unicorn OOM killer, Sidekiq memory killer just makes sidekiq
    processes to be SIGKILL terminated and relies on managing service to
    restart it. In slapos we don't have mechanism to set autorestart=true,
    nor bang/watchdog currently work with slapproxy, so we setup to do
    such monitoring ourselves manually with here-introduced
    watcher-sigkill program.

NOTE2 sidekiq promise, because it is rake/gitlab based, is slow to
    load/run and thus is put into etc/promise.slow/

[1] http://sidekiq.org/
[2] https://gitlab.com/gitlab-org/gitlab-ce/blob/1322bd78/doc/operations/sidekiq_memory_killer.md

/cc @kazuhiko, @jerome
software/gitlab/gitlab-parameters.cfg
software/gitlab/instance-gitlab.cfg.in
software/gitlab/instance.cfg.in
software/gitlab/software.cfg
software/gitlab/watcher-sigkill.in [new file with mode: 0644]