-
Notifications
You must be signed in to change notification settings - Fork 535
Description
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 for
- Configuration and DevOp tooling like Ansible, Puppet etc
- Reuse Kubernetes ConfigMaps and Secrets or other technologies around Docker
- Switching configuration options later
- A lot of other scenarios like DB configuration, etc.
This 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 use asadmin 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
- Keep the install script working. Don't blow that up.
- ...?