From a44366522a9c9104c81e63856e3db6da9f55dc02 Mon Sep 17 00:00:00 2001 From: jbyrne Date: Tue, 12 Sep 2023 19:58:47 -0700 Subject: [PATCH 1/3] swodlr-ui-5: added umm-t record and added to github actions --- .github/workflows/build.yml | 36 +++++++++++----------- cmr/Readme.md | 10 ++++++ cmr/cmr.Dockerfile | 29 ++++++++++++++++++ cmr/ops_associations.txt | 9 ++++++ cmr/ops_swodlr_cmr_umm_t.json | 57 +++++++++++++++++++++++++++++++++++ cmr/run_ummt_updater.sh | 15 +++++++++ cmr/uat_associations.txt | 1 + cmr/uat_swodlr_cmr_umm_t.json | 57 +++++++++++++++++++++++++++++++++++ 8 files changed, 196 insertions(+), 18 deletions(-) create mode 100644 cmr/Readme.md create mode 100644 cmr/cmr.Dockerfile create mode 100644 cmr/ops_associations.txt create mode 100644 cmr/ops_swodlr_cmr_umm_t.json create mode 100644 cmr/run_ummt_updater.sh create mode 100644 cmr/uat_associations.txt create mode 100644 cmr/uat_swodlr_cmr_umm_t.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e133dd9..cbac061 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -169,24 +169,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/cmr-umm-updater@0.5.0 - # 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/cmr-umm-updater@0.5.0 + 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 diff --git a/cmr/Readme.md b/cmr/Readme.md new file mode 100644 index 0000000..06e029f --- /dev/null +++ b/cmr/Readme.md @@ -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) \ No newline at end of file diff --git a/cmr/cmr.Dockerfile b/cmr/cmr.Dockerfile new file mode 100644 index 0000000..fa810cd --- /dev/null +++ b/cmr/cmr.Dockerfile @@ -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"] \ No newline at end of file diff --git a/cmr/ops_associations.txt b/cmr/ops_associations.txt new file mode 100644 index 0000000..4d22559 --- /dev/null +++ b/cmr/ops_associations.txt @@ -0,0 +1,9 @@ +C2296989380-POCLOUD +C2628598809-POCLOUD +C2628600898-POCLOUD +C2628598397-POCLOUD +C2296989383-POCLOUD +C2628595723-POCLOUD +C2628593693-POCLOUD +C2296989388-POCLOUD +C2296989390-POCLOUD \ No newline at end of file diff --git a/cmr/ops_swodlr_cmr_umm_t.json b/cmr/ops_swodlr_cmr_umm_t.json new file mode 100644 index 0000000..206fcf0 --- /dev/null +++ b/cmr/ops_swodlr_cmr_umm_t.json @@ -0,0 +1,57 @@ + +{ + "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" + } + ], + "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.0", + "Name": "UMM-T", + "Version": "1.0" + } +} \ No newline at end of file diff --git a/cmr/run_ummt_updater.sh b/cmr/run_ummt_updater.sh new file mode 100644 index 0000000..03c0fc1 --- /dev/null +++ b/cmr/run_ummt_updater.sh @@ -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 \ No newline at end of file diff --git a/cmr/uat_associations.txt b/cmr/uat_associations.txt new file mode 100644 index 0000000..70e8c71 --- /dev/null +++ b/cmr/uat_associations.txt @@ -0,0 +1 @@ +#TODO: put list of concept ids of SWOT collections in here \ No newline at end of file diff --git a/cmr/uat_swodlr_cmr_umm_t.json b/cmr/uat_swodlr_cmr_umm_t.json new file mode 100644 index 0000000..6622939 --- /dev/null +++ b/cmr/uat_swodlr_cmr_umm_t.json @@ -0,0 +1,57 @@ + +{ + "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" + } + ], + "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.0", + "Name": "UMM-T", + "Version": "1.0" + } +} \ No newline at end of file From 7285fb19c2517d729540de8f21b1416c0b763d18 Mon Sep 17 00:00:00 2001 From: jbyrne Date: Wed, 13 Sep 2023 11:17:26 -0700 Subject: [PATCH 2/3] swodlr-ui-5: update umm-t associations --- cmr/ops_associations.txt | 14 +++++--------- cmr/uat_associations.txt | 6 +++++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmr/ops_associations.txt b/cmr/ops_associations.txt index 4d22559..55e6e2b 100644 --- a/cmr/ops_associations.txt +++ b/cmr/ops_associations.txt @@ -1,9 +1,5 @@ -C2296989380-POCLOUD -C2628598809-POCLOUD -C2628600898-POCLOUD -C2628598397-POCLOUD -C2296989383-POCLOUD -C2628595723-POCLOUD -C2628593693-POCLOUD -C2296989388-POCLOUD -C2296989390-POCLOUD \ No newline at end of file +C2296989359-POCLOUD +C2296989353-POCLOUD +C2758162620-POCLOUD +C2296989369-POCLOUD +C2765423410-POCLOUD \ No newline at end of file diff --git a/cmr/uat_associations.txt b/cmr/uat_associations.txt index 70e8c71..352a48a 100644 --- a/cmr/uat_associations.txt +++ b/cmr/uat_associations.txt @@ -1 +1,5 @@ -#TODO: put list of concept ids of SWOT collections in here \ No newline at end of file +C1244870607-POCLOUD +C1244870606-POCLOUD +C1244870608-POCLOUD +C1256507981-POCLOUD +C1256507983-POCLOUD \ No newline at end of file From 5b4264c324870f94129e57a9e732c167208a80c5 Mon Sep 17 00:00:00 2001 From: jbyrne Date: Wed, 13 Sep 2023 16:05:55 -0700 Subject: [PATCH 3/3] swodlr-ui-5: url handoff added to ummt schemas --- cmr/ops_swodlr_cmr_umm_t.json | 38 +++++++++++++++++++++++++++++++++-- cmr/uat_swodlr_cmr_umm_t.json | 38 +++++++++++++++++++++++++++++++++-- 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/cmr/ops_swodlr_cmr_umm_t.json b/cmr/ops_swodlr_cmr_umm_t.json index 206fcf0..5ff615b 100644 --- a/cmr/ops_swodlr_cmr_umm_t.json +++ b/cmr/ops_swodlr_cmr_umm_t.json @@ -40,6 +40,40 @@ "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": [ @@ -50,8 +84,8 @@ } ], "MetadataSpecification": { - "URL": "https://cdn.earthdata.nasa.gov/umm/tool/v1.0", + "URL": "https://cdn.earthdata.nasa.gov/umm/tool/v1.1.1", "Name": "UMM-T", - "Version": "1.0" + "Version": "1.1.1" } } \ No newline at end of file diff --git a/cmr/uat_swodlr_cmr_umm_t.json b/cmr/uat_swodlr_cmr_umm_t.json index 6622939..0050391 100644 --- a/cmr/uat_swodlr_cmr_umm_t.json +++ b/cmr/uat_swodlr_cmr_umm_t.json @@ -40,6 +40,40 @@ "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": [ @@ -50,8 +84,8 @@ } ], "MetadataSpecification": { - "URL": "https://cdn.earthdata.nasa.gov/umm/tool/v1.0", + "URL": "https://cdn.earthdata.nasa.gov/umm/tool/v1.1.1", "Name": "UMM-T", - "Version": "1.0" + "Version": "1.1.1" } } \ No newline at end of file