Story #3943

Updated by bmbouter almost 2 years ago

h2. Problem Statement

While trying to get Pulp3 running on Openshift I ran into an issue where I needed to set a setting in the settings.yaml file from an environment variable. For example the IP of the postgresql instance is only known to openshift and available via an enviornment variable.

This is a blocker on deploying Pulp3 into Openshift.

h2. Solution

Make our settings file a python module instead with the config available at as a module attribute named 'PULP_CONFIG', e.g.

$ cat

# get lots of data from ENVIRONMENT variables
PULP_CONFIG = {} # This would be the toplevel dictionary that would overwrite _DEFAULT_PULP_SETTINGS

h4. How will the conf file be imported?

Same way as today, first an environment variable is checked which contains a full path to the python module. If that environment variable isn't set it defaults to look to /etc/pulp/

The only change is /etc/pulp/server.yaml to /etc/pulp/ as the default location accessed.