[Pulp-dev] Switching Pulp3 settings.yaml to settings.py file

Daniel Alley dalley at redhat.com
Tue Aug 28 21:19:17 UTC 2018


So, right now, our settings actually *are* in settings.py.  When
settings.py gets evaluated it looks up settings.yaml, parses it into a
dictionary, and then uses that dictionary to modify it's own attributes.

https://github.com/pulp/pulp/blob/a175c118f9466ac822f22f138cb6cea339b39f54/pulpcore/pulpcore/app/settings.py#L244-L279

Is there a reason we couldn't just add more code to the end of settings.py
to check for environment variables with Pulp-related names, and do the same?



FWIW, I don't actually like the current approach much, it feels kind of
"magic" in a negative way, so if there are better ways of doing it I'm +1.
Just wanted to point out it's probably not difficult to solve as-is.

On Tue, Aug 28, 2018 at 4:39 PM, Brian Bouterse <bbouters at redhat.com> wrote:

> I'm trying to get Pulp3 running on Openshift, and I just ran into a
> blocking issue that I filed here:
>
> https://pulp.plan.io/issues/3943
>
> If anyone can think of a better solution or a problem with the approach
> suggested here please post on the issue.
>
> Thanks,
> Brian
>
> _______________________________________________
> Pulp-dev mailing list
> Pulp-dev at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20180828/78bb234a/attachment.htm>


More information about the Pulp-dev mailing list