Project

Profile

Help

Story #2833

closed

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 almost 7 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 23
Quarter:

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

Actions #1

Updated by bizhang almost 7 years ago

  • Sprint Candidate changed from No to Yes
Actions #2

Updated by bmbouter almost 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?

Actions #3

Updated by bmbouter almost 7 years ago

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

Actions #4

Updated by bizhang almost 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.

Actions #5

Updated by bmbouter almost 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'
Actions #6

Updated by bmbouter almost 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.

Actions #7

Updated by bmbouter almost 7 years ago

  • Groomed changed from No to Yes

I think is ready to be groomed.

Actions #8

Updated by mhrivnak almost 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.

Actions #9

Updated by bmbouter almost 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.

Actions #10

Updated by mhrivnak almost 7 years ago

  • Sprint/Milestone set to 41
Actions #11

Updated by bizhang almost 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bizhang
Actions #13

Updated by mhrivnak almost 7 years ago

  • Sprint/Milestone changed from 41 to 42

Added by werwty over 6 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

Added by werwty over 6 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

Actions #14

Updated by werwty over 6 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #15

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 23
Actions #16

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (42)
Actions #17

Updated by daviddavis about 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #18

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)
Actions #19

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF