From 2d44b94ba95e3ea0bacef5e1a64a74edb7370fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Tue, 27 Jun 2023 08:35:50 +0200 Subject: [PATCH 1/7] Add storage connector (https://github.com/snowlift/trino-storage) to Trino image. --- trino/CHANGELOG.md | 2 ++ trino/Dockerfile | 3 +++ 2 files changed, 5 insertions(+) diff --git a/trino/CHANGELOG.md b/trino/CHANGELOG.md index 53182ea20..37581f324 100644 --- a/trino/CHANGELOG.md +++ b/trino/CHANGELOG.md @@ -7,8 +7,10 @@ All notable changes to this project will be documented in this file. ### Added - Add `htpasswd` tool ([#385]). +- Experimental: Add Snowlift Trino Storage Connector (https://github.com/snowlift/trino-storage) ([#397]) [#385]: https://github.com/stackabletech/docker-images/pull/385 +[#397]: https://github.com/stackabletech/docker-images/pull/397 ## [414] - 2023-04-26 diff --git a/trino/Dockerfile b/trino/Dockerfile index 902255dcf..ee58ca212 100644 --- a/trino/Dockerfile +++ b/trino/Dockerfile @@ -38,6 +38,9 @@ RUN curl https://repo.stackable.tech/repository/packages/jmx-exporter/jmx_promet 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 curl https://repo.stackable.tech/repository/packages/trino-storage/trino-storage-${PRODUCT}.zip -o /tmp/trino-storage-${PRODUCT}.zip && \ + unzip /tmp/trino-storage-${PRODUCT}.zip -d /stackable/trino-server/plugin + # === # Mitigation for CVE-2021-44228 (Log4Shell) # This variable is supported as of Log4j version 2.10 and From 0560ac4d9e56f66516bbaab3f17688b49703b71e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Wed, 28 Jun 2023 15:17:19 +0200 Subject: [PATCH 2/7] Update trino/CHANGELOG.md Co-authored-by: Sebastian Bernauer --- trino/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trino/CHANGELOG.md b/trino/CHANGELOG.md index 37581f324..5c4a2d1d9 100644 --- a/trino/CHANGELOG.md +++ b/trino/CHANGELOG.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. ### Added - Add `htpasswd` tool ([#385]). -- Experimental: Add Snowlift Trino Storage Connector (https://github.com/snowlift/trino-storage) ([#397]) +- Experimental: Add [Snowlift Trino Storage Connector](https://github.com/snowlift/trino-storage) ([#397]) [#385]: https://github.com/stackabletech/docker-images/pull/385 [#397]: https://github.com/stackabletech/docker-images/pull/397 From 13ef0cefa7f710a59df4ebaf82b4d159f6f4b681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Wed, 28 Jun 2023 15:18:19 +0200 Subject: [PATCH 3/7] Added removal of temporary archive from download of storage connector. --- trino/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trino/Dockerfile b/trino/Dockerfile index ee58ca212..3c6345a71 100644 --- a/trino/Dockerfile +++ b/trino/Dockerfile @@ -39,7 +39,8 @@ RUN curl https://repo.stackable.tech/repository/packages/jmx-exporter/jmx_promet 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 curl https://repo.stackable.tech/repository/packages/trino-storage/trino-storage-${PRODUCT}.zip -o /tmp/trino-storage-${PRODUCT}.zip && \ - unzip /tmp/trino-storage-${PRODUCT}.zip -d /stackable/trino-server/plugin + unzip /tmp/trino-storage-${PRODUCT}.zip -d /stackable/trino-server/plugin && \ + rm -f /tmp/trino-storage-${PRODUCT}.zip # === # Mitigation for CVE-2021-44228 (Log4Shell) From bc7bcfafcd80c19c2f2ed558d0adf40dff4d8a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Wed, 28 Jun 2023 15:19:20 +0200 Subject: [PATCH 4/7] Style change --- trino/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trino/CHANGELOG.md b/trino/CHANGELOG.md index 5c4a2d1d9..84adb2b8a 100644 --- a/trino/CHANGELOG.md +++ b/trino/CHANGELOG.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. ### Added - Add `htpasswd` tool ([#385]). -- Experimental: Add [Snowlift Trino Storage Connector](https://github.com/snowlift/trino-storage) ([#397]) +- [EXPERIMENTAL] Add [Snowlift Trino Storage Connector](https://github.com/snowlift/trino-storage) ([#397]) [#385]: https://github.com/stackabletech/docker-images/pull/385 [#397]: https://github.com/stackabletech/docker-images/pull/397 From 55692501e7d26057e8fd36bbd3619d08a29ac86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Thu, 29 Jun 2023 12:20:36 +0200 Subject: [PATCH 5/7] Make download of Storage connector optional, only if storage_connector version is set in conf.py --- image_tools/conf.py | 2 +- trino/Dockerfile | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/image_tools/conf.py b/image_tools/conf.py index 21de2fd69..f6ec7ff14 100644 --- a/image_tools/conf.py +++ b/image_tools/conf.py @@ -418,7 +418,7 @@ {"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"}, + {"product": "414", "java-base": "17", "opa_authorizer": "stackable0.2.0", "jmx_exporter": "0.18.0", "storage_connector": "414"}, ], }, { diff --git a/trino/Dockerfile b/trino/Dockerfile index 3c6345a71..ad4969cba 100644 --- a/trino/Dockerfile +++ b/trino/Dockerfile @@ -5,6 +5,7 @@ ARG PRODUCT ARG OPA_AUTHORIZER ARG JMX_EXPORTER ARG RELEASE +ARG STORAGE_CONNECTOR LABEL name="Trino" \ maintainer="info@stackable.tech" \ @@ -38,9 +39,9 @@ RUN curl https://repo.stackable.tech/repository/packages/jmx-exporter/jmx_promet 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 curl https://repo.stackable.tech/repository/packages/trino-storage/trino-storage-${PRODUCT}.zip -o /tmp/trino-storage-${PRODUCT}.zip && \ - unzip /tmp/trino-storage-${PRODUCT}.zip -d /stackable/trino-server/plugin && \ - rm -f /tmp/trino-storage-${PRODUCT}.zip +RUN if [ ! -z "$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 # === # Mitigation for CVE-2021-44228 (Log4Shell) From d2b60b1a8890e8163de788ac1e95117e3bcdb80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Thu, 29 Jun 2023 12:25:28 +0200 Subject: [PATCH 6/7] Update trino/CHANGELOG.md Co-authored-by: Sebastian Bernauer --- trino/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trino/CHANGELOG.md b/trino/CHANGELOG.md index 84adb2b8a..cd46034a4 100644 --- a/trino/CHANGELOG.md +++ b/trino/CHANGELOG.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. ### Added - Add `htpasswd` tool ([#385]). -- [EXPERIMENTAL] Add [Snowlift Trino Storage Connector](https://github.com/snowlift/trino-storage) ([#397]) +- [EXPERIMENTAL] Add [Snowlift Trino Storage Connector](https://github.com/snowlift/trino-storage), but only for Trino version 414 ([#397]) [#385]: https://github.com/stackabletech/docker-images/pull/385 [#397]: https://github.com/stackabletech/docker-images/pull/397 From 2f2a21c40378135d34082c944030ce027c8aa286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Liebau?= Date: Thu, 29 Jun 2023 12:38:28 +0200 Subject: [PATCH 7/7] Silence linter --- trino/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trino/Dockerfile b/trino/Dockerfile index ad4969cba..6efea8750 100644 --- a/trino/Dockerfile +++ b/trino/Dockerfile @@ -39,7 +39,7 @@ RUN curl https://repo.stackable.tech/repository/packages/jmx-exporter/jmx_promet 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 [ ! -z "$STORAGE_CONNECTOR" ]; then curl https://repo.stackable.tech/repository/packages/trino-storage/trino-storage-${STORAGE_CONNECTOR}.zip -o /tmp/trino-storage-${STORAGE_CONNECTOR}.zip && \ +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