-
Notifications
You must be signed in to change notification settings - Fork 331
Trino getting started docker compose #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @kevinjqliu , is this PR ready for review or not? Can you mark it as |
0e42f7e to
c99064e
Compare
kevinjqliu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need to update docs, similar to #44
getting-started/create-catalog.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats the stance on using this credential? Since this is a demo, I think it's acceptable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't tell whether this works by design or due to a bug...
|
r? @collado-mike / @RussellSpitzer |
|
Can also use Polaris python CLI to create a catalog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it also include iceberg.rest-catalog.oauth2.scope? It seems, non scoped requests fail with
org.apache.iceberg.exceptions.ForbiddenException: Forbidden: Principal 'XXX' with activated PrincipalRoles '[catalog]' and activated ids '[]' is not authorized for op XXX
Related trino PR - trinodb/trino#22961
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think trinodb/trino#22961 is required in case of iceberg.rest-catalog.oauth2.token. The scope is needed for iceberg.rest-catalog.oauth2.credential in my understanding.
RussellSpitzer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked for me, I'm not enough of a trino expert to understand if anything is off there but since this is just for demoing I think this is probably a good thing to merge. I would request @kevinjqliu we add the instructions to the readme though as well. I think the details you have in the main comment of this pullrequest is basically all we need.
@ebyhr Can you please check out the Trino specific parts and make sure that's all good to go?
ebyhr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using dynamic catalog mode (CATALOG_MANAGEMENT=dynamic) provides more flexibility, but I think a static mode is fine in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't know about this option, cool. lets leave as is for now since dynamic catalog management requires the user to run an extra CREATE CATALOG statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to not privilege one engine from other, I would propose to create an engine folder in the getting-started one. We can add trino, spark, flink, doris, dremio, etc there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure. is the engine folder necessary? How about just getting-started/trino?
getting-started/
trino/
spark/
...
687b1ce to
c741721
Compare
|
@RussellSpitzer @ebyhr @jbonofre Thanks for the review. I've updated the PR based on your comments. Please take another look. |
flyrain
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Do you want to take another look? @ebyhr @jbonofre @RussellSpitzer
| services: | ||
| polaris: | ||
| build: | ||
| context: . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this context work in your environment? I had do change it to ../../ because Dockerfile exists in the project root directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, this should be ../../, it was accidentally removed when i copied over the new setup in 9c2be7f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated! thanks
|
Reran docker with clean setup, confirmed working. |
|
Looks like all comments are resolved. I will merge it if there is no more comment today. |
|
Thanks @kevinjqliu for adding Trino docker compose. Thanks @jbonofre @RussellSpitzer @ebyhr @snazy @almazrevolut for the review. |
* add snyk policy * add license
Description
Add a new
getting-starteddirectory, with atrinosubdirectory which includes the followingdocker-compose-trino.yml, docker-compose file to spin up Polaris and Trino services, as well as setup script to initialize a catalog in Polariscreate-polaris-catalog.sh, setup script to initialize a catalog in Polaristrino-config/catalog/iceberg.propertiesfile, which configures Trino to register Polaris as an Iceberg REST catalogTo run, use the command:
Note
The setup script and Trino both use the credential
principal:root;realm:default-realm. This is a workaround so users do not need to fetch credentials from Polaris' output.To access the Trino CLI,
Note,
trino-trino-1is the name docker container.Run Trino commands via Trino CLI,
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #22
Reference
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist:
Please delete options that are not relevant.