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.py -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.

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.py -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.py -l local_gss_instance.cfg -n <producer_consumer base name>

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

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.0.tar.gz (6.8 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.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ceda_sentinel_dhs_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 6.8 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.0.tar.gz
Algorithm Hash digest
SHA256 f170b4a924e8da9444f246c7315f5ddf1647d88fd71d6f3b96ab67e3c9bb9f1b
MD5 5792ba54fa30319d1f558cb024117114
BLAKE2b-256 c107fe6d062a79e04385c772c91f5f305d100c0a2afbac17ec053ac368c53683

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ceda_sentinel_dhs_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3b8194172abb488ea3b276207fb6c63fd69d7ed35708067030cebd9512ca147
MD5 dc28fc396ce0e4b74e5ebf2bb5dda88d
BLAKE2b-256 1514b9897a0da93806d537bfeb41fa85f4f4272b7ad4fd362e5d66edd3080083

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