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
2290ac63
Commit
2290ac63
authored
9 months ago
by
Robert Butora
Browse files
Options
Downloads
Patches
Plain Diff
docker: adds SKA IAM token config by env SKAIAM_*
parent
b6d9efa1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker/Dockerfile.soda
+8
-2
8 additions, 2 deletions
docker/Dockerfile.soda
docker/Dockerfile.soda.temurin-jammy
+7
-3
7 additions, 3 deletions
docker/Dockerfile.soda.temurin-jammy
docker/start-soda.sh.soda
+35
-13
35 additions, 13 deletions
docker/start-soda.sh.soda
with
50 additions
and
18 deletions
docker/Dockerfile.soda
+
8
−
2
View file @
2290ac63
...
...
@@ -29,8 +29,9 @@ COPY vlkb-${VLKB_VERSION}.deb ./
COPY vlkb-soda-${VLKB_VERSION}.war ${WEBAPP_DIR}/
RUN dpkg -i vlkb-${VLKB_VERSION}.deb \
&& cd ${WEBAPP_DIR} && unzip vlkb-soda-${VLKB_VERSION}.war \
&& apt-get autoremove && apt-get clean
&& apt-get autoremove && apt-get clean \
&& rm -f $WEBAPP_DIR/WEB-INF/lib/jjwt-*0.11*.jar
# remove jjwt used by IA2 (IA2 and IAM token filters used different ver of jjwt)
# configure build instance
...
...
@@ -58,6 +59,11 @@ WORKDIR ${CATALINA_HOME}
RUN chmod -R +rX .; chmod 1777 /var/log/tomcat9 /var/cache/tomcat9
WORKDIR ${CATALINA_BASE}
RUN chmod -R a+rwX conf
# enable SKA IAM token filter update
RUN chmod a+rw ${WEBAPP_DIR}/WEB-INF/web.xml \
&& chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/iamtoken.properties
RUN chmod +rx /root && chmod +rx /root/start-soda.sh
USER 1000:1000
CMD ["sh", "-c", "/root/start-soda.sh"]
...
...
This diff is collapsed.
Click to expand it.
docker/Dockerfile.soda.temurin-jammy
+
7
−
3
View file @
2290ac63
...
...
@@ -25,9 +25,9 @@ ARG VLKB_VERSION
COPY vlkb-${VLKB_VERSION}.deb ./
COPY vlkb-soda-${VLKB_VERSION}.war ${WEBAPP_DIR}/
RUN dpkg -i vlkb-${VLKB_VERSION}.deb \
&& cd ${WEBAPP_DIR} && unzip vlkb-soda-${VLKB_VERSION}.war
&& cd ${WEBAPP_DIR} && unzip vlkb-soda-${VLKB_VERSION}.war
\
&& rm -f $WEBAPP_DIR/WEB-INF/lib/jjwt-*0.11*.jar
# remove jjwt used by IA2 (IA2 and IAM token filters used different ver of jjwt)
# configure instance
...
...
@@ -45,6 +45,10 @@ COPY deps/setenv.sh ${CATALINA_BASE}/bin/
WORKDIR ${CATALINA_BASE}
RUN chmod -R a+rwX conf
# enable SKA IAM token filter update
RUN chmod a+rw ${WEBAPP_DIR}/WEB-INF/web.xml \
&& chmod a+rw ${WEBAPP_DIR}/WEB-INF/classes/iamtoken.properties
env ACCESS_CONTEXT_ROOT=datasets
# configure during start-up
COPY start-soda.sh.soda /root/start-soda.sh
...
...
This diff is collapsed.
Click to expand it.
docker/start-soda.sh.soda
+
35
−
13
View file @
2290ac63
...
...
@@ -13,6 +13,22 @@ env
mkdir
-p
$CATALINA_BASE
/conf/Catalina/localhost
cp
$WEBAPP_DIR
/META-INF/context.xml
$CATALINA_BASE
/conf/Catalina/localhost/
$ACCESS_CONTEXT_ROOT
.xml
# env SECURITY (deprecated)
case
$SECURITY
in
iamtoken
)
echo
"SECURITY is set: "
$SECURITY
cd
$WEBAPP_DIR
/WEB-INF/
&&
rm
-f
web.xml
&&
cp
web-cutout-
$SECURITY
.xml web.xml
&&
cd
-
cp
/etc/pki/tls/server-connector.xml
$CATALINA_BASE
/conf
cp
/etc/pki/tls/iamtoken.properties
$WEBAPP_DIR
/WEB-INF/classes/
;;
*
)
echo
"SECURITY not configured."
;;
esac
# configure TLS
if
[
-f
/etc/pki/tls/keystore.jks
]
&&
[
-f
/etc/pki/tls/keystore.pwd
]
;
...
...
@@ -22,24 +38,30 @@ fi
case
$KEYSTORE_ALIAS
in
*
)
echo
$KEYSTORE_ALIAS
echo
"KEYSTORE_ALIAS: "
$KEYSTORE_ALIAS
sed
-i
"s/tomcat/
$KEYSTORE_ALIAS
/"
$CATALINA_BASE
/conf/server-connector.xml
;;
esac
# env SECURITY (deprecated)
case
$SECURITY
in
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
$CATALINA_BASE
/conf
cp
/etc/pki/tls/iamtoken.properties
$WEBAPP_DIR
/WEB-INF/classes/
rm
-f
$WEBAPP_DIR
/WEB-INF/lib/jjwt-
*
0.11
*
.jar
;;
*
)
echo
"SECURITY not configured."
;;
esac
# configure SKA IAM
if
[
-z
"
$SKAIAM_INTROSPECT
"
]
||
[
-z
"
$SKAIAM_CLIENT
"
]
||
[
-z
"
$SKAIAM_PASSWORD
"
]
;
then
echo
"Some of SKAIAM_ is not set."
echo
"url: "
$SKAIAM_INTROSPECT
echo
"cli: "
$SKAIAM_CLIENT
echo
"pwd: "
$SKAIAM_PASSWORD
else
echo
"Config SKA IAM ..."
{
echo
"introspect=
$SKAIAM_INTROSPECT
"
echo
"client_name=
$SKAIAM_CLIENT
"
echo
"client_password=
$SKAIAM_PASSWORD
"
}
>
$WEBAPP_DIR
/WEB-INF/classes/iamtoken.properties
cp
$WEBAPP_DIR
/WEB-INF/web-cutout-iamtoken.xml
$WEBAPP_DIR
/WEB-INF/web.xml
fi
date
}
1> /tmp/start-soda.log 2>&1
...
...
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