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

[PRIP] Deploy prip-frontend app on OPS plateform #1071

Closed
12 of 17 tasks
Woljtek opened this issue Aug 9, 2023 · 1 comment
Closed
12 of 17 tasks

[PRIP] Deploy prip-frontend app on OPS plateform #1071

Woljtek opened this issue Aug 9, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request ops Ticket from ADS operation team Phase2 WERUM dev Ticket dedicated to WERUM development

Comments

@Woljtek
Copy link

Woljtek commented Aug 9, 2023

User story description: "As a end user I would like to use upto date PRIP features so that I can deploy the last version of rs-prip-frontend."

Definition of ready:

  • WERUM team provides to OPS team a planning for the test activities.
  • OPS team is available to provide support for deployment
  • Production-Common V1.14.0 is delivered
  • Production Interface Delivery Point Specification ICD v1.9 is diffused (ESA-EOPG-EOPGC-IF-3) by ESA
  • A pull request from "OPS" branch is created in rs-config app/rs-prip-frontend.
  • A template of script for DDIP queries on OPS plateform is provided by OPS team

Acceptance criteria:

Definition of Done:

  • Acceptance criteria are full filled
  • Pull-request is reviewed by rs-ops team
@suberti-ads
Copy link

hereafter download script sample:

#!/bin/sh
#==============================================================================
#synopsis        : RS-DDIP Frontend
#description     : Test to retrieve quicklook name from RS-API (DDIP)
#file name       : test-rs-ddip-dl-quicklool.sh
#parameters      : N/A
#author          :  FCR
#date            : 18/04/2023
#version         : 1.0
#prerequisite    : curl - jq
#example         : ./test-rs-ddip-dl-quicklool.sh
#==================================================================================

BLU="\033[34m"
VIO='\033[35m'
RED='\033[31m'
YEL="\033[33m"
VER="\033[32m"
ENDC="\033[0m"

# Declare static vars
RS_ENTRYPOINT="https://iam.platform.ops-csc.com"
RS_PROCESSING="https://processing.platform.ops-csc.com"

DDIP_API_URL="$RS_PROCESSING/ddip/odata/v1/Products"

# get credential (USER/PASSWORD)
. ./.credentials.secret

# get token
echo "$YEL ### PREREQUISITES ###"$ENDC
echo "Get keycloak token for user <$USER>\n"

TOKEN=$(curl --location --request POST "$RS_ENTRYPOINT/auth/realms/RS/protocol/openid-connect/token" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode "client_id=rs-ddip-frontend" \
--data-urlencode "client_secret=$CLIENTID_PWD" \
--data-urlencode "username=$USER" \
--data-urlencode "password=$PASSWORD" \
--data-urlencode 'grant_type=password' | jq -r .access_token) > /dev/null 2>&1

if [ $? -eq 0 ]; then
  echo "Token successfully retrieved\n"
else
  echo  -e $RED"An error occur, please check credentials and static vars\n"$ENDC
  exit 1
fi  

QUERY="$DDIP_API_URL"
CONTENTTYPE="Content-Type:application/json"
PRODUCT="S1A_IW_SLC__1SSH_20230414T192550_20230414T192620_048096_05C82A_EB55.SAFE.zip"
ID="c6200049-9f2c-43bd-9238-566646396446"
#curl -XGET $DDIP_API_URL -H CONTENTTYPE =Authorization: Bearer ${TOKEN}"

echo $BLU "### Test the quicklool dl"
# LIST
echo $YEL"RS-Native-API.085)" $ENDC

FILTER="($ID)"
FULLQ="$QUERY$FILTER"
echo "API: $VER $FULLQ $ENDC"
echo $YEL"PART1:$ENDC Display $PRODUCT"
curl -X GET $FULLQ -H "$CONTENTTYPE" -s -H "Authorization: Bearer ${TOKEN}" | jq '.' 
echo "___________________________________________________________________________________________\n"

FILTER="($ID)"'?$expand=Quicklooks'
FULLQ="$QUERY$FILTER"
echo "API: $VER $FULLQ $ENDC"
echo $YEL"PART2:$ENDC Display $PRODUCT with quicklook"
curl -X GET $FULLQ -H "$CONTENTTYPE" -s -H "Authorization: Bearer ${TOKEN}" | jq '.'
echo "___________________________________________________________________________________________\n"

echo $YEL"PART3:$ENDC Download quicklook"
curl -OLJ "https://processing.platform.ops-csc.com/ddip/odata/v1/Products(057dd48b-d580-408a-97f7-b659fd8a9089)/Quicklooks('S1A_EW_GRDM_1ADH_20230331T185214_20230331T185318_047892_05C13E_FD3D.SAFE_bwi.png')/\$value" -H "Authorization: Bearer ${TOKEN}"
echo "___________________________________________________________________________________________\n"

@w-fsi w-fsi self-assigned this Oct 4, 2023
@w-jka w-jka self-assigned this Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ops Ticket from ADS operation team Phase2 WERUM dev Ticket dedicated to WERUM development
Projects
None yet
Development

No branches or pull requests

4 participants