Skip to main content

Tools for managing CEDA Sentinel DHS

Project description

CEDA Sentinel Relay Hub tools

This codebase provides a set of tools to interact with the CEDA DHS series Data Hub Relay (DHR) based on the ESA/SERCO GSS implementation. These tools will allow interaction with the GSS endpoint on the CEDA DHR and will allow programmatic control of such functions as Producers, Consumers and Ingesters. The DHS GSS system is based upon a set of Docker Containers running within Docker Swarm and has the following components:

  • GSS-Ingest is the part of the system which connects to sources (CDSE, DHuS, other GSS, Swift container or directory) to get products and put them into the system (Datastores and Metadatastores)
  • GSS-Catalogue is the access point to products stored in the system. Users need to authenticate first and then access to data and metadata.
  • GSS-Admin is a REST API used to configure Ingesters, Datastores, DatastoreGroups, MetadataStores, Quotas and their properties.
  • GSS-Toolbox is a set of scripts to initialize the database and the index (Solr)
  • GSS-Notification notifies a defined end point on product deletion activity

The tools in this repository will interact with the GSS Admin API and provide users the ability to control the data flow from various sources and where this data is placed to allow CEDA full operational control of the GSS analogous to the previous system (DHuS) synchroniser setup.

These operations are grouped as such:

List existing producer/consumers on local GSS.

This script shall list both matched producer and consumer pairs previously created and installed on the target GSS. This script wraps a GET to the respective GSS API endpoints:

  • http://:8082/gss-admin-api/producers
  • http://:8082/gss-admin-api/consumers/

list_producer_consumers -l local_gss_instance.cfg

Where:

-l is the option to define the hub (or otherwise) where the operation shall be submitted. i.e. The local GSS instance we want to see the list of producers on.
-s is an optional string filter to be supplied to match content returned according to original filter.
-t is an optional string filter field defining the number of hours the LCD is behind the current date-time. If the -e option is used this will send output to the email address defined in the -e option. This will allow the user to identify where producer/consumer pairs are falling behind.
-e is an optional string containing an email address to be sent a warning if the -t option is used. Can only be used if the -t option is used.
-f is an option to output to stdout the detailed information associated with the given named producer or consumer i.e. "folder_producer1". The script will render the full JSON returned in a human readable format.

The output from this should group the matched producers and consumers together with basic information on the associated source URL (source hub/GSS i.e. Colhub2), the GSS instance being used (i.e. srh-services13) , filter parameter and Last Creation Date (LCD) in tabular form.

Create a new producer/consumer pair on the local GSS

This script shall allow users to generate a new producer/consumer pair on the target host based on the values within the files associated with the supplied options. Other options shall be used to defined the search string and Last Creation date. Other options may eventually be added to supplant/override other fields within the producer/consumer template.

create_producer_consumer -t sentinel_2_producer.template -c colhub.cfg -l local_gss_instance.cfg

Where:
-t is the option to define the template to be used to generate the JSON to POST to the defined instance (in the -l option) i.e. The local GSS instance we want to see the list of producers on.
-c is the option to provide the unencrypted credentials to be used in the POST-ed template to be used in the defined instance (in the -l option).
-l is the option to define the hub (or otherwise) where the operation shall be submitted. i.e. The local GSS instance we want to see the list of producers on.
-F is used to supply a filter string i.e. startswith(Name,'S1')
-L is used to define a LastPublicationDate i.e. 2025-01-15T00:00:00.00. (Optional will use current date-time if not supplied).

Delete or remove producer/consumers

This script shall allow users to remove paired producer/consumers (previously identified in the list tool). It shall use the DELETE operation.

delete_producer_consumer -l local_gss_instance.cfg -n <producer_consumer base name>

The script shall parse the HTTP response to report whether this operation was successful

Adjust Quotas

Adjust HFS Data stored

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ceda_sentinel_dhs_tools-0.1.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ceda_sentinel_dhs_tools-0.1.1-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file ceda_sentinel_dhs_tools-0.1.1.tar.gz.

File metadata

  • Download URL: ceda_sentinel_dhs_tools-0.1.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.4 Darwin/24.2.0

File hashes

Hashes for ceda_sentinel_dhs_tools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ac1f4af3a0995593a13737df4fa808cac2c300c8e01daec8e5b87922ef5ce83f
MD5 2b1aa61b96691840359aaa5d84f72efe
BLAKE2b-256 c183be8aedf4569823fa77b704173f0410e08bd7aa557aa9f87b280bcc9789c5

See more details on using hashes here.

File details

Details for the file ceda_sentinel_dhs_tools-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ceda_sentinel_dhs_tools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3abde54a5676daa49b1f74b4e32022d633d915d91e5f11b9c37e167699ab6a78
MD5 497a6346460c178b0714af8984bdde7a
BLAKE2b-256 4012b368c604f7715443f4d2acf74d7994299626200ad67dde28c54ec35edb79

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page