-
Notifications
You must be signed in to change notification settings - Fork 332
[JDBC] : Deprecate EclipseLink #1515
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,18 +74,13 @@ The Polaris Admin Tool must be executed with the same configuration as the Polar | |
| configuration can be done via environment variables or system properties. | ||
|
|
||
| At a minimum, it is necessary to configure the Polaris Admin Tool to connect to the same database | ||
| used by the Polaris server. This can be done by setting the following system properties: | ||
|
|
||
| ```shell | ||
| java \ | ||
| -Dpolaris.persistence.eclipselink.configuration-file=/path/to/persistence.xml \ | ||
| -Dpolaris.persistence.eclipselink.persistence-unit=polaris \ | ||
| -jar quarkus/admin/build/polaris-quarkus-admin-*-runner.jar | ||
| ``` | ||
| used by the Polaris server. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do users need to do any action here to make this happen? If not, would it be better to remove this line altogether?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, but the immediate line below re-directs the user to move to metastore.md page to configure the metastore, so this was kind a redundant. Hence removed. |
||
|
|
||
| See the [metastore documentation]({{% ref "metastores" %}}) for more information on configuring the | ||
| database connection. | ||
|
|
||
| Note: Polaris will always create schema 'polaris_schema' during bootstrap under the configured database. | ||
|
|
||
| ## Bootstrapping Realms and Principal Credentials | ||
|
|
||
| The `bootstrap` command is used to bootstrap realms and create the necessary principal credentials | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,34 +135,32 @@ default, Polaris uses an in-memory metastore. | |
| > The default in-memory metastore is not suitable for production use, as it will lose all data | ||
| > when the server is restarted; it is also unusable when multiple Polaris replicas are used. | ||
|
|
||
| To use a durable metastore, you need to switch to the EclipseLink metastore, and provide your own | ||
| `persistence.xml` file. This file contains details of the database used for metastore management and | ||
| the connection settings. For more information, refer to the [metastore documentation]({{% ref | ||
| "metastores" %}}). | ||
| To enable a durable metastore, configure your system to use the Relational JDBC-backed metastore. | ||
| This implementation leverages Quarkus for datasource management and supports configuration through | ||
| environment variables or JVM -D flags at startup. For more information, refer to the [Quarkus configuration reference](https://quarkus.io/guides/config-reference#env-file). | ||
|
|
||
| Then, configure Polaris to use your metastore by setting the following properties: | ||
| Configure the metastore by setting the following ENV variables: | ||
|
|
||
| ```properties | ||
| polaris.persistence.type=eclipse-link | ||
| polaris.persistence.eclipselink.configuration-file=/path/to/persistence.xml | ||
| polaris.persistence.eclipselink.persistence-unit=polaris | ||
| ``` | ||
| POLARIS_PERSISTENCE_TYPE=relational-jdbc | ||
|
|
||
| Where: | ||
| QUARKUS_DATASOURCE_DB_KIND=postgresql | ||
| QUARKUS_DATASOURCE_USERNAME=<your-username> | ||
| QUARKUS_DATASOURCE_PASSWORD=<your-password> | ||
| QUARKUS_DATASOURCE_JDBC_URL=<jdbc-url-of-postgres> | ||
| ``` | ||
|
Comment on lines
+142
to
+151
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both env variable and Quarkus
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I support consistency. As to using If we want to go with config files, I propose to revive @jbonofre PR on that.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm OK with either way. Hi @dimas-b , can you share JB's PR?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm also supportive on JB's PR. It provides much better UX in terms of how users config Polaris server and admin tool. User can make changes to |
||
|
|
||
| - `polaris.persistence.type` indicates that we are using the EclipseLink metastore. | ||
| - `polaris.persistence.eclipselink.configuration-file` is the path to the `persistence.xml` file. | ||
| - `polaris.persistence.eclipselink.persistence-unit` is the name of the persistence unit to use (in | ||
| case the configuration file has many persistence units). | ||
|
|
||
| Typically, in Kubernetes, you would define the `persistence.xml` file as a `ConfigMap` and set the | ||
| `polaris.persistence.eclipselink.configuration-file` property to the path of the mounted file in | ||
| the container. | ||
| The relational JDBC metastore is a Quarkus-managed datasource and only supports Postgres and H2 as of now. | ||
| Please refer to the documentation here: | ||
| [Configure data sources in Quarkus](https://quarkus.io/guides/datasource) | ||
|
|
||
| > [!IMPORTANT] | ||
| > Be sure to secure your metastore backend since it will be storing sensitive data and catalog | ||
| > metadata. | ||
singhpk234 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Note: Polaris will always create schema 'polaris_schema' during bootstrap under the configured database. | ||
|
|
||
singhpk234 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ### Bootstrapping | ||
|
|
||
| Before using Polaris, you must **bootstrap** the metastore. This is a manual operation that must be | ||
|
|
||
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.
Is this because all tests currently run against the EclipseLink implementation?
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.
If we deprecate EclipseLink, why not purge it from tests too?
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 think we can keep it for now (even deprecated) and remove when we remove eclipselink.
Uh oh!
There was an error while loading. Please reload this page.
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.
Let's add a separate test profile for EclipseLink then and run maybe a sub-set of tests. How about the bootstrap test in the admin tool and the REST API test in the quarkus server?
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.
Note: removing this change actually makes all tests use JDBC, as far as I understand 🤔
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.
It might be best to keep doc changes in this PR and make
application.propertiesand test changes in another 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.
This profile is just used for eclipse link, the jdbc profile and lifecycle manager is is present is quarkus/test-commons. The reason why i kept both together is i we are deprecating eclipse link via doc and not via code, so hence updating default is in the same PR. Please Let me know your thoughts considering above.
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.
ok. thx for the clarification!