Skip to content
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

[DOCUMENTATION]: missing documentation on how to load conf-file from other locations #45

Closed
MonkeyCanCode opened this issue Aug 1, 2024 · 4 comments · Fixed by #88 or #104
Closed

Comments

@MonkeyCanCode
Copy link
Contributor

With eclipse-link extension enabled, an end-user will be able to update polaris-server.yml to the following to use a persistent backend:

metaStoreManager:
    type: eclipse-link
    conf-file: xxx
    persistence-unit: xxx

However, this seems to be only able to read off files from META-INF dirs. As those dirs will get packed into the JAR, it is not ideal for prod deployment as well as source code check-in for version control. Is there any way for an end-user to set the conf-file location to other path instead (e.g. /etc/polaris/config/persistence.xml)?

@MonkeyCanCode MonkeyCanCode changed the title Documentation: missing documentation on how to load conf-file from other locations [DOCUMENTATION]: missing documentation on how to load conf-file from other locations Aug 1, 2024
@annafil annafil moved this to Triage in Basic Kanban Board Aug 1, 2024
@eric-maynard
Copy link
Contributor

@MonkeyCanCode can you confirm if #79 addresses this issue for you?

@MonkeyCanCode
Copy link
Contributor Author

@MonkeyCanCode can you confirm if #79 addresses this issue for you?

Hello,

This I tried locally couple days back after got the EclipseLink to work but later on this will fail on following line (u can try the same, it will failed on bootstrap as well):

emf = Persistence.createEntityManagerFactory(persistenceUnitName, properties);

This will raise error regarding unable to find persistence-unit (with FileStream, it does allows us to load file from other location but the above code will abort about not able to find persistenceUnitName. I am assuming this is specific to Jakarta. I am not very familiar with Java framework. Let me know if help is needed to test it again if you think this will work?

@aihuaxu
Copy link
Contributor

aihuaxu commented Aug 6, 2024

@MonkeyCanCode There is a limitation that enforces the configuration to be in a jar. I made it to workaround in #88 to configure as as /tmp/conf.jar!/persistence.xml. Please take a look.

@MonkeyCanCode
Copy link
Contributor Author

MonkeyCanCode commented Aug 6, 2024

@MonkeyCanCode There is a limitation that enforces the configuration to be in a jar. I made it to workaround in #88 to configure as as /tmp/conf.jar!/persistence.xml. Please take a look.

Yes @aihuaxu, I took a look at that this morning. Seems to be a pretty odd limitation. However, it is usable for the time being. I can volume mount a config over then update the jar in pod to generate the new jar file with this external config. Thanks for the info. I will give that a try tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants