Chef cookbook for sidekiq.
Tested on chef 11
- Debian 7+
- Ubuntu 13.10+
The following cookbooks are required:
This generates a sidekiq configuration and creates a runit service. This cookbooks expects that you are deploying with capistrano, but should be flexible enough to tune for whatever you need.
- :create create a named sidekiq configuration, and service.
- :delete disable a named sidekiq service, and deletes the sidekiq directory.
sidekiq 'example.com' do
concurrency 2
processes 2
queues 'job-queue' => 5, 'other-queue' => 1
end
sidekiq 'example.com' do
concurrency 2
processes 2
queues 'job-queue' => 5, 'other-queue' => 1
directory '/srv/www/myapp'
sidekiq_dir '/srv/www/myapp/sidekiq'
end
sidekiq 'example.com' do
action :delete
end
Attribute | Description | Default Value |
---|---|---|
name | Name attribute: The name of the sidekiq instance. | nil |
queues | A hash of sidekiq queues | nil |
verbose | Should the sidekiq daemon be verbose, useful for debugging. | false |
concurrency | Number of concurrent sidekiq processes | 25 |
processes | The number of processes | 1 |
timeout | Timeout for sidekiq jobs, in seconds | 30 |
rails_env | Your rails environment | production |
bundle_exec | Should bundle exec be used to start sidekiq | true |
logrotate | Enables log rotation with logrotate | true |
owner | The user of the sidekiq process | www-data |
group | The group of the sidekiq process | www-data |
Find a bug? Want a feature? Submit an issue here. Patches welcome!
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write you change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
- Authors:: Greg Fitzgerald (greg@gregf.org)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.