This is an automated email from the ASF dual-hosted git repository.
tloubrieu pushed a commit to branch sdap-388-proxy
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git
The following commit(s) were added to refs/heads/sdap-388-proxy by this push:
new faf85f9 redirect validated on AQACF prod server, /list end point
returns the remote collections
faf85f9 is described below
commit faf85f9cdca954d1824ba88fe70b92b91a7c57b5
Author: Thomas Loubrieu <[email protected]>
AuthorDate: Mon Jun 13 15:17:40 2022 +0200
redirect validated on AQACF prod server, /list end point returns the remote
collections
---
analysis/tests/redirect/collections-config.yaml | 2 +-
analysis/webservice/redirect/RedirectHandler.py | 4 +++-
helm/README.md | 31 +++++++++++++++++++++++++
3 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/analysis/tests/redirect/collections-config.yaml
b/analysis/tests/redirect/collections-config.yaml
index 2e26d3b..f903e82 100644
--- a/analysis/tests/redirect/collections-config.yaml
+++ b/analysis/tests/redirect/collections-config.yaml
@@ -1,7 +1,7 @@
collections:
- id: gmu-pm25
path: https://aq-sdap.stcenter.net/nexus/
- remote-id: pm25
+ remote-id: PM25
- id: ECCO_v4_r4_EVELMASS_latlon
path:
/data/datasets/ecco-distribution-archive/nexus-ingest/EVELMASSv4r4/*.nc
priority: 6
diff --git a/analysis/webservice/redirect/RedirectHandler.py
b/analysis/webservice/redirect/RedirectHandler.py
index 7b20178..7ffda43 100644
--- a/analysis/webservice/redirect/RedirectHandler.py
+++ b/analysis/webservice/redirect/RedirectHandler.py
@@ -1,6 +1,8 @@
import tornado
+import logging
from webservice.webmodel.RequestParameters import RequestParameters
+logger = logging.getLogger(__name__)
class RedirectHandler(tornado.web.RequestHandler):
@@ -23,7 +25,7 @@ class RedirectHandler(tornado.web.RequestHandler):
dataset_param = f"ds={collection_id}"
new_dataset_param = f"ds={collection['remote_id']}"
new_full_url = new_full_url.replace(dataset_param,
new_dataset_param)
-
+ logger.info("redirect request to ", new_full_url)
self.redirect(
new_full_url,
permanent=True
diff --git a/helm/README.md b/helm/README.md
index 33d8cd0..ee6fa91 100644
--- a/helm/README.md
+++ b/helm/README.md
@@ -321,6 +321,37 @@ collections:
lon: 60
```
+In addition, renote collections, handled by an atlernate SDAP deployment, can
be configured, as follow:
+
+```yaml
+
+ - id: gmu-pm25
+ path: https://aq-sdap.stcenter.net/nexus/
+ remote-id: PM25
+
+```
+
+This collections will be proposed in the /list end point, as follow:
+
+```json
+ ...
+, {
+ "shortName": "gmu-no2",
+ "remoteUrl": "https://aq-sdap.stcenter.net/nexus/",
+ "remoteShortName": "NO2"
+ }
+ ...
+```
+
+The collection can be requested on the main SDAP, with any client library
supporting HTTP redirection. The most commonly library used as SDAP clients:
python's `requests` or javascript's `XMLHTTPRequest` support the redirection by
default.
+
+For example the remote collection can be requested with usual requests on the
main SDAP server, for example:
+
+https://digitaltwin.jpl.nasa.gov/nexus/timeSeriesSpark?ds=gmu-no2&minLon=-118.31&minLat=33.61&maxLon=-118.09&maxLat=33.87&startTime=2021-10-01T00:00:00Z&endTime=2021-12-31T00:00:00Z
+
+Seamlessly, transparently from the user point of view, the processing of the
timeSeriesSpark or any other algorithm will be invoked on the alternate SDAP
server (deployed on https://aq-sdap.stcenter.net/nexus/). The invocation of the
alternate SDAP is done automatically by an HTTP redirection directive (status
302) sent to the client.
+
+
### Ingesting from S3
To ingest granules that are stored in an S3 bucket, you must provide the name
of the S3 bucket to read from, as well as the S3 credentials as environment
variables.