You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by yz...@apache.org on 2026/06/26 16:49:30 UTC

(polaris) branch main updated: Doc: Simplify trino guide (#4902)

This is an automated email from the ASF dual-hosted git repository.

MonkeyCanCode pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new a843cf3d2c Doc: Simplify trino guide (#4902)
a843cf3d2c is described below

commit a843cf3d2cc7b17105a04777a0ed61627502ffdc
Author: Yong Zheng <yo...@gmail.com>
AuthorDate: Fri Jun 26 11:49:25 2026 -0500

    Doc: Simplify trino guide (#4902)
---
 site/content/guides/rustfs/docker-compose.yml |   2 +-
 site/content/guides/trino/docker-compose.yml  | 107 +-------------------------
 site/content/guides/trino/index.md            |  20 +++--
 3 files changed, 15 insertions(+), 114 deletions(-)

diff --git a/site/content/guides/rustfs/docker-compose.yml b/site/content/guides/rustfs/docker-compose.yml
index d163a58e97..a52ddf793f 100644
--- a/site/content/guides/rustfs/docker-compose.yml
+++ b/site/content/guides/rustfs/docker-compose.yml
@@ -20,7 +20,7 @@
 services:
 
   rustfs:
-    image: rustfs/rustfs:1.0.0-alpha.80
+    image: rustfs/rustfs:1.0.0-beta.8
     ports:
       - "9000:9000" # S3 API port
       - "9001:9001" # Console port
diff --git a/site/content/guides/trino/docker-compose.yml b/site/content/guides/trino/docker-compose.yml
index 6faa3d9382..54e01ca0e7 100644
--- a/site/content/guides/trino/docker-compose.yml
+++ b/site/content/guides/trino/docker-compose.yml
@@ -19,111 +19,6 @@
 
 services:
 
-  rustfs:
-    image: rustfs/rustfs
-    ports:
-      - "9000:9000" # S3 API port
-      - "9001:9001" # Console port
-    environment:
-      RUSTFS_ACCESS_KEY: rustfsadmin
-      RUSTFS_SECRET_KEY: rustfsadmin
-      RUSTFS_VOLUMES: /data
-      RUSTFS_ADDRESS: ":9000"
-      RUSTFS_CONSOLE_ENABLE: "true"
-      RUSTFS_CONSOLE_ADDRESS: ":9001"
-    healthcheck:
-      test: ["CMD-SHELL", "curl --fail http://127.0.0.1:9000/health && curl --fail http://127.0.0.1:9001/rustfs/console/health"]
-      interval: 30s
-      timeout: 10s
-      retries: 3
-      start_period: 40s
-
-  setup_bucket:
-    image: amazon/aws-cli:2.35.4
-    depends_on:
-      rustfs:
-        condition: service_healthy
-    environment:
-      AWS_ACCESS_KEY_ID: rustfsadmin
-      AWS_SECRET_ACCESS_KEY: rustfsadmin
-      AWS_ENDPOINT_URL: http://rustfs:9000
-    entrypoint: "/bin/sh"
-    command:
-      - "-c"
-      - >-
-        echo Creating RustFS bucket... &&
-        aws s3 mb s3://bucket123 &&
-        aws s3 ls &&
-        echo Bucket setup complete.
-
-  polaris:
-    image: apache/polaris:latest
-    ports:
-      - "8181:8181"
-      - "5005:5005"
-    depends_on:
-      rustfs:
-        condition: service_healthy
-      setup_bucket:
-        condition: service_completed_successfully
-    environment:
-      JAVA_DEBUG: true
-      JAVA_DEBUG_PORT: "*:5005"
-      AWS_REGION: us-west-2
-      AWS_ACCESS_KEY_ID: rustfsadmin
-      AWS_SECRET_ACCESS_KEY: rustfsadmin
-      POLARIS_BOOTSTRAP_CREDENTIALS: POLARIS,root,s3cr3t
-      polaris.realm-context.realms: POLARIS
-      quarkus.otel.sdk.disabled: "true"
-    healthcheck:
-      test: ["CMD", "curl", "--fail", "http://localhost:8182/q/health"]
-      interval: 2s
-      timeout: 10s
-      retries: 10
-      start_period: 10s
-
-  polaris-setup:
-    image: alpine/curl:8.20.0
-    depends_on:
-      polaris:
-        condition: service_healthy
-      setup_bucket:
-        condition: service_completed_successfully
-    environment:
-      - CLIENT_ID=root
-      - CLIENT_SECRET=s3cr3t
-    volumes:
-      - ../assets/polaris/:/polaris
-    entrypoint: "/bin/sh"
-    command:
-      - "-c"
-      - >-
-        source /polaris/obtain-token.sh &&
-        echo Creating catalog... &&
-        export STORAGE_CONFIG_INFO='{"storageType":"S3",
-          "endpoint":"http://localhost:9000",
-          "endpointInternal":"http://rustfs:9000",
-          "pathStyleAccess":true,
-          "region":"us-west-2"}' &&
-        export STORAGE_LOCATION='s3://bucket123' &&
-        /polaris/create-catalog.sh POLARIS $$TOKEN &&
-        echo Extra grants... &&
-        curl \
-          --fail-with-body \
-          -H "Authorization: Bearer $$TOKEN" \
-          -H 'Content-Type: application/json' \
-          -X PUT \
-          http://polaris:8181/api/management/v1/catalogs/quickstart_catalog/catalog-roles/catalog_admin/grants \
-          -d '{"type":"catalog", "privilege":"CATALOG_MANAGE_CONTENT"}' &&
-        echo Done. &&
-        touch /tmp/polaris-setup-done &&
-        tail -f /dev/null
-    healthcheck:
-      interval: 1s
-      timeout: 10s
-      retries: 240
-      test: ["CMD", "test", "-f", "/tmp/polaris-setup-done"]
-
   trino:
     image: trinodb/trino
     ports:
@@ -135,7 +30,7 @@ services:
       - CLIENT_ID=root
       - CLIENT_SECRET=s3cr3t
     volumes:
-      - ./catalog:/etc/trino/catalog
+      - ../trino/catalog:/etc/trino/catalog
     healthcheck:
       test: ["CMD", "curl", "--fail", "http://localhost:8080/v1/info"]
       interval: 5s
diff --git a/site/content/guides/trino/index.md b/site/content/guides/trino/index.md
index 9a9e10c91b..93c8eb10c1 100644
--- a/site/content/guides/trino/index.md
+++ b/site/content/guides/trino/index.md
@@ -30,10 +30,10 @@ menus:
         weight: 350
 ---
 
-This getting started guide provides a `docker-compose` file to set up [Trino](https://trino.io/) with Apache Polaris.
+This getting started guide provides `docker-compose` files to set up [Trino](https://trino.io/) with Apache Polaris.
 Apache Polaris is configured as an Iceberg REST Catalog, and [RustFS](https://rustfs.com/) provides S3-compatible object storage.
 
-The `docker-compose` file starts the following services:
+The docker compose setup starts the following services:
 * `rustfs` — S3-compatible object storage for Iceberg data files
 * `polaris` — Apache Polaris running with an in-memory metastore
 * `polaris-setup` — bootstraps a catalog, grants, and a namespace in Polaris
@@ -50,22 +50,29 @@ If a Polaris image is not already present locally, build one with the following
    -Dquarkus.container-image.build=true
 ```
 
-## Run the `docker-compose` file
+## Run the `docker-compose` files
 
 Start all services from the repo's root directory:
 
 ```shell
-docker compose -f site/content/guides/trino/docker-compose.yml up
+export S3_ENDPOINT=http://rustfs:9000
+docker compose -f site/content/guides/rustfs/docker-compose.yml -f site/content/guides/trino/docker-compose.yml up
 ```
 
 Wait until the `trino` service is healthy before proceeding. You can check by watching for the log line `HTTP server started` in the Trino container output.
 
+<!-- Guide testing: do not exercise the expensive Docker compose setup.
+```shell
+exit 0
+```
+-->
+
 ## Connect to the Trino CLI
 
 Open a Trino CLI session inside the running Trino container:
 
 ```shell
-docker compose -f site/content/guides/trino/docker-compose.yml exec trino trino
+docker exec -it $(docker ps -q --filter name=trino) trino
 ```
 
 ## Run SQL queries
@@ -82,8 +89,7 @@ CREATE TABLE events (
     event_type VARCHAR,
     user_id    BIGINT,
     created_at TIMESTAMP(6) WITH TIME ZONE
-)
-WITH (format = 'PARQUET');
+);
 
 INSERT INTO events VALUES
     (1, 'page_view', 101, TIMESTAMP '2024-10-01 10:00:00 UTC'),