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

Feature Request/Idea: create a base container image providing a Dataverse-tuned Payara application server #8932

Closed
poikilotherm opened this issue Aug 24, 2022 · 2 comments · Fixed by #8933 or #9236
Labels
Component: Containers Anything related to cloudy Dataverse, shipped in containers.
Milestone

Comments

@poikilotherm
Copy link
Contributor

poikilotherm commented Aug 24, 2022

Overview of the Feature Request

To allow building a Dataverse container, it needs a carefully tuned Payara application server image first.

While technically one might use https://hub.docker.com/r/payara/server-full, this image lacks a few things:

  • Based on Azul JDK, not Temurin/Adoptium
  • Missing CLI tools necessary for Dataverse operation
  • Non-optimized for production scenarios (at least not with the shipped community edition defaults)
  • Do not provide multi-arch images (AMD64 + ARM64 for Apple M1/2)
  • Some other small issues

With this issue I request we create a sustainable base image for future addition of a Dataverse container image.
It should be maintained in a separated Maven module and use dmp.fabric8.io to integrate it into Maven workflows.

What kind of user is the feature intended for?
Sysadmin, Developers

What inspired the request?
Provide community-backed container usage out of the box.

What existing behavior do you want changed?
Add a base image to build a Dataverse container image upon.

Any brand new behavior do you want to add to Dataverse?
Starting a "Container Guide" to describe and document the images, build processes etc.

Any related open or closed issues to this feature request?
#5292 #4665 #8709

Related folks to ping
@carlsonp @4tikhonov @pameyer @pdurbin @beepsoft @Kris-LIBIS

@poikilotherm poikilotherm added the Component: Containers Anything related to cloudy Dataverse, shipped in containers. label Aug 24, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 14, 2022
Instead of using "&& \" style continuation of a RUN layer,
newer Docker versions (since 2021) allow usage of heredocs.
Also move some ARG to more suitable places
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 14, 2022
By moving from tini to dumb-init, we can offer a new extension point:
if an application image extending this base image provides an executable
script at ${SCRIPT_DIR}/startInBackground.sh, it will be executed
after the init scripts and in parallel to the application server.

By adding ${SCRIPT_DIR} to $PATH, we can now also skip variable expansion,
fixing a bug: formerly, the "exec" in entrypoint.sh and startInForeground.sh
where not replacing the shell properly.

The switch to dumb-init makes sure signals will be transferred also to any
background processes!
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 14, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 19, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 19, 2022
Adding notes about the image tags produced by the community
for reuse in the community. Document final tagging
strategy, using the branch name (develop/main) instead of
the Java version or sth.

Reshape the automated builds and publishing part to be included
in the supported tags and build instructions section to reduce
text complexity and group matching parts together.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 19, 2022
Addin description on requirements to build cross platform
added as subsection of the build instructions seemed valuable.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 19, 2022
Addin description on requirements to build cross platform
added as subsection of the build instructions seemed valuable.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 19, 2022
Adding notes about the image tags produced by the community
for reuse in the community. Document final tagging
strategy, using the branch name (develop/main) instead of
the Java version or sth.

Reshape the automated builds and publishing part to be included
in the supported tags and build instructions section to reduce
text complexity and group matching parts together.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 19, 2022
Addin description on requirements to build cross platform
added as subsection of the build instructions seemed valuable.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 20, 2022
Instead of using "&& \" style continuation of a RUN layer,
newer Docker versions (since 2021) allow usage of heredocs.
Also move some ARG to more suitable places
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 20, 2022
By moving from tini to dumb-init, we can offer a new extension point:
if an application image extending this base image provides an executable
script at ${SCRIPT_DIR}/startInBackground.sh, it will be executed
after the init scripts and in parallel to the application server.

By adding ${SCRIPT_DIR} to $PATH, we can now also skip variable expansion,
fixing a bug: formerly, the "exec" in entrypoint.sh and startInForeground.sh
where not replacing the shell properly.

The switch to dumb-init makes sure signals will be transferred also to any
background processes!
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 20, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 20, 2022
Adding notes about the image tags produced by the community
for reuse in the community. Document final tagging
strategy, using the branch name (develop/main) instead of
the Java version or sth.

Reshape the automated builds and publishing part to be included
in the supported tags and build instructions section to reduce
text complexity and group matching parts together.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 20, 2022
Addin description on requirements to build cross platform
added as subsection of the build instructions seemed valuable.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 4, 2022
- Instead of a /docroot, add a more generic /dv which is owned by payara:payara
  and can be used to either store data in a single volume using subfolders or
  use subfolders with different backing volumes. Anyway, data is not written
  to overlay FS this way. (As long as an app image points to this location)
- Also define /secrets and /dumps as volumes, so data flowing into these
  locations is again not added to the overlay FS (which might cause severe
  damage in case of heap dumps!)
- Document the different locations in the base image guide.
- Remove the /docroot workaround for uploaded files. This will be solved at application
  level (either by moving the workaround there) or IQSS#8983
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 4, 2022
Instead of only running the steps to push images to Docker Hub
on a Git push event, also make it possible to run them an anything
not being a pull_request event. (Like a schedule)
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 8, 2022
…8932

When pushing to Docker Hub from development, we now also push
a short description with disclaimers, links to docs and license hints.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 8, 2022
Explain a bit (short!) what this image is and what to expect.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 8, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 8, 2022
Github context offers ".ref" but we need ".ref_name" to
match *just* the branch name.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 8, 2022
The login to the registry needs to be explicit
otherwise pushes will fail to acquire the
correct token and pushes are rejected with
"insufficient_scope: authorization failed"
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 10, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 10, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 10, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 10, 2022
As requested by review from @pdurbin, aligning image tag names.
pdurbin added a commit to poikilotherm/dataverse that referenced this issue Dec 16, 2022
@poikilotherm
Copy link
Contributor Author

Woah! Thx for merging! This is great @kcondon 🥳

@mreekie

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Containers Anything related to cloudy Dataverse, shipped in containers.
Projects
None yet
3 participants