New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create directory for Pulp Nginx snippets #278
Conversation
18eb764
to
14aef5d
Compare
[noissue]
14194c9
to
5d484bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 comments, but thank you for this 👍
roles/pulp-webserver/tasks/nginx.yml
Outdated
| - name: Find pulp obsolete symlinks | ||
| find: | ||
| paths: /etc/nginx/conf.d | ||
| patterns: "pulp*" | ||
| register: old_pulp_symlinks | ||
| tags: cleanup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should limit it to symlinks, in case users happen to put any custom files there:
https://docs.ansible.com/ansible/latest/modules/find_module.html#parameter-file_type
| @@ -75,7 +75,7 @@ http { | |||
| proxy_pass http://pulp-api; | |||
| } | |||
|
|
|||
| include conf.d/*.conf; | |||
| include pulp/*.conf; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Debian family has a different /etc/ filesystem layout for nginx. Looking at their layout (in a container for example) and our config files, are you confident this will work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just created pulp dir at the same level as conf.d, if the filesystem is different, it was failing before:
https://github.com/pulp/pulp_installer/blob/master/roles/pulp-webserver/tasks/nginx.yml#L53
https://github.com/pulp/pulp_installer/blob/master/roles/pulp-webserver/templates/nginx.conf.j2#L78
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debian seems to have the same path:
https://wiki.debian.org/Nginx/DirectoryStructure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you misunderstood my question.
I looked at the Fedora container's vs the debian container's folder structures. I see no reason why a /etc/nginx/pulp/ directory would not be recognized on Debian or interfere with Debian's utilities that maintain its nginx symlinks (which manages the contents of the "enabled" dirs, based on the contents of the "available" dirs), so it's safe to assume that it will function correctly. That's what I was asking.
See the file structure below for future reference:
root@debian-10:
/etc/nginx# ls -1p
conf.d/
fastcgi.conf
fastcgi_params
koi-utf
koi-win
mime.types
modules-available/
modules-enabled/
nginx.conf
proxy_params
scgi_params
sites-available/
sites-enabled/
snippets/
uwsgi_params
win-utf
[root@fedora-31 /etc/nginx]# ls -1p
conf.d/
default.d/
fastcgi.conf
fastcgi.conf.default
fastcgi_params
fastcgi_params.default
koi-utf
koi-win
mime.types
mime.types.default
nginx.conf
nginx.conf.default
scgi_params
scgi_params.default
uwsgi_params
uwsgi_params.default
win-utf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I really misunderstood, now it is clear to me, thanks!
|
Good job! |
https://pulp.plan.io/issues/6594
closes #6594