thermistor.sidekiq
Ansible Role for Sidekiq
This guide helps you set up the Sidekiq service on Ubuntu using systemctl.
Requirements
You need Redis to run Sidekiq. Installing the Redis package on Ubuntu is enough.
Configuration Variables
Required Variables
sidekiq_dir
– Directory for Sidekiqsidekiq_env
– Environment (e.g., production)sidekiq_user
– User to run Sidekiq
Optional Variables with Defaults
sidekiq_queues
: [] – Queues for Sidekiqsidekiq_instance
: ~ – Unique instance name for Sidekiq
Use the RAILS_MAX_THREADS
environment variable to set concurrency.
Sample Playbook
Here's how to use it:
- role: thermistor.sidekiq
sidekiq_dir: /srv/www/beep.eco/beep
sidekiq_env: production
sidekiq_user: beep
tags:
- sidekiq
You can also define specific queues. This will create command-line arguments to override the config/sidekiq.yml
in your app if it exists:
- role: thermistor.sidekiq
sidekiq_queues:
- mailers
- default
sidekiq_dir: /srv/www/beep.eco/beep
sidekiq_env: production
sidekiq_user: beep
tags:
- sidekiq
You can include the Sidekiq role multiple times in a playbook. This can be useful for creating a reserved queue for high-priority jobs. Each runner must have a unique sidekiq_instance
name:
- role: thermistor.sidekiq
sidekiq_instance: mailers
sidekiq_queues:
- mailers
sidekiq_dir: /srv/www/beep.eco/beep
sidekiq_env: production
sidekiq_user: beep
tags:
- sidekiq
- role: thermistor.sidekiq
sidekiq_instance: default
sidekiq_queues:
- default
sidekiq_dir: /srv/www/beep.eco/beep
sidekiq_env: production
sidekiq_user: beep
tags:
- sidekiq
License
This project is licensed under the MIT License.
Installa
ansible-galaxy install thermistor.sidekiq
Licenza
mit
Download
92
Proprietario
Product guy