Project

Profile

Help

Task #6057

[EPIC] Introduce custom plugin snippets for custom apache and nginx routes

Added by bmbouter 10 months ago. Updated 4 months ago.

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

100%

Estimated time:
(Total: 0:00 h)
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 67
Quarter:

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

https://docs.python.org/3/library/importlib.metadata.html


Subtasks

Ansible Plugin - Task #6188: Add nginx and apache fragmentCLOSED - CURRENTRELEASEbmbouter

Actions
Story #6206: As an installer user, the webserver configs I have will chain-load snippetsCLOSED - CURRENTRELEASEbmbouter

Actions
Task #6209: Add plugin writer docs on how to ship webserver config snippetsCLOSED - CURRENTRELEASEbmbouter

Actions
Story #6213: As an installer user, plugin snippets will by symlinkedCLOSED - CURRENTRELEASEmdepaulo@redhat.com

Actions

Related issues

Related to Pulp - Story #5657: pulp-operator should use nginx and possibly other K8s ingressesNEW

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by bmbouter 10 months ago

  • Description updated (diff)

#2 Updated by ipanova@redhat.com 10 months ago

  • Description updated (diff)
  • Sprint/Milestone set to 3.2.0

#3 Updated by daviddavis 10 months ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes

#4 Updated by bmbouter 10 months 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.

#5 Updated by mdepaulo@redhat.com 10 months ago

  • Related to Story #5657: pulp-operator should use nginx and possibly other K8s ingresses added

#6 Updated by rchan 9 months ago

  • Sprint changed from Sprint 66 to Sprint 67

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

#8 Updated by bmbouter 7 months ago

  • Category set to Installer
  • Tags deleted (Pulp 3 installer)

Please register to edit this issue

Also available in: Atom PDF