Skip to content

Commit

Permalink
Merge pull request engineyard#129 from seanmarcia/master
Browse files Browse the repository at this point in the history
Updated the Sidekiq readme.
  • Loading branch information
radamanthus authored Sep 13, 2016
2 parents 0c1d308 + b7ff223 commit a93a465
Showing 1 changed file with 31 additions and 0 deletions.
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, name the sidekiq utility instances as "sidekiq" and also set the `utility_name` 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. This is needed to ensure the Sidekiq workers are running the latest version of the application.
Expand Down

0 comments on commit a93a465

Please sign in to comment.