Actions
Issue #3981
closedSwitch Pulp3 settings to Dynaconf
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
(Total: 0:00 h)
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 43
Quarter:
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.
Actions
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