-
Notifications
You must be signed in to change notification settings - Fork 494
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
As an admin and developer, I'd benefit from a simplified configuration mechanism #5293
Comments
@poikilotherm it's a holiday today so I'm not in IRC but I wanted to let you know that we got the following answer back from @kenfinnigan (also in Boston, apparently!) at https://gitter.im/eclipse/microprofile-config?at=5be9909c9600d10e649af2ab
|
@pdurbin: thanks for sharing! 👍 I'm fine with using Payara as long as it takes to get this inside Eclipse Glassfish :-) |
Suggestion for an alternative solution - the majority of the Other Drawbacks of this alternative - possibly less functionality, might need to rename some configuration options that are not valid environmental variable names. |
Two days ago @AdamBien recorded a nice video called "MicroProfile and ConfigMaps" that's well worth watching: http://adambien.blog/roller/abien/entry/using_configmaps_to_configure_microprofile He uses these two repos in the demo: |
Sounds interesting! Will listen later... But sounds great already... My current construction to map env vars to options is quite clumsy and error prone. :-/ |
@pdurbin I had a look at the demo and recording. What I am missing here: Adam is using a simplistic approach by mapping the ConfigMap values to environment variables. This is a good start and would make it much easier for my stuff at IQSS/dataverse-kubernetes, but you need to deal with secrets. You can do so with the It is worth noting that you can use the Microprofile Config API without having to switch to that profile or transition to a microservice. It just is a handy API. |
This is an old issue. I'm closing this. There is some work going on in this regard, using MPCONFIG. See #7000 |
This is a story to the epic #5292.
Might be of use for solutions of #4765.
Context
When installing Dataverse, you need to use
asadmin
commands to configure your instance either indirectly via the installation script and maybe directly for advanced options like storage etc.The installation script and
asadmin
calls itself are not idempotent. That makes it hard to use forThis inflexibility is primarily due to the nature of Java EE and application servers.Historically it made sense that the commonly used app servers where maintained by sysadmins and the application just reused the configuration.
Nowadays, times have changed. Kubernetes and Docker are here to stay and even if you use the application server installation approach with classic WAR deployment, chances are high you do not run anything else next to the Dataverse application on it.
In both cases, the configuration should be made simpler. Mangling a
domain.xml
manually is not an option. Continue to useasadmin
is at least error prone due to its nature, but it should still be possible.Proposed solution
Introduce MicroProfile Config API, which can be used on a lot of application servers, even if you don't take the full "micro" approach. It is inspired and successor to tools like Apache Tamaya and parts of Apache Deltaspike.
Payara 4 contains Config API v1.1, Payara 5 contains Config API 1.3. As we want to go with Payara 5 anyway (see #4172 and kind of #4248), this should be the one to look at.
The database for Java EE app can be configured much easier than via
domain.xml
since EE 7. See http://dplatz.de/blog/2018/self-contained-jee-app.html for an excellent tutorial. This can be combined with the mentioned Config API. (See also Payara Docs on variables used in annotations and configuration files.)Things to keep in mind
The text was updated successfully, but these errors were encountered: