Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions cookbooks/sidekiq/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ Sidekiq is a simple, efficient message processing for Ruby that uses threads to

https://github.com/mperham/sidekiq

## Requirements

Sidekiq requires that Redis be installed and assumes it is located at `localhost:6379`. To install redis, add the following to your gemfile:

```
gem 'redis'
```

Then to install it into your environment uncomment the following line in `main/recipes/default.rb`:

```
include_recipe "redis"
```

## Usage

First ensure that you have Sidekiq working in your development environment by following the Sidekiq "Getting Started" guide:
Expand Down Expand Up @@ -49,6 +63,23 @@ By default, the recipe will install Sidekiq on to a utility instance with the na

If you wish to have more than one sidekiq utility instance, you can name them `sidekiq_1`, `sidekiq_2`, etc, given the `utility_name` is set to `sidekiq`.

## Multi Instance Deploys

By default engineyard will install Redis to your DB instance and if you wish to keep it there rather than the preferred method of creating a utility instance you will need to tell Sidekiq where to find Redis. You can do this by adding a Sidekiq intializer in `config/initializers/sidekiq.rb` with the following information:

```
Sidekiq.configure_server do |config|
config.redis = { :url => "redis://<your_db_server>", :namespace => 'sidekiq' }
end

Sidekiq.configure_client do |config|
config.redis = { :url => "redis://<your_db_server>", :namespace => 'sidekiq' }
end
```

More information on setting the location of your server can be found at:
https://github.com/mperham/sidekiq/wiki/Advanced-Options

## Deploy Hooks

You will need to add a deploy hook to restart Sidekiq during deploys. Add the following to `deploy/after_restart.rb`:
Expand Down