From f7e6986724910b10f074f44bf0deb3b15ced7a0e Mon Sep 17 00:00:00 2001 From: Sean Marcia Date: Tue, 17 Sep 2013 10:47:50 -0400 Subject: [PATCH 1/2] Updated the Sidekiq readme. --- cookbooks/sidekiq/readme.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/cookbooks/sidekiq/readme.md b/cookbooks/sidekiq/readme.md index 5f0525c2..c18a9f6b 100644 --- a/cookbooks/sidekiq/readme.md +++ b/cookbooks/sidekiq/readme.md @@ -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 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: @@ -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 create 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://", :namespace => 'sidekiq' } +end + +Sidekiq.configure_client do |config| + config.redis = { :url => "redis://", :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`: From b7ff223c204dca44361f2ca884b5a3645c3d8f74 Mon Sep 17 00:00:00 2001 From: Sean Marcia Date: Tue, 17 Sep 2013 11:24:09 -0400 Subject: [PATCH 2/2] Updated the Sidekiq readme to fix a typo as well as to note that creating a utility instance is the preferred method. --- cookbooks/sidekiq/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/sidekiq/readme.md b/cookbooks/sidekiq/readme.md index c18a9f6b..d893601e 100644 --- a/cookbooks/sidekiq/readme.md +++ b/cookbooks/sidekiq/readme.md @@ -8,7 +8,7 @@ https://github.com/mperham/sidekiq ## Requirements -Sidekiq requires requires that Redis be installed and assumes it is located at `localhost:6379`. To install redis, add the following to your gemfile: +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' @@ -65,7 +65,7 @@ If you wish to have more than one sidekiq utility instance, you can name them `s ## Multi Instance Deploys -By default engineyard will install Redis to your DB instance and if you wish to keep it there rather than create 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: +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|