Issue #3981
closedSwitch Pulp3 settings to Dynaconf
Description
Problem¶
The .yaml format for the settings file is creating several challenges:
- Users will have to have a separate Python file anyway for RQ. See https://pulp.plan.io/issues/3980
- We point users to the "Django docs" but all of those examples are for Python formatted configs. The user then has to translate these back to Yaml. This creates tickets like this: https://pulp.plan.io/issues/3618#note-3
- You can interpret runtime variables in Python, resolving issues like this: https://pulp.plan.io/issues/3943#note-3
- We can still support top-level "overwriting" by having the module settings overwrite default ones. That would resolve this: https://pulp.plan.io/issues/3879
Proposal:¶
Have Pulp use the Dynaconf Django: plugin.https://dynaconf.readthedocs.io/en/latest/guides/django.html#settings-files Users would still specify DJANGO_SETTINGS_MODULE=pulpcore.app.settings but dynaconf would be overlaying settings from a dynaconf config file or from environment variables.
This would give us environment variable support and allow some installs to run without any config file at all.
Also the docs need updating so users know they can use dynaconf to configure Pulp with and to refer to their docs.
Updated by bmbouter over 6 years ago
- Subject changed from Switch Pulp3 settings to Python to Switch Pulp3 settings to Dynaconf
- Description updated (diff)
Thanks to @brunorocha for suggesting we use this!
Updated by bmbouter over 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
Updated by bmbouter over 6 years ago
- Sprint set to Sprint 42
Adding to sprint as part of rpm sync work.
Updated by bmbouter over 6 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
bmbouter) - Sprint deleted (
Sprint 42)
accidentally moved the wrong issue.
Updated by daviddavis over 6 years ago
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
Proof of concept:
Updated by vdusek over 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to vdusek
Updated by vdusek over 6 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
vdusek)
Updated by dkliban@redhat.com over 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to dkliban@redhat.com
Updated by dkliban@redhat.com about 6 years ago
- Status changed from ASSIGNED to POST
Added by Bruno Rocha about 6 years ago
Added by Bruno Rocha about 6 years ago
Revision e1fcdda1 | View on GitHub
Problem: Pulp can't be configured using environment variables
Solution: use dynaconf to manage all of Pulp configuration settings
This patch also adds pulpcore.rqconfig module that is dynamically generated from the Django settings generated by dynaconf. The rq workers use this module for their configuration.
The default location of the config file is now at /etc/pulp/settings.py
. Pulp can operate without by relying
on environment variables.
closes: #3981 https://pulp.plan.io/issues/3981
closes: #3879 https://pulp.plan.io/issues/3879
closes: #3980 https://pulp.plan.io/issues/3980
Updated by Anonymous about 6 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|e1fcdda1d56f388bc8daba20f13d6a25217f5c25.
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Problem: Pulp can't be configured using environment variables
Solution: use dynaconf to manage all of Pulp configuration settings
This patch also adds pulpcore.rqconfig module that is dynamically generated from the Django settings generated by dynaconf. The rq workers use this module for their configuration.
The default location of the config file is now at
/etc/pulp/settings.py
. Pulp can operate without by relying on environment variables.closes: #3981 https://pulp.plan.io/issues/3981
closes: #3879 https://pulp.plan.io/issues/3879
closes: #3980 https://pulp.plan.io/issues/3980
closes #3618 https://pulp.plan.io/issues/3618
closes: #3943 https://pulp.plan.io/issues/3943