Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vlkb-soda
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ViaLactea
vlkb-soda
Commits
78954209
Commit
78954209
authored
8 months ago
by
Robert Butora
Browse files
Options
Downloads
Patches
Plain Diff
removes DB, AMQP and ia2token and adds TLS option to security
parent
16219174
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker/entrypoint.sh.soda
+6
-48
6 additions, 48 deletions
docker/entrypoint.sh.soda
with
6 additions
and
48 deletions
docker/entrypoint.sh.soda
+
6
−
48
View file @
78954209
...
...
@@ -9,15 +9,11 @@ whoami
env
#########################################################################
echo
"run-time config (compose.yaml):"
echo
"SECURITY : "
$SECURITY
echo
"AUTH_DB_* : "
$AUTH_DB_URI
" ["
$AUTH_DB_SCHEMA
"] "
$AUTH_DB_USERNAME
" / "
$AUTH_DB_PASSWORD
echo
"ACCESS_CONTEXT_ROOT : "
$ACCESS_CONTEXT_ROOT
echo
"RESPONSE_FORMAT : "
$RESPONSE_FORMAT
echo
"URL_CUTOUTS : "
$URL_CUTOUTS
echo
"RESOLVER_DB_* : "
$RESOLVER_DB_URI
" ["
$RESOLVER_DB_SCHEMA
"] "
$RESOLVER_DB_USERNAME
" / "
$RESOLVER_DB_PASSWORD
echo
"VLKBOBSCORE_PG_URI : "
$VLKBOBSCORE_PG_URI
echo
"build-time config'd (Dockefile):"
echo
"INST_DIR : "
$INST_DIR
...
...
@@ -29,13 +25,6 @@ echo "CATALINA_HOME : "$CATALINA_HOME
echo
"CATALINA_TMPDIR : "
$CATALINA_TMPDIR
#########################################################################
## configure vlkb-tools
if
test
-n
"
$VLKBOBSCORE_PG_URI
"
then
echo
"pg_uri=
$VLKBOBSCORE_PG_URI
"
>>
$INST_DIR
/etc/vlkb-obscore/datasets.conf
echo
"pg_schema=datasets"
>>
$INST_DIR
/etc/vlkb-obscore/datasets.conf
fi
## configure VLKB access
...
...
@@ -51,66 +40,35 @@ echo "fits_path_surveys=/srv/surveys" > $WEBAPP_DIR/WEB-INF/classes/cutout.prope
"application/fits;createfile=yes"
)
echo
"default_response_format=
$RESPONSE_FORMAT
"
echo
"fits_path_cutouts=/srv/cutouts"
if
test
-n
"
$AMQP_QUEUE_NAME
"
then
QUEUE_NAME
=
dockervlkb
$AMQP_QUEUE_NAME
fi
;;
application/x-vlkb
*
)
echo
"default_response_format=
$RESPONSE_FORMAT
"
echo
"fits_path_cutouts=/srv/cutouts"
echo
"fits_url_cutouts=
$URL_CUTOUTS
"
echo
"surveys_metadata_abs_pathname=/srv/surveys/survey_populate.csv"
echo
"default_sky_system=
GALACT
IC"
echo
"default_spec_system=
VELO_LSRK
"
echo
"default_sky_system=IC
RS
"
echo
"default_spec_system=
WAVE_Barycentric
"
echo
"show_duration=yes"
if
test
-n
"
$AMQP_QUEUE_NAME
"
then
QUEUE_NAME
=
dockervlkb
$AMQP_QUEUE_NAME
fi
;;
esac
if
test
-n
"
$QUEUE_NAME
"
then
echo
"amqp_host_name=localhost"
echo
"amqp_port=5672"
echo
"amqp_routing_key=
$QUEUE_NAME
"
fi
if
test
-n
"
$RESOLVER_DB_URI
"
then
echo
"db_uri=
$RESOLVER_DB_URI
"
echo
"db_schema=
$RESOLVER_DB_SCHEMA
"
echo
"db_user_name=
$RESOLVER_DB_USERNAME
"
echo
"db_password=
$RESOLVER_DB_PASSWORD
"
fi
}
>>
$WEBAPP_DIR
/WEB-INF/classes/cutout.properties
if
test
-n
"
$QUEUE_NAME
"
then
service rabbitmq-server start
$INST_DIR
/bin/vlkbd_exec.sh localhost
$QUEUE_NAME
$INST_DIR
/etc/vlkbd/datasets.conf
fi
#### Security
case
$SECURITY
in
ia2token
)
cd
$WEBAPP_DIR
/WEB-INF/
&&
rm
-f
web.xml
&&
cp
web-cutout-
$SECURITY
.xml web.xml
&&
cd
-
cp
/etc/pki/tls/server-connector.xml /etc/tomcat9/
cp
/etc/pki/tls/auth
*
.properties
$WEBAPP_DIR
/WEB-INF/classes/
rm
-f
$WEBAPP_DIR
/WEB-INF/lib/jjwt-
*
0.12
*
.jar
;;
iamtoken
)
cd
$WEBAPP_DIR
/WEB-INF/
&&
rm
-f
web.xml
&&
cp
web-cutout-
$SECURITY
.xml web.xml
&&
cd
-
cp
/etc/pki/tls/server-connector.xml /etc/tomcat9/
cp
/etc/pki/tls/iamtoken.properties
$WEBAPP_DIR
/WEB-INF/classes/
rm
-f
$WEBAPP_DIR
/WEB-INF/lib/jjwt-
*
0.11
*
.jar
;;
tsl
)
cp
/etc/pki/tls/server-connector.xml /etc/tomcat9/
rm
-f
$WEBAPP_DIR
/WEB-INF/lib/jjwt-
*
.jar
;;
*
)
echo
"Security not configured, runs open."
;;
...
...
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