Skip to content

Instantly share code, notes, and snippets.

@enguer
Created September 10, 2018 09:36
Show Gist options
  • Save enguer/f29c6de4e10acfdf2ba30fe389d54816 to your computer and use it in GitHub Desktop.
Save enguer/f29c6de4e10acfdf2ba30fe389d54816 to your computer and use it in GitHub Desktop.
nextgeoss-training-process-integration-part1.md

NextGEOSS Training - Integration of your data processing algorithm onto the NextGEOSS Cloud platform (Part2)

Work session with Data resources

You successfully performed the Part 1: Work session with Cloud resources.

Get the API key

  • Open a browser,
  • Visit https://www.terradue.com/portal/settings/apikey,
  • Click on the button Generate a new API key,
  • Type your Terradue's Cloud password,
  • Click on the button copy to clipboard,
  • Logon on the Developer Cloud Sandbox,
  • Type:

export APIKEY=<paste here the API key value>

Get the Workflow ID

  • Open a browser,
  • Visit http://sandbox-ip,
  • Click on the link Oozie Web Console,
  • Copy the workflow Job Id value,
  • Access the Developer Cloud Sandbox,
  • Type:

export WORKFLOW=<paste here the workflow Job id value>

Get the enclosure metadata

  • Access the Developer Cloud Sandbox,
  • Type:
enclosure=$( opensearch-client "http://$HOSTNAME/sbws/wps/ewf-sen2cor/$WORKFLOW/results/search" enclosure )
echo $enclosure

Download the result from HDFS

  • Type:
local_result=$( ciop-copy -f -O /tmp/ "$enclosure" )
echo $local_result

Discover the Data Gateway

Upload the result to the Data Gateway

  • Access the Developer Cloud Sandbox,
  • Type:
identifier=$( basename $local_result )
echo $identifier
curl -u $USER:$APIKEY -XPUT "https://store.terradue.com/terradue-training/$USER/$identifier" -T "$local_result"

Note: a typical application at this stage could publish results on a managed instance of a Geoserver.

Discover the available indexes on the Data Agency Catalogue

Discover a given catalogue index (change value of [index-name] with an actual index)

Discover the result metadata on the local Sandbox Catalogue

  • Access the Developer Cloud Sandbox,
  • Type:

opensearch-client "http://$HOSTNAME/sbws/wps/sen2cor/$WORKFLOW/results/search"

Publish the result metadata on the Data Agency Catalogue

  • Type:
sh /application/util/ingest.sh

Discover the result(s) metadata on the Data Agency Catalogue (change value of [your-index-linked-to-API-key] with an actual index)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment