EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESA
PRISM
VS
Commits
113b8691
Commit
113b8691
authored
4 years ago
by
Mussab Abdalla
Browse files
Options
Downloads
Patches
Plain Diff
check swift auth
parent
e5835f5a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!29
Preprocessor test
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
testing/gitlab_test.sh
+0
-1
0 additions, 1 deletion
testing/gitlab_test.sh
testing/preprocessor_test.py
+12
-6
12 additions, 6 deletions
testing/preprocessor_test.py
testing/preprocessor_test.sh
+3
-0
3 additions, 0 deletions
testing/preprocessor_test.sh
with
15 additions
and
7 deletions
testing/gitlab_test.sh
+
0
−
1
View file @
113b8691
...
@@ -40,7 +40,6 @@ docker stack deploy -c ../docker-compose.emg.yml -c ../docker-compose.emg.dev.ym
...
@@ -40,7 +40,6 @@ docker stack deploy -c ../docker-compose.emg.yml -c ../docker-compose.emg.dev.ym
# installing the requirments
# installing the requirments
apk update
&&
apk add bash postgresql-dev gcc g++ python3 python3-dev musl-dev py-pip libffi-dev openssl-dev make
gdal
==
3.1.4-r0 gdal-dev
==
3.1.4-r0
apk update
&&
apk add bash postgresql-dev gcc g++ python3 python3-dev musl-dev py-pip libffi-dev openssl-dev make
gdal
==
3.1.4-r0 gdal-dev
==
3.1.4-r0
gdalinfo
--version
pip3
install
-r
requirements.txt
pip3
install
-r
requirements.txt
./docker-stack-wait.sh
-n
renderer
-n
registrar
-n
preprocessor
-n
ingestor
-n
sftp emg-pvs
./docker-stack-wait.sh
-n
renderer
-n
registrar
-n
preprocessor
-n
ingestor
-n
sftp emg-pvs
...
...
This diff is collapsed.
Click to expand it.
testing/preprocessor_test.py
+
12
−
6
View file @
113b8691
import
os
import
os
import
sys
import
sys
import
re
from
osgeo
import
gdal
from
osgeo
import
gdal
def
set_gdal_swift_auth
():
def
set_gdal_swift_auth
():
with
open
(
'
preprocessor_test.txt
'
,
'
r
'
)
as
auth_values
:
values_list
=
[]
for
aline
in
auth_values
:
x
=
re
.
search
(
"
(?:=)(.*)
"
,
aline
)
values_list
.
append
(
x
.
group
(
1
))
storage_url
=
os
.
environ
[
'
SWIFT_STORAGE_URL
'
]
gdal
.
SetConfigOption
(
"
SWIFT_STORAGE_URL
"
,
values_list
[
0
])
auth_token
=
os
.
environ
[
'
SWIFT_AUTH_TOKEN
'
]
gdal
.
SetConfigOption
(
"
SWIFT_AUTH_TOKEN
"
,
values_list
[
1
])
# setting gdal config
gdal
.
SetConfigOption
(
"
SWIFT_STORAGE_URL
"
,
storage_url
)
gdal
.
SetConfigOption
(
"
SWIFT_AUTH_TOKEN
"
,
auth_token
)
...
...
This diff is collapsed.
Click to expand it.
testing/preprocessor_test.sh
+
3
−
0
View file @
113b8691
...
@@ -19,13 +19,16 @@ IFS="="
...
@@ -19,13 +19,16 @@ IFS="="
while
read
key value
;
do
while
read
key value
;
do
if
[
"
$key
"
=
"export OS_STORAGE_URL"
]
;
then
if
[
"
$key
"
=
"export OS_STORAGE_URL"
]
;
then
export
SWIFT_STORAGE_URL
=
$value
export
SWIFT_STORAGE_URL
=
$value
else
else
export
SWIFT_AUTH_TOKEN
=
$value
export
SWIFT_AUTH_TOKEN
=
$value
fi
fi
done
< preprocessor_test.txt
done
< preprocessor_test.txt
cat
preprocessor_test.txt
printenv
while
read
product
;
do
while
read
product
;
do
echo
$product
echo
$product
# preprocessing the images and save the results in the result bucket
# preprocessing the images and save the results in the result bucket
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment