Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Add a pulp_content role configuration option for gunicorn workers
Browse files Browse the repository at this point in the history
  • Loading branch information
dralley committed Feb 17, 2021
1 parent bc0554f commit 1876c18
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/8267.feature
@@ -0,0 +1 @@
The `pulp_content_workers` option can be used to adjust the number of Gunicorn worker processes handling content app requests.
4 changes: 1 addition & 3 deletions roles/pulp_api/README.md
Expand Up @@ -10,9 +10,7 @@ Role Variables
listen.](https://docs.gunicorn.org/en/stable/settings.html#bind)
One can specify a unix socket path instead (recommended value is `'unix:/var/run/pulpcore-api/pulpcore-api.sock'`).
Defaults to `'127.0.0.1:24817'`.
* `pulp_api_workers`: Number of Pulp Content `gunicorn` processes for handling requests. Defaults to 1.
Used to render the `pulpcore-api.service.j2` template, passing to the `--workers` parameter of the
gunicorn service.
* `pulp_api_workers`: Number of `gunicorn` processes for handling Pulp API requests. Defaults to 1.
* `pulp_token_auth_key`: Location of the openssl private key (in pem format) to use for token
authentication. If not specified, a new key wil be generated.

Expand Down
2 changes: 2 additions & 0 deletions roles/pulp_content/README.md
Expand Up @@ -8,6 +8,8 @@ Role Variables

* `pulp_content_bind`: Interface and Port where Pulp Content [`gunicorn` service will
listen.](https://docs.gunicorn.org/en/stable/settings.html#bind)
* `pulp_content_workers`: Number of `gunicorn` processes for handling Pulp content app requests.
Defaults to 8.

One can specify a unix socket path instead
(recommended value is `'unix:/var/run/pulpcore-content/pulpcore-content.sock'`).
Expand Down
1 change: 1 addition & 0 deletions roles/pulp_content/defaults/main.yml
@@ -1,2 +1,3 @@
---
pulp_content_bind: '127.0.0.1:24816'
pulp_content_workers: 8
2 changes: 1 addition & 1 deletion roles/pulp_content/templates/pulpcore-content.service.j2
Expand Up @@ -20,7 +20,7 @@ RuntimeDirectory=pulpcore-content
ExecStart={{ __pulp_daemons_dir }}/gunicorn pulpcore.content:server \
--bind '{{ pulp_content_bind }}' \
--worker-class 'aiohttp.GunicornWebWorker' \
-w 2 \
--workers {{ pulp_content_workers }} \
--timeout 90 \
--access-logfile -

Expand Down

0 comments on commit 1876c18

Please sign in to comment.