Story #2833
closedAs a user I want to be able to tell pulp where server.yaml file is and not have it be hardcoded to /etc/pulp/
100%
Description
Problem¶
Pulp currently needs root permissions to install correctly because the server.yaml file is hardcoded to live in /etc/pulp/.
This is unwanted behavior for installing pulp from PyPI.
Solution¶
Pulp should discover where the server.yaml file is via an environmental variable. This would have the side effect of making pulp more cross platform.
Currently the hardcoded path is in settings.py:
https://github.com/pulp/pulp/blob/2ec1164d3cfea8cfdcfa0b6a2936c41765190d96/platform/pulpcore/app/settings.py#L263
Updated by bmbouter over 7 years ago
If the environment variable is not set, it will still default to /etc/pulp/server.yaml right? I think most production installations will want it set there.
Does the devel playbook already install the server.yaml file? If so where?
Updated by bmbouter over 7 years ago
@asmacdo says the devel environment installs it already to /etc/pulp/server.yaml with this
Updated by bizhang over 7 years ago
I was thinking that an environmental variable should be required, rather than us checking to see if the envvar exists and defaulting to a /etc/pulp/server.yaml that might not exist.
Updated by bmbouter over 7 years ago
The majority of installations will have it installed at /etc/pulp/server.yaml. All rpm based installs for example will have it set there. We should really default to /etc/pulp/server.yaml.
To implement I was thinking we don't even have to check the filesystem at all. We could:
if env_var_for_conf_is_set:
path_to_conf = the_env_set_path
else:
path_to_conf = '/etc/pulp/server.yaml'
Updated by bmbouter over 7 years ago
We can handle the default as a separate story also and for now require the environment variable. If we do add a default I want it to be something that is very cross-platform.
Updated by mhrivnak over 7 years ago
Containerized deployments will mostly use the environment variable, so that's a solid production use case.
I'm still happy with defaulting to /etc/pulp/server.yaml though.
Updated by bmbouter over 7 years ago
We decided to not set a default for now and to rely on the environment variable in 100% of cases. We can set a default as followup work if we even want to.
Updated by bizhang over 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bizhang
Updated by bizhang over 7 years ago
- Status changed from ASSIGNED to POST
Added by werwty over 7 years ago
Added by werwty over 7 years ago
Revision 4809ba93 | View on GitHub
Allow user to specifiy location of server.yaml with envvar
closes #2833 https://pulp.plan.io/issues/2833
revise pulp_settings to default to /etc/pulp/server.yaml
Updated by werwty over 7 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|4809ba93b6ae9d754cc7964f2db3ed75a22c284d.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Allow user to specifiy location of server.yaml with envvar
closes #2833 https://pulp.plan.io/issues/2833
revise pulp_settings to default to /etc/pulp/server.yaml