Deploy extdir filter service
The extdir service is used by CiviCRM sites to get a feed of available extensions. Typical requests look like:
-
https://civicrm.org/extdir/ver=5.8.alpha1|uf=Drupal|status=|ready=/
(HTML-formatted list of extensions) -
https://civicrm.org/extdir/ver=5.8.alpha1|uf=Drupal|status=|ready=/org.example.foobar.xml
(XML for one extension) -
https://civicrm.org/extdir/ver=5.8.alpha1|uf=Drupal|status=|ready=/single
(Aggregated JSON; contains XML for all extensions)
During the Bamford sprint, we had a conference call to discuss the metadata available in "info.xml". Some of the main issues raised:
- Extensions don't have a good categorization. Letting extension authors set their own categories in
info.xml
seems like a simple/useful approach, but for two problems:- Bootstrapping: Most extensions are not currently categorized. We need a way to fill them in.
- Curation: If some extension
- There's additional metadata -- such as usage statistics -- that we'd like to include in the extension feed, but these have to be pulled from another system.
- The implementation of the
civicrm.org/extdir
service has not been cleanly scoped in a way that can be locally reproduced (unless you reproduce the entire site).
These problems have been outstanding for a long time. On the call, an idea came up to implement a Symfony-based proxy service (where we can backfill info.xml
categories; override info.xml
categories; mix-in other info; and more easily be developed locally).
I've got a branch of civicrm-dist-manager
which implements a Symfony bundle for the /extdir
service.
- https://github.com/totten/civicrm-dist-manager/tree/master-extdir/src/CiviExtManagerBundle
- https://github.com/totten/civicrm-dist-manager/blob/master-extdir/tests/CiviExtManagerBundle/Controller/DefaultControllerTest.php
- https://github.com/civicrm/civicrm-dist-manager/compare/master...totten:master-extdir?expand=1
Now, the question is how to deploy this. Here are the constraints:
- The Drupal-based version of
/extdir/<filter>
must still be available online at some URL. - The Symfony-based version of
/extdir/<filter>
must be configured to call the Drupal based version. - Requests from Civi sites musts go to the Symfony-based version.
Ideally, the Symfony-based version would take over the URL (https://civicrm.org/extdir/
). But then... what URL would be used when Symfony needs to send the request to Drupal...? More generally... does the Aegir arrangement for civicrm.org
allow us to fine-tune the nginx config?