Story #5290
As a plugin writer, I can provide all of my settings with their defaults in one place.
100%
Description
Problem¶
Currently pulp_ansible has several settings. There isn't a consolidated way currently for dynaconf to overlay settings from the pulp_ansible codebase onto the settings file provided by pulpcore.app.settings
Solution¶
1. Document in the plugin writer's guide a convention that settings should live in pluginname.app.settings
2. Then here you build the list of python paths to the settings file.
3. Then here you have dynaconf load those settings.
This needs to come with documentation for plugin writers and a release note in pulpcore-plugin, even though the changes will mostly occur in pulpcore.
Associated revisions
Revision 2120cd3b
View on GitHub
Add settings.py.j2 for plugin settings
Plugins now have their settings loaded when placed in the file at
<your plugin>.app.settings.py
.
History
#1
Updated by rochacbruno over 1 year ago
Dynaconf issue: https://github.com/rochacbruno/dynaconf/issues/207
#2
Updated by daviddavis over 1 year ago
- Groomed changed from No to Yes
#3
Updated by rochacbruno over 1 year ago
Dynaconf PR: https://github.com/rochacbruno/dynaconf/pull/209
That RFC will be included in the next release
#4
Updated by rochacbruno over 1 year ago
Dynaconf 2.0.4 released adding support for this issue to be resolved: https://github.com/rochacbruno/dynaconf/releases/tag/2.0.4
#5
Updated by Anonymous over 1 year ago
- Status changed from NEW to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulpcore|5b41e98d3d7768177531b5be7105e3a011f2aba6.
#6
Updated by bmbouter over 1 year ago
- Status changed from MODIFIED to ASSIGNED
- Assignee set to bmbouter
@bruno awesome thanks! I'm bringing back to ASSIGNED so I can add documentation for plugin writers.
#7
Updated by bmbouter over 1 year ago
- Sprint set to Sprint 58
This was groomed for the last sprint planning but it did not have the Sprint actually set. This is needed for core to allow pulp_ansible to set settings so we need to have it on the sprint.
#8
Updated by bmbouter over 1 year ago
- Status changed from ASSIGNED to POST
#9
Updated by Anonymous over 1 year ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|157facaefb1d10e4ead25bb4ef89e39dfb7f1f1d.
#10
Updated by bmbouter over 1 year ago
- Status changed from MODIFIED to POST
#11
Updated by bmbouter over 1 year ago
- Status changed from POST to ASSIGNED
#12
Updated by bmbouter over 1 year ago
- Status changed from ASSIGNED to POST
docs PR available at: https://github.com/pulp/pulpcore-plugin/pull/124
#13
Updated by bmbouter over 1 year ago
- Status changed from POST to MODIFIED
Applied in changeset plugin_template|2120cd3bb4973cb430c1c35dbad5c031f05a20cd.
#14
Updated by bmbouter over 1 year ago
- Status changed from MODIFIED to POST
PR for settings.py added to plugin_template: https://github.com/pulp/plugin_template/pull/104
Bringing back to POST for the docs PR to merge and move to MODIFIED.
#15
Updated by bmbouter over 1 year ago
- Status changed from POST to MODIFIED
Applied in changeset commit:pulpcore-plugin|d2af53939a82933f0fb2a92962f44fa9de688f7b.
#16
Updated by bmbouter about 1 year ago
- Sprint/Milestone set to 3.0.0
#17
Updated by bmbouter about 1 year ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Please register to edit this issue
Add load of plugin default settings.
{plugin_name}/app/settings.py
/etc/pulp/settings.py
PULP_
RPM
,FILE
,ANSIBLE
etc...example:
ANSIBLE_SOMEKEY = 'value'
on settings.py can be overriden viaexport PULP_ANSIBLE_SOMEKEY='othervalue'
closes #5290