Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swodlr UI 45 - add umm-t record #47

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,24 +177,24 @@ jobs:
git tag -f -a "${{ env.THE_VERSION }}" -m "Version ${{ env.THE_VERSION }}"
git push origin "${{ env.THE_VERSION }}" --force

# - name: Publish UMM-T with new version
# uses: podaac/[email protected]
# if: |
# github.ref == 'refs/heads/main' ||
# startsWith(github.ref, 'refs/heads/release')
# with:
# umm-json: cmr/${{ env.THE_ENV }}_swodlr_cmr_umm_t.json
# provider: 'POCLOUD'
# env: ${{ env.THE_ENV }}
# version: ${{ env.THE_VERSION }}
# timeout: 60
# disable_removal: 'true'
# umm_type: 'umm-t'
# use_associations: 'false'
# env:
# LAUNCHPAD_TOKEN_SIT: ${{secrets.LAUNCHPAD_TOKEN_SIT}}
# LAUNCHPAD_TOKEN_UAT: ${{secrets.LAUNCHPAD_TOKEN_UAT}}
# LAUNCHPAD_TOKEN_OPS: ${{secrets.LAUNCHPAD_TOKEN_OPS}}
- name: Publish UMM-T with new version
uses: podaac/[email protected]
if: |
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release')
with:
umm-json: 'cmr/${{env.THE_ENV}}_swodlr_cmr_umm_t.json'
provider: 'POCLOUD'
env: ${{ env.THE_ENV }}
version: ${{ env.THE_VERSION }}
timeout: 60
disable_removal: 'true'
umm_type: 'umm-t'
use_associations: 'false'
env:
LAUNCHPAD_TOKEN_SIT: ${{secrets.LAUNCHPAD_TOKEN_SIT}}
LAUNCHPAD_TOKEN_UAT: ${{secrets.LAUNCHPAD_TOKEN_UAT}}
LAUNCHPAD_TOKEN_OPS: ${{secrets.LAUNCHPAD_TOKEN_OPS}}

# Setup Node to install and test
- name: Setup Node
Expand Down
10 changes: 10 additions & 0 deletions cmr/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### UMM-T Update
This directory holds files for updating the service's CMR UMM-T profile.

Core files for CMR UMM-T update and associations are:
* cmr.Dockerfile (for running the script via Jenkins)
* run_ummt_updater.sh (for executing the command line request)
* ops_swodlr_cmr_umm_t.json (UMM-T profile to keep updated locally for OPS)
* ops_associations.txt (list of concept_ids, one per line, to be associated with UMM-T for OPS)
* uat_swodlr_cmr_umm_t.json (UMM-T profile to keep updated locally for UAT)
* uat_associations.txt (list of concept_ids, one per line, to be associated with UMM-T for UAT)
29 changes: 29 additions & 0 deletions cmr/cmr.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM python:3.8-slim

## Create a new user
RUN adduser --quiet --disabled-password --shell /bin/sh --home /home/dockeruser --gecos "" --uid 300 dockeruser

# Get jq
RUN apt update -y
RUN apt install jq -y

USER dockeruser
ENV HOME /home/dockeruser
ENV PYTHONPATH "${PYTHONPATH}:/home/dockeruser/.local/bin"
ENV PATH="/home/dockeruser/.local/bin:${PATH}"

# Add artifactory as a trusted pip index
RUN mkdir $HOME/.pip
RUN echo "[global]" >> $HOME/.pip/pip.conf
RUN echo "index-url = https://cae-artifactory.jpl.nasa.gov/artifactory/api/pypi/pypi-release-virtual/simple" >> $HOME/.pip/pip.conf
RUN echo "trusted-host = cae-artifactory.jpl.nasa.gov pypi.org" >> $HOME/.pip/pip.conf
RUN echo "extra-index-url = https://pypi.org/simple" >> $HOME/.pip/pip.conf

WORKDIR "/home/dockeruser"

RUN pip install --upgrade pip \
&& pip install awscli --upgrade \
&& pip install 'podaac-dev-tools>=0.7.0'

RUN pip list
CMD ["sh"]
5 changes: 5 additions & 0 deletions cmr/ops_associations.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
C2296989359-POCLOUD
C2296989353-POCLOUD
C2758162620-POCLOUD
C2296989369-POCLOUD
C2765423410-POCLOUD
91 changes: 91 additions & 0 deletions cmr/ops_swodlr_cmr_umm_t.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@

{
"Name": "SWODLR",
"LongName": "SWOT On-Demand Level 2 Raster Generation",
"Type": "Web User Interface",
"Version": "#.#.#",
"URL": {
"URLContentType": "DistributionURL",
"Type": "GOTO WEB TOOL",
"URLValue": "http://swodlr.podaac.earthdatacloud.nasa.gov/"
},
"Description": "SWODLR (swaa·dler) is an open-source software system developed to generate custom Level 2 raster data products for the SWOT mission. It provides an Application Programming Interface (API) and Graphical User Interface (GUI) that allows end-users to provide custom configurations to generate on-demand raster data products from underlying standard data products (PIXC, PIXCVec).",
"ToolKeywords" : [
{
"ToolCategory": "EARTH SCIENCE SERVICES",
"ToolTopic": "DATA ANALYSIS AND VISUALIZATION",
"ToolTerm": "DATA VISUALIZATION"
},
{
"ToolCategory": "EARTH SCIENCE SERVICES",
"ToolTopic": "DATA MANAGEMENT/DATA HANDLING",
"ToolTerm": "SUBSETTING/SUPERSETTING",
"ToolSpecificTerm": "SPATIAL SUBSETTING"
},
{
"ToolCategory": "EARTH SCIENCE SERVICES",
"ToolTopic": "DATA MANAGEMENT/DATA HANDLING",
"ToolTerm": "SUBSETTING/SUPERSETTING",
"ToolSpecificTerm": "VARIABLE SUBSETTING"
},
{
"ToolCategory": "EARTH SCIENCE SERVICES",
"ToolTopic": "DATA ANALYSIS AND VISUALIZATION",
"ToolTerm": "GEOGRAPHIC INFORMATION SYSTEMS",
"ToolSpecificTerm": "WEB-BASED GEOGRAPHIC INFORMATION SYSTEMS"
},
{
"ToolCategory": "EARTH SCIENCE SERVICES",
"ToolTopic": "DATA MANAGEMENT/DATA HANDLING",
"ToolTerm": "DATA ACCESS/RETRIEVAL"
}
],
"PotentialAction": {
"Type": "SearchAction",
"Target": {
"Type": "EntryPoint",
"ResponseContentType": [
"text/html"
],
"UrlTemplate": "http://swodlr.podaac.earthdatacloud.nasa.gov/l={+layers}&ve={+bbox}&d={+date}",
"Description": "SWODLR (swaa·dler) is an open-source software system developed to generate custom Level 2 raster data products for the SWOT mission. It provides an Application Programming Interface (API) and Graphical User Interface (GUI) that allows end-users to provide custom configurations to generate on-demand raster data products from underlying standard data products (PIXC, PIXCVec).",
"HttpMethod": [
"GET"
]
},
"QueryInput": [
{
"ValueName": "layers",
"Description": "A comma-separated list of visualization layer ids, as defined by GIBS. These layers will be portrayed on the web application",
"ValueRequired": true,
"ValueType": "https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers#GIBSAPIforDevelopers-LayerNaming"
},
{
"ValueName": "date",
"Description": "A UTC ISO DateTime. The layers portrayed will correspond to this date.",
"ValueRequired": false,
"ValueType": "https://schema.org/startDate"
},
{
"ValueName": "bbox",
"Description": "A spatial bounding box that will set the spatial extent of the portrayed layers. The first point is the lower corner, the second point is the upper corner. A box is expressed as two points separated by a space character.",
"ValueRequired": false,
"ValueType": "https://schema.org/box"
}
]
},
"Organizations": [
{
"Roles": [
"ORIGINATOR"
],
"ShortName": "NASA/JPL/PODAAC",
"LongName": "Physical Oceanography Distributed Active Archive Center, Jet Propulsion Laboratory, NASA"
}
],
"MetadataSpecification": {
"URL": "https://cdn.earthdata.nasa.gov/umm/tool/v1.1.1",
"Name": "UMM-T",
"Version": "1.1.1"
}
}
15 changes: 15 additions & 0 deletions cmr/run_ummt_updater.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -Exo pipefail

tf_venue=$1
swodlr_version=$2
token_file=$3
file=cmr/${tf_venue}_swodlr_cmr_umm_t.json

set +x

token=$(jq -r .token $token_file)
jq --arg a $swodlr_version '.Version = $a' $file > cmr/cmr.json
ummt_updater -d -f cmr/cmr.json -a cmr/${tf_venue}_associations.txt -p POCLOUD -e ${tf_venue} -t "$token"

set -x
5 changes: 5 additions & 0 deletions cmr/uat_associations.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
C1244870607-POCLOUD
C1244870606-POCLOUD
C1244870608-POCLOUD
C1256507981-POCLOUD
C1256507983-POCLOUD
91 changes: 91 additions & 0 deletions cmr/uat_swodlr_cmr_umm_t.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@

{
"Name": "SWODLR",
"LongName": "SWOT On-Demand Level 2 Raster Generation",
"Type": "Web User Interface",
"Version": "#.#.#",
"URL": {
"URLContentType": "DistributionURL",
"Type": "GOTO WEB TOOL",
"URLValue": "http://swodlr.podaac.uat.earthdatacloud.nasa.gov/"
},
"Description": "SWODLR (swaa·dler) is an open-source software system developed to generate custom Level 2 raster data products for the SWOT mission. It provides an Application Programming Interface (API) and Graphical User Interface (GUI) that allows end-users to provide custom configurations to generate on-demand raster data products from underlying standard data products (PIXC, PIXCVec).",
"ToolKeywords" : [
{
"ToolCategory": "EARTH SCIENCE SERVICES",
"ToolTopic": "DATA ANALYSIS AND VISUALIZATION",
"ToolTerm": "DATA VISUALIZATION"
},
{
"ToolCategory": "EARTH SCIENCE SERVICES",
"ToolTopic": "DATA MANAGEMENT/DATA HANDLING",
"ToolTerm": "SUBSETTING/SUPERSETTING",
"ToolSpecificTerm": "SPATIAL SUBSETTING"
},
{
"ToolCategory": "EARTH SCIENCE SERVICES",
"ToolTopic": "DATA MANAGEMENT/DATA HANDLING",
"ToolTerm": "SUBSETTING/SUPERSETTING",
"ToolSpecificTerm": "VARIABLE SUBSETTING"
},
{
"ToolCategory": "EARTH SCIENCE SERVICES",
"ToolTopic": "DATA ANALYSIS AND VISUALIZATION",
"ToolTerm": "GEOGRAPHIC INFORMATION SYSTEMS",
"ToolSpecificTerm": "WEB-BASED GEOGRAPHIC INFORMATION SYSTEMS"
},
{
"ToolCategory": "EARTH SCIENCE SERVICES",
"ToolTopic": "DATA MANAGEMENT/DATA HANDLING",
"ToolTerm": "DATA ACCESS/RETRIEVAL"
}
],
"PotentialAction": {
"Type": "SearchAction",
"Target": {
"Type": "EntryPoint",
"ResponseContentType": [
"text/html"
],
"UrlTemplate": "http://swodlr.podaac.uat.earthdatacloud.nasa.gov/l={+layers}&ve={+bbox}&d={+date}",
"Description": "SWODLR (swaa·dler) is an open-source software system developed to generate custom Level 2 raster data products for the SWOT mission. It provides an Application Programming Interface (API) and Graphical User Interface (GUI) that allows end-users to provide custom configurations to generate on-demand raster data products from underlying standard data products (PIXC, PIXCVec).",
"HttpMethod": [
"GET"
]
},
"QueryInput": [
{
"ValueName": "layers",
"Description": "A comma-separated list of visualization layer ids, as defined by GIBS. These layers will be portrayed on the web application",
"ValueRequired": true,
"ValueType": "https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers#GIBSAPIforDevelopers-LayerNaming"
},
{
"ValueName": "date",
"Description": "A UTC ISO DateTime. The layers portrayed will correspond to this date.",
"ValueRequired": false,
"ValueType": "https://schema.org/startDate"
},
{
"ValueName": "bbox",
"Description": "A spatial bounding box that will set the spatial extent of the portrayed layers. The first point is the lower corner, the second point is the upper corner. A box is expressed as two points separated by a space character.",
"ValueRequired": false,
"ValueType": "https://schema.org/box"
}
]
},
"Organizations": [
{
"Roles": [
"ORIGINATOR"
],
"ShortName": "NASA/JPL/PODAAC",
"LongName": "Physical Oceanography Distributed Active Archive Center, Jet Propulsion Laboratory, NASA"
}
],
"MetadataSpecification": {
"URL": "https://cdn.earthdata.nasa.gov/umm/tool/v1.1.1",
"Name": "UMM-T",
"Version": "1.1.1"
}
}