1

I want to have a separate instance for running Sidekiq in my production environment.

Currently I have db, web and app instances and the app instance is taking care of sidekiq which is proving to be a wrong move.

I created a new instance with roles redis, redis_master and sidekiq but then when I SSH into it there is nothing running and if I do a cap deploy to it, during bundle install it says "dotenv" is only for instances with role app and it rolled back.

How do I set things up? Do I need to add app role to the Sidekiq instance for it to work?

EDIT: Okay I've made it work by adding the app role to instance running sidekiq. Also I removed the passenger and apache roles from it manually so it does not start an app server. The only problem Im facing now is the fact that rubber is not automatically starting and stopping and restarting sidekiq during deploys. Need to figure that out.

Looking good though.

Steve Robinson
  • 3,759
  • 3
  • 36
  • 57
  • Hello Steve, could you figure out eventually what was the best approach to using SideKiq with Rubber? – Pykih Jul 10 '14 at 20:36

1 Answers1

0

Are these ansible roles?

I'd recommend setting up a rails and ruby role (separately) in your ansible playbook, run the playbook in your new sidekiq-prod instance, then do a cap prod deploy

If you are using a rails app with capistrano to do your sidekiq deploys, you can access the rails env in your setup of lib/capistrano/tasks/sidekiq.cap:

export RAILS_ENV=<%= fetch(:rails_env) %>

Bobby Matson
  • 1,448
  • 12
  • 14