How does it work now
The application was designed in the "zip distro era" of Java deployments, when the primary deliverable was a ZIP archive that contained the whole self-contained application directory. This is, in fact, the existing layout of a Carapace ZIP for deployment:
bin/ directory containing:
lib/ directory containing all the dependencies JARs
conf/ directory containing the properties files like:
logback.xml in recent versions of Carapace
web/ directory containing:
META-INF/MANIFEST.MF file
META-INF/maven/org.carapaceproxy/carapace-ui/pom.properties with information on the artifact itself
ui/ with the whole Vue.js subproject
This structure is described in the Apache Maven Assembly Plugin configuration file zip-assembly.xml. It is usually installed under /opt/<app> or /data/<app>.
When running, additional files like server.java.pid and the logs are created somewhere inside that directory.
Clustering
In this codebase ZooKeeper is used as the cluster coordination layer. In contrast with HerdDB, which is embedded into the Carapace process, ZooKeeper is an external dependency and should be installed separately in a clustered deployment.
Preferable approach
This deployment is very non-ergonomic, especially for lightweight deployments like on the developer machine.
It would be cool to have, on release:
- a containerized installation (i.e. Docker, OCI);
- a self-contained JAR (i.e. a shadow JAR);
- the "legacy" ZIP installation;
- (bonus) a standard packaged installation like RPM and DEB (i.e. with
jpackage).
On development environments, the developer should be able to just use the "run" button of the IDE to execute the application in place, without polluting the system or the Git-tracked root directory with runtime files.
Additional files should be generated by Maven during build when possible.
Clustering
Clustering should be easily deployable without complex manual installations, and/or very well documented in the README or the wiki. This is another issue, though.
Self-contained runtime
It could be interesting to use tools link jlink/jpackage to ship a JRE along with the package. This is another issue, though.
How does it work now
The application was designed in the "zip distro era" of Java deployments, when the primary deliverable was a ZIP archive that contained the whole self-contained application directory. This is, in fact, the existing layout of a Carapace ZIP for deployment:
bin/directory containing:servicejava-utils.shandsetenv.shlib/directory containing all the dependencies JARsconf/directory containing the properties files like:cluster.propertiesfor services like ZooKeeper, BookKeeper and HerdDBlogging.propertiesforjava.util.logging, later replaced by Logback configuration in the top-level directoryserver.propertiesfor Carapace own configurationuser.propertiesfor Carapace user realm configurationzoo.cfgfor the ZooKeeper configurationlogback.xmlin recent versions of Carapaceweb/directory containing:META-INF/MANIFEST.MFfileMETA-INF/maven/org.carapaceproxy/carapace-ui/pom.propertieswith information on the artifact itselfui/with the whole Vue.js subprojectThis structure is described in the Apache Maven Assembly Plugin configuration file zip-assembly.xml. It is usually installed under
/opt/<app>or/data/<app>.When running, additional files like
server.java.pidand the logs are created somewhere inside that directory.Clustering
In this codebase ZooKeeper is used as the cluster coordination layer. In contrast with HerdDB, which is embedded into the Carapace process, ZooKeeper is an external dependency and should be installed separately in a clustered deployment.
Preferable approach
This deployment is very non-ergonomic, especially for lightweight deployments like on the developer machine.
It would be cool to have, on release:
jpackage).On development environments, the developer should be able to just use the "run" button of the IDE to execute the application in place, without polluting the system or the Git-tracked root directory with runtime files.
Additional files should be generated by Maven during build when possible.
Clustering
Clustering should be easily deployable without complex manual installations, and/or very well documented in the README or the wiki. This is another issue, though.
Self-contained runtime
It could be interesting to use tools link
jlink/jpackageto ship a JRE along with the package. This is another issue, though.