-
Notifications
You must be signed in to change notification settings - Fork 535
Description
IMHO this is an epic, not a single story.
This issue is successor to #5187 and closes it.
It is intended to serve as a base for solutions or make life easier in:
- Running integration tests for more than just API #5068 - Running integration tests for more than just API
- installing Dataverse under Payara 5 #4172 - Payara 5 Upgrade
- Refactoring of S3AccessIO driver #5072 - Refactoring of S3 storage driver
- Docker for production #4665 - Docker in production and projects related to that (IQSS/dataverse-docker and the like)
- Get Dataverse running on OpenShift (Docker and Kubernetes) #4040 - OpenShift / Kubernetes deployments
This is blocked by some stuff and relies on some prior art to be done:
Dependency Housekeeping and how developers will benefit from it #5288 - Dependency HousekeepingDone!- Stripping AWS Mail component with TrueZIP blocks packaging for docker images #5274 - Stripping AWS dependency and TrueZIP from POM
- Dependency Housekeeping, Round 2 #5360 - Dependency Housekeeping, second round
- As an admin and developer, I'd benefit from a simplified configuration mechanism #5293 - Simplify configuration of the application.
- Proposal: make persistent EJB timers non-persistent or not rely on database #5345 - Make EJB timers non-persistent to drop database requirement.
- Bootstrapping config on first deployment #5361 - Bootstraping empty instance
- Eating 100% CPU when setting com.sun.enterprise.server.logging.GFFileHandler.logtoFile=false payara/Payara#3506 and payara/docker-payaraserver-full#72 - Logging to console eats 1 CPU
Things to consider:
- Add a
HEALTCHECK CMDthat uses a to-be-built API endpoint reporting on health status?
Vision / Proposal
Currently, when running integration tests or deploying Dataverse to Docker/Kubernetes, only kind of heavyweight solutions exist with the DockerAIO for IT tests and most (all?) Docker/Kubernetes/OpenShift approaches relying on the installer script.
I encourage the following vision:
- Build a new image directly from a Maven target, needing only a dev env plus Docker installed and running (obsolete once img support is in place...)
- Make this image as small as possible with an application server only, add dependencies and the application.
- Anything else lives in other containers, following the micro services credo.
- Make the application container itself stateless, also following the micro services credo. (This does not affect the use of volumes/...)
- Make the configuration a breeze - don't use the install script inside the container. Instead provide options to get the configuration inside from external sources.
To get there I suggest using:
- fabric8io/docker-maven-plugin
- payara/server-full Docker image
- Separate Maven profile to build this as long as the "old way" is still used broadly.
Things to keep in mind:
- Ideally this is based on Payara 5, not 4.
- Let users still use the "old" WAR file approach in parallel! Somebody might rely on that. (That's why I killed As a developer and sysadmin, I would enjoy the benefits of using Java MicroProfile based deployments with an application server like Payara Micro or Thorntail. #5187)
- Let the configuration ways currently know to all users still work. Somebody might rely on that!
Give it a shot! (Testing)
To test, just have Docker, Maven, Git and Java installed.
Then do:
git clone https://github.com/poikilotherm/dataverse -b 5292-small-container
mvn -Pcontainer clean package docker:build docker:run -DskipTests
Please keep in mind that this is a feature branch. If you already have a cloned dataverse repo, you might better off using:
git remote add poikilotherm https://github.com/poikilotherm/dataverse
git fetch poikilotherm 5292-small-container
git checkout -b 5292-small-container
I regularly update this feature branch to be based on the latest develop. This involves rebasing, which will let your local branch be diverged. In that case, simply use git reset --hard poikilotherm/5292-small-container after a fetch.