Task #6057
closed[EPIC] Introduce custom plugin snippets for custom apache and nginx routes
100%
Description
Plugins like pulp_container and pulp_ansible need custom API routes. Sometimes these are for the pulp-content-app or in other cases the pulp-api.
Background¶
Currently Nginx that matches /pulp/api/v3
and routes that to the pulp-api. It also matches /pulp/content/
and routes that to the pulp-content-app. If neither match it first "tries one" and if that 404's it "tries the other". This is problematic for a few reasons:
- Apache doesn't support it. At the moment, Apache users are not receiving at all the same experience as Nginx
- It's not working well even for nginx. In pulp_ansible recently I had to add this snippet to my dev checkout or tests wouldn't pass. It was trying one service but then not the other.
location /pulp_ansible/galaxy/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
# we don't want nginx trying to do something clever with
# redirects, we set the Host: header above already.
proxy_redirect off;
proxy_pass http://127.0.0.1:24817;
}
Solution¶
Have each plugin ship a snippet that allows them to define custom routes for both nginx and apache. Then have the installer configure these snippets when configuring nginx or apache (as it already does).
We want to keep the snippets delivered through plugin code because it needs to be versioned with the plugin code. We can use these python mechansisms to ship the configs and make them discoverable by the installer:
https://importlib-resources.readthedocs.io/en/latest/using.html
Related issues
Updated by ipanova@redhat.com almost 5 years ago
- Description updated (diff)
- Sprint/Milestone set to 3.2.0
Updated by daviddavis almost 5 years ago
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
Updated by bmbouter almost 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
- Sprint set to Sprint 66
This is causing failures in pulp_ansible so I need to fix it.
Updated by mdepaulo@redhat.com almost 5 years ago
- Related to Story #5657: pulp-operator should deploy nginx as the Pulp Webserver added
Updated by bmbouter almost 5 years ago
- Status changed from ASSIGNED to CLOSED - CURRENTRELEASE
All of the subtasks are done for this, so moving to CLOSED - CURRENT RELEASE to help w/ the release process.
Updated by bmbouter over 4 years ago
- Category set to Installer - Moved to GitHub issues
- Tags deleted (
Pulp 3 installer)