Skip to content
Closed
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
2 changes: 2 additions & 0 deletions getting-started/jdbc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ This example requires `jq` to be installed on your machine.
export QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://postgres:5432/POLARIS
export QUARKUS_DATASOURCE_USERNAME=postgres
export QUARKUS_DATASOURCE_PASSWORD=postgres
export CLIENT_ID=root
export CLIENT_SECRET=s3cr3t
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you give some more details about why this is necessary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secret comes from getting-started/jdbc/docker-compose-bootstrap-db.yml (added under #1470).

Having this value set up front creates a backwards logical dependency, IMHO 🤔

Since docker-compose-postgres.yml depends on the root secret and takes it from the user's env., I think docker-compose-bootstrap-db.yml should take the root secret from the user's env. too (and fail if it is not provided).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, the spark client here passed creds here, can you please share what your command is to start docker

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am starting with the product and I might be doing something wrong, but as new user I followed this jdbc tutorial as starting point and if we follow it, the service polaris-setup invokes the polaris/create_catalog.sh script that requires this secrets to be passed in order to create quickstart catalog.
This will fail because it doesnt have credentials, the log entries are i mentioned in #1613 .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pjanuario : You initial fix works fine. I'm just suggesting to improve it :)

docker compose -f getting-started/jdbc/docker-compose-bootstrap-db.yml -f getting-started/assets/postgres/docker-compose-postgres.yml -f getting-started/jdbc/docker-compose.yml up
```

Expand Down
2 changes: 2 additions & 0 deletions getting-started/jdbc/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ services:
- STORAGE_LOCATION=${STORAGE_LOCATION}
- AWS_ROLE_ARN=${AWS_ROLE_ARN}
- AZURE_TENANT_ID=${AZURE_TENANT_ID}
- CLIENT_ID=${CLIENT_ID}
- CLIENT_SECRET=${CLIENT_SECRET}
volumes:
- ../assets/polaris/:/polaris
entrypoint: '/bin/sh -c "chmod +x /polaris/create-catalog.sh && /polaris/create-catalog.sh"'
Expand Down