Project

Profile

Help

Story #2833

As a user I want to be able to tell pulp where server.yaml file is and not have it be hardcoded to /etc/pulp/

Added by bizhang over 2 years ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 23

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


Checklist

Associated revisions

Revision 4809ba93 View on GitHub
Added by werwty about 2 years ago

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

Revision 4809ba93 View on GitHub
Added by werwty about 2 years ago

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

Revision 4809ba93 View on GitHub
Added by werwty about 2 years ago

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

History

#1 Updated by bizhang over 2 years ago

  • Sprint Candidate changed from No to Yes

#2 Updated by bmbouter over 2 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?

#3 Updated by bmbouter over 2 years ago

@asmacdo says the devel environment installs it already to /etc/pulp/server.yaml with this

#4 Updated by bizhang over 2 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.

#5 Updated by bmbouter over 2 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'

#6 Updated by bmbouter over 2 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.

#7 Updated by bmbouter over 2 years ago

  • Groomed changed from No to Yes

I think is ready to be groomed.

#8 Updated by mhrivnak over 2 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.

#9 Updated by bmbouter over 2 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.

#10 Updated by mhrivnak over 2 years ago

  • Sprint/Milestone set to 41

#11 Updated by bizhang over 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bizhang

#13 Updated by mhrivnak about 2 years ago

  • Sprint/Milestone changed from 41 to 42

#14 Updated by werwty about 2 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#15 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 23

#16 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (42)

#17 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#18 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF