Skip to content

feat(docker): sync assets of images #1293

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

Merged
merged 2 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker-admin-ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apk update \
# TODO:
# - use NODE_ENV=production
# - download build package (not git clone)
ENV ADMIN_UI_VERSION=68dfd5f0185eb1c3f0612daea2fb859b0b207cef
ENV ADMIN_UI_VERSION=f1149ac4a3c08682bbb0037c2e03d5e97a52593a

RUN mkdir -p /opt/flex

Expand Down Expand Up @@ -70,7 +70,7 @@ RUN python3 -m ensurepip \
# jans-linux-setup sync
# =====================

ENV JANS_SOURCE_VERSION=bd40c5b3ed82373225790e3d66ed7f7cd3e04ccb
ENV JANS_SOURCE_VERSION=38653c9cb9eb992213c5f230a5f36ce1187d0197
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup

# note that as we're pulling from a monorepo (with multiple project in it)
Expand Down
2 changes: 1 addition & 1 deletion docker-admin-ui/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ libcst<0.4
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.50.1
jwcrypto==1.4.2
git+https://github.com/JanssenProject/jans@485478b31d2fadeae744ce8c9bbd716f0f334c90#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@36cd1798afaa3c1c05246a4a338804d20713cf9f#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
11 changes: 9 additions & 2 deletions docker-casa/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ RUN mkdir -p ${JETTY_BASE}/casa/webapps \
&& java -jar ${JETTY_HOME}/start.jar jetty.home=${JETTY_HOME} jetty.base=${JETTY_BASE}/casa --add-module=server,deploy,resources,http,jsp,cdi-decorate,jmx,stats,logging-log4j2 --approve-all-licenses \
&& rm -rf /tmp/casa.war /tmp/WEB-INF

# casa plugins
RUN mkdir -p /opt/jans/jetty/casa/plugins \
&& for casa_plugin in strong-authn-settings authorized-clients custom-branding; \
do \
wget -nv "https://maven.gluu.org/maven/org/gluu/casa/plugins/${casa_plugin}/${GLUU_VERSION}/${casa_plugin}-${GLUU_VERSION}-jar-with-dependencies.jar" -O "/opt/jans/jetty/casa/plugins/${casa_plugin}-${GLUU_VERSION}.jar"; \
done

# ======
# Python
# ======
Expand All @@ -69,7 +76,7 @@ COPY conf/prometheus-config.yaml /opt/prometheus/
# jans-linux-setup sync
# =====================

ENV JANS_SOURCE_VERSION=bd40c5b3ed82373225790e3d66ed7f7cd3e04ccb
ENV JANS_SOURCE_VERSION=38653c9cb9eb992213c5f230a5f36ce1187d0197
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup

# note that as we're pulling from a monorepo (with multiple project in it)
Expand Down Expand Up @@ -216,7 +223,7 @@ ENV CN_MAX_RAM_PERCENTAGE=75.0 \
LABEL org.opencontainers.image.url="ghcr.io/gluufederation/flex/casa" \
org.opencontainers.image.authors="Gluu Inc. <[email protected]>" \
org.opencontainers.image.vendor="Gluu Federation" \
org.opencontainers.image.version="1.0.17" \
org.opencontainers.image.version="5.0.0" \
org.opencontainers.image.title="Gluu Flex Casa" \
org.opencontainers.image.description="Self-service portal for people to manage their account security preferences in the Gluu Server, like 2FA"

Expand Down
2 changes: 1 addition & 1 deletion docker-casa/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ webdavclient3>=3.14.5
libcst<0.4
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.41.0
git+https://github.com/JanssenProject/jans@485478b31d2fadeae744ce8c9bbd716f0f334c90#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@36cd1798afaa3c1c05246a4a338804d20713cf9f#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-casa/scripts/auth_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from settings import LOGGING_CONFIG

logging.config.dictConfig(LOGGING_CONFIG)
logger = logging.getLogger("entrypoint")
logger = logging.getLogger("casa")


manager = get_manager()
Expand Down
2 changes: 1 addition & 1 deletion docker-casa/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from settings import LOGGING_CONFIG

logging.config.dictConfig(LOGGING_CONFIG)
logger = logging.getLogger("entrypoint")
logger = logging.getLogger("casa")

manager = get_manager()

Expand Down
18 changes: 2 additions & 16 deletions docker-casa/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@ set -e
# FUNCTIONS
# =========

get_casa_plugins(){
# ===============
# PREPARE PLUGINS
# ===============
CASA_PLUGIN_DIRECTORY=/opt/jans/jetty/casa/plugins
CASA_PLUGIN_REPO=https://maven.gluu.org/maven/org/gluu/casa/plugins
wget -q ${CASA_PLUGIN_REPO}/strong-authn-settings/${GLUU_VERSION}/strong-authn-settings-${GLUU_VERSION}-jar-with-dependencies.jar -O ${CASA_PLUGIN_DIRECTORY}/strong-authn-settings-${GLUU_VERSION}.jar \
&& wget -q ${CASA_PLUGIN_REPO}/authorized-clients/${GLUU_VERSION}/authorized-clients-${GLUU_VERSION}-jar-with-dependencies.jar -O ${CASA_PLUGIN_DIRECTORY}/authorized-clients-${GLUU_VERSION}.jar \
&& wget -q ${CASA_PLUGIN_REPO}/custom-branding/${GLUU_VERSION}/custom-branding-${GLUU_VERSION}-jar-with-dependencies.jar -O ${CASA_PLUGIN_DIRECTORY}/custom-branding-${GLUU_VERSION}.jar
#&& wget -q ${CASA_PLUGIN_REPO}/account-linking/${GLUU_VERSION}/account-linking-${GLUU_VERSION}.jar -O ${CASA_PLUGIN_DIRECTORY}/account-linking-${GLUU_VERSION}.jar \
#&& wget -q ${CASA_PLUGIN_REPO}/bioid-plugin/${GLUU_VERSION}/bioid-plugin-${GLUU_VERSION}.jar -O ${CASA_PLUGIN_DIRECTORY}/bioid-plugin-${GLUU_VERSION}.jar \
#&& wget -q ${CASA_PLUGIN_REPO}/cert-authn/${GLUU_VERSION}/cert-authn-${GLUU_VERSION}.jar -O ${CASA_PLUGIN_DIRECTORY}/cert-authn-${GLUU_VERSION}.jar \
#&& wget -q ${CASA_PLUGIN_REPO}/duo-plugin/${GLUU_VERSION}/duo-plugin-${GLUU_VERSION}.jar -O ${CASA_PLUGIN_DIRECTORY}/duo-plugin-${GLUU_VERSION}.jar
}

get_prometheus_opt() {
prom_opt=""

Expand Down Expand Up @@ -53,7 +38,8 @@ python3 /app/scripts/upgrade.py
python3 /app/scripts/auth_conf.py
python3 /app/scripts/mod_context.py casa

get_casa_plugins
# create administrable file ootb
touch "$GLUU_CASA_ADMIN_LOCK_FILE"

# run Casa server
cd /opt/jans/jetty/casa
Expand Down
2 changes: 1 addition & 1 deletion docker-casa/scripts/jca_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
TMP_DIR = "/tmp/webdav"

logging.config.dictConfig(LOGGING_CONFIG)
logger = logging.getLogger("webdav")
logger = logging.getLogger("casa")


def sync_from_webdav(url, username, password):
Expand Down
2 changes: 1 addition & 1 deletion docker-casa/scripts/mod_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from settings import LOGGING_CONFIG

logging.config.dictConfig(LOGGING_CONFIG)
logger = logging.getLogger("entrypoint")
logger = logging.getLogger("casa")


Library = namedtuple("Library", ["path", "basename", "meta"])
Expand Down
16 changes: 1 addition & 15 deletions docker-casa/scripts/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,10 @@
"level": "INFO",
"propagate": True,
},
"wait": {
"handlers": ["console"],
"level": "INFO",
"propagate": False,
},
"webdav": {
"handlers": ["console"],
"level": "INFO",
"propagate": False,
},
"entrypoint": {
"casa": {
"handlers": ["console"],
"level": "INFO",
"propagate": False,
},
},
# "root": {
# "level": "INFO",
# "handlers": ["console"],
# },
}
2 changes: 1 addition & 1 deletion docker-casa/scripts/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from settings import LOGGING_CONFIG

logging.config.dictConfig(LOGGING_CONFIG)
logger = logging.getLogger("entrypoint")
logger = logging.getLogger("casa")

Entry = namedtuple("Entry", ["id", "attrs"])

Expand Down