Sending product walkthrough
This walkthrough will guide you through running the client to send products to PDL using the AwsProductSender
1. Ensure the correct Java version is installed
See installing Java walkthrough
2. Ensure the PDL client is installed
See downloading to choose a version to download. An example curl command to download version 3.0.2-beta
is below:
curl -qsSL https://code.usgs.gov/-/project/4689/uploads/dae3ab8b5e032d77afe5c2265fd22475/ProductClient.jar -o ProductClient.jar
3. Setup keys
In order to send products you must generate a keypair and send your public key to gs-haz_dev_team_group@usgs.gov. See sending products for more information.
To generate a keypair use the following command:
ssh-keygen -t rsa -b 2048 -m PEM -C 'My product key' -f product-key
4. Configure
Example config.ini
Note that the url used in this example is the production url, reach out to gs-haz_dev_team_group@usgs.gov for testing and/or integrating with a different environment
senders = sender_aws
loglevel = INFO
[sender_aws]
type = gov.usgs.earthquake.aws.AwsProductSender
url = https://earthquake.usgs.gov/pdl/east/
privateKey = ./product-key
signProducts = true
5. Run
The CLI options for sending a product are documented in sending products. To send an empty product run the following command:
java -jar ProductClient.jar --send --type=productType --code=productCode --source=productSource
Example output:
# java -jar ProductClient.jar --send --type=productType --code=productCode
Product Distribution Client
Version 3.0.2-beta 2024-08-19
INFO thread=1 Running Product Builder
INFO thread=17 [sender_aws] send product total urn:usgs-product:productSource:productType:productCode:1724956857813 (1623 ms)
Last modified: Tue Sep 3 14:31:07 UTC 2024