Skip to content

Commit c125b2b

Browse files
committed
Fix quickstart doc with docker compose
1 parent 658670d commit c125b2b

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

getting-started/assets/.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CLIENT_ID=root
2+
CLIENT_SECRET=s3cr3t

getting-started/assets/postgres/docker-compose-postgres.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ services:
3232
volumes:
3333
# Bind local conf file to a convenient location in the container
3434
- type: bind
35-
source: ../assets/postgres/postgresql.conf
35+
source: ${ASSETS_PATH}/postgres/postgresql.conf
3636
target: /etc/postgresql/postgresql.conf
3737
command:
3838
- "postgres"

getting-started/eclipselink/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ This example requires `jq` to be installed on your machine.
3737
2. Start the docker compose group by running the following command from the root of the repository:
3838

3939
```shell
40-
docker compose -f getting-started/eclipselink/docker-compose-bootstrap-db.yml -f getting-started/assets/postgres/docker-compose-postgres.yml -f getting-started/eclipselink/docker-compose.yml up
40+
export ASSETS_PATH=$(pwd)/getting-started/assets/
41+
docker compose --env-file getting-started/assets/.env -f getting-started/assets/postgres/docker-compose-postgres.yml -f getting-started/eclipselink/docker-compose-bootstrap-db.yml -f getting-started/eclipselink/docker-compose.yml up
4142
```
4243

4344
3. Using spark-sql: attach to the running spark-sql container:

getting-started/eclipselink/docker-compose-bootstrap-db.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ services:
2525
polaris.persistence.type: eclipse-link
2626
polaris.persistence.eclipselink.configuration-file: /deployments/config/eclipselink/persistence.xml
2727
volumes:
28-
- ../assets/eclipselink/:/deployments/config/eclipselink
28+
- ${ASSETS_PATH}/eclipselink/:/deployments/config/eclipselink
2929
command:
3030
- "bootstrap"
3131
- "--realm=POLARIS"
32-
- "--credential=POLARIS,root,s3cr3t"
32+
- "--credential=POLARIS,${CLIENT_ID},${CLIENT_SECRET}"
3333
polaris:
3434
depends_on:
3535
polaris-bootstrap:

getting-started/eclipselink/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ services:
3838
quarkus.otel.sdk.disabled: "true"
3939
POLARIS_BOOTSTRAP_CREDENTIALS: POLARIS,${CLIENT_ID},${CLIENT_SECRET}
4040
volumes:
41-
- ../assets/eclipselink/:/deployments/config/eclipselink
41+
- ${ASSETS_PATH}/eclipselink/:/deployments/config/eclipselink
4242
healthcheck:
4343
test: ["CMD", "curl", "http://localhost:8182/q/health"]
4444
interval: 2s
@@ -58,7 +58,7 @@ services:
5858
- CLIENT_ID=${CLIENT_ID}
5959
- CLIENT_SECRET=${CLIENT_SECRET}
6060
volumes:
61-
- ../assets/polaris/:/polaris
61+
- ${ASSETS_PATH}/polaris/:/polaris
6262
entrypoint: '/bin/sh -c "chmod +x /polaris/create-catalog.sh && /polaris/create-catalog.sh"'
6363

6464
spark-sql:
@@ -82,7 +82,7 @@ services:
8282
--conf, "spark.sql.catalog.quickstart_catalog.type=rest",
8383
--conf, "spark.sql.catalog.quickstart_catalog.warehouse=quickstart_catalog",
8484
--conf, "spark.sql.catalog.quickstart_catalog.uri=http://polaris:8181/api/catalog",
85-
--conf, "spark.sql.catalog.quickstart_catalog.credential=${USER_CLIENT_ID}:${USER_CLIENT_SECRET}",
85+
--conf, "spark.sql.catalog.quickstart_catalog.credential=${CLIENT_ID}:${CLIENT_SECRET}",
8686
--conf, "spark.sql.catalog.quickstart_catalog.scope=PRINCIPAL_ROLE:ALL",
8787
--conf, "spark.sql.defaultCatalog=quickstart_catalog",
8888
--conf, "spark.sql.catalogImplementation=in-memory",
@@ -102,4 +102,4 @@ services:
102102
ports:
103103
- "8080:8080"
104104
volumes:
105-
- ../assets/trino-config/catalog:/etc/trino/catalog
105+
- ${ASSETS_PATH}/trino-config/catalog:/etc/trino/catalog

site/content/in-dev/unreleased/getting-started/quickstart.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ cd ~/polaris
3636
:polaris-quarkus-admin:assemble --rerun \
3737
-Dquarkus.container-image.tag=postgres-latest \
3838
-Dquarkus.container-image.build=true
39-
docker compose -f getting-started/eclipselink/docker-compose-postgres.yml -f getting-started/eclipselink/docker-compose-bootstrap-db.yml -f getting-started/eclipselink/docker-compose.yml up
39+
export ASSETS_PATH=$(pwd)/getting-started/assets/
40+
docker compose --env-file getting-started/assets/.env -f getting-started/assets/postgres/docker-compose-postgres.yml -f getting-started/eclipselink/docker-compose-bootstrap-db.yml -f getting-started/eclipselink/docker-compose.yml up
4041
```
4142

4243
You should see output for some time as Polaris, Spark, and Trino build and start up. Eventually, you won’t see any more logs and see some logs relating to Spark, resembling the following:

0 commit comments

Comments
 (0)