EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 5dc4a403 authored by Mussab Abdalla's avatar Mussab Abdalla
Browse files

initial preprocressor test

parent 2021a130
No related branches found
No related tags found
1 merge request!29Preprocessor test
......@@ -28,22 +28,25 @@ mkdir data
docker swarm init
docker network create -d overlay emg-extnet
# creat the docker secrets
# create the docker secrets
printf $OS_PASSWORD_DOWNLOAD | docker secret create OS_PASSWORD_DOWNLOAD -
printf $DJANGO_PASSWORD | docker secret create DJANGO_PASSWORD -
printf $OS_PASSWORD | docker secret create OS_PASSWORD -
# creat docker configs
# create docker configs
printf $sftp_users_emg | docker config create sftp_users_emg -
docker stack deploy -c ../docker-compose.emg.yml -c ../docker-compose.emg.dev.yml emg-pvs
# installing the requirments
apk update && apk add bash postgresql-dev gcc python3-dev musl-dev py-pip gdal libffi-dev openssl-dev make
pip3 install -r requirements.txt
./docker-stack-wait.sh -n renderer -n registrar -n preprocessor -n ingestor -n sftp emg-pvs
docker service ls
# perform the testing
bash ./preprocessor_test.sh
bash ./registrar_test.sh product_list.csv
if [ $? -ne 0 ]
......
#!/bin/sh
OS_PASSWORD=$(docker exec -it $(docker ps -qf "name=emg-pvs_preprocessor") cat /run/secrets/OS_PASSWORD)
preprocessing the images and save the results in the result bucket
docker exec -e OS_PASSWORD=$OS_PASSWORD -it $(docker ps -qf "name=emg-pvs_preprocessor") \
preprocessor preprocess --config-file testing/testing_preprocessor_config.yml KS03_AIS_PSH_1G_20160101T113020_20160101T113022_KGS_019339_75CE.tar
ST_AUTH_VERSION=3
OS_AUTH_URL=https://auth.cloud.ovh.net/v3/
OS_USERNAME=xqNChf3Rz5vs
OS_TENANT_NAME=7398560954290261
OS_TENANT_ID=1b418c4359064774af5d55da3f4bcac0
OS_REGION_NAME=SERCO-DIAS1
# gaining the necessary credentials and mapping them as env variables
swift auth --auth-version $ST_AUTH_VERSION --os-identity-api-version 3 --os-auth-url $OS_AUTH_URL \
--os-username $OS_USERNAME --os-password $OS_PASSWORD --os-tenant-name $OS_TENANT_NAME --os-tenant-id $OS_TENANT_ID \
--os-region-name $OS_REGION_NAME preprocessor_results > preprocessor_test.txt
IFS="="
while read key value ; do
if [ "$key" = "export OS_STORAGE_URL" ]; then
export SWIFT_STORAGE_URL=$value
else
export SWIFT_AUTH_TOKEN=$value
fi
done < preprocessor_test.txt
gdalinfo /vsiswift/preprocessor_results/KS03_AIS_PSH_1G_20160101T113020_20160101T113022_KGS_019339_75CE.tar/K3_20160101113014_19339_02281264_L1G.tif
rm preprocessor_test.txt
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment