diff --git a/README.md b/README.md index c7cc89e..c82d869 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ Run `make` to install the necessary 3rd party roles, namely: The last two just make the server environments more akin to how I prefer them to be. It's easy enough to block this out, just edit `roles/yttrx/meta/main.yml` and remove `ansible-role-neovim` and `ansible-role-oh-my-zsh`. +## Unsupported + +This currently doesn't manage anything related to your redis or postgres work. I'll get to that later, but right now the redis and postgres portions are the oldest parts of my manually installed mastodon instance, and I am not ready to tear that down. + ## Configuring your .env.production Mastodon is configured with the `.env.production` file. This is populated with the hash configured in `roles/mastodon/vars/main.yml`. This file contains sensitive information such as passwords etc., so it's better if we don't accidentally leak that to github, as such, that file i s in the `.gitignore` file. I'll talk about how to configure it below. @@ -48,3 +52,22 @@ ENV_PRODUCTION: STATSD_ADDR: statsd:9125 swap_space: 1G ``` + +## Configuring sidekiq workers + +It's easy to spin up additional worker capacity. Edit the `hosts` file, and add your new hostnames under the `[sidekiq]` line, then from the terminal, run `ansible-playbook sidekiq.yml`. This will configure the host with all of the basic `yttrx` role stuff, including shell and nvim niceties, it will install docker, checkout the mastodon github repo, and configure the `docker-compose.yml` & `docker-compose.override.yml` files. + +The `docker-compose.yml` file is managed by the `mastodon` role, and will simply install the `pgbouncer` and `statsd` containers. These are basic container required by all roles. Role specific configurations will go into the `docker-compose.override.yml` file. + +### Configuring how many sidekiq workers and which queues they'll process + +Edit the `sidekiq.yml` file and configure the `sidekiq` var. The expected format is: + +``` + vars: + sidekiq: + - name: ingress-and-stuff + - q: [ '-q', 'ingress', '-q', 'default' ] +``` + +This will create a service called `sidekiq-ingress-and-stuff` with the `ingress` and `default` queues. To have the default queues, leave the `q` array empty. diff --git a/sidekiq.yml b/sidekiq.yml index adb969c..0ce21cc 100644 --- a/sidekiq.yml +++ b/sidekiq.yml @@ -5,9 +5,9 @@ - role: sidekiq vars: sidekiq: - - name: ingress + - name: ingresspush q: [ '-q', 'ingress', '-q', 'push', ] - - name: + - name: defaultpull q: [ '-q', 'pull', '-q', 'default' ] handlers: