From ded59ef2e440ca0d3e7736f8529bebdc49bca428 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Wed, 12 Jul 2023 15:30:35 +0200 Subject: [PATCH] feat(trino): Switch to new opa authorizer in 414 --- image_tools/conf.py | 3 ++- trino/Dockerfile | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/image_tools/conf.py b/image_tools/conf.py index f6ec7ff14..0f9c72b3a 100644 --- a/image_tools/conf.py +++ b/image_tools/conf.py @@ -418,7 +418,8 @@ {"product": "395", "java-base": "17", "opa_authorizer": "stackable0.1.0", "jmx_exporter": "0.16.1"}, {"product": "396", "java-base": "17", "opa_authorizer": "stackable0.1.0", "jmx_exporter": "0.16.1"}, {"product": "403", "java-base": "17", "opa_authorizer": "stackable0.1.0", "jmx_exporter": "0.16.1"}, - {"product": "414", "java-base": "17", "opa_authorizer": "stackable0.2.0", "jmx_exporter": "0.18.0", "storage_connector": "414"}, + # {"product": "414", "java-base": "17", "opa_authorizer": "stackable0.2.0", "jmx_exporter": "0.18.0", "storage_connector": "414"}, + {"product": "414", "java-base": "17", "opa_authorizer": "from-trino", "jmx_exporter": "0.18.0", "storage_connector": "414"}, ], }, { diff --git a/trino/Dockerfile b/trino/Dockerfile index 6efea8750..f7c9c851d 100644 --- a/trino/Dockerfile +++ b/trino/Dockerfile @@ -29,16 +29,19 @@ WORKDIR /stackable COPY --chown=stackable:stackable trino/stackable /stackable COPY --chown=stackable:stackable trino/licenses /licenses -RUN curl -L https://repo.stackable.tech/repository/packages/trino-server/trino-server-${PRODUCT}.tar.gz | tar -xzC . && \ - ln -s /stackable/trino-server-${PRODUCT} /stackable/trino-server +RUN if [ "$OPA_AUTHORIZER" == "from-trino" ]; then \ +curl -L https://repo.stackable.tech/repository/packages/trino-server/trino-server-${PRODUCT}-with-opa.tar.gz | tar -xzC . \ +; else \ +curl -L https://repo.stackable.tech/repository/packages/trino-server/trino-server-${PRODUCT}.tar.gz | tar -xzC . \ +; fi && \ +ln -s /stackable/trino-server-${PRODUCT} /stackable/trino-server RUN curl https://repo.stackable.tech/repository/packages/jmx-exporter/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar \ -o /stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar && \ chmod +x /stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar && \ ln -s /stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar /stackable/jmx/jmx_prometheus_javaagent.jar -RUN curl -L https://repo.stackable.tech/repository/packages/trino-opa-authorizer/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}.tar.gz | tar -xzC /stackable/trino-server/plugin - +RUN if [ -n "$OPA_AUTHORIZER" ] && [ "$OPA_AUTHORIZER" != "from-trino" ]; then curl -L https://repo.stackable.tech/repository/packages/trino-opa-authorizer/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}.tar.gz | tar -xzC /stackable/trino-server/plugin; fi RUN if [ -n "$STORAGE_CONNECTOR" ]; then curl https://repo.stackable.tech/repository/packages/trino-storage/trino-storage-${STORAGE_CONNECTOR}.zip -o /tmp/trino-storage-${STORAGE_CONNECTOR}.zip && \ unzip /tmp/trino-storage-${STORAGE_CONNECTOR}.zip -d /stackable/trino-server/plugin && \ rm -f /tmp/trino-storage-${STORAGE_CONNECTOR}.zip ; fi