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

8932 container base image #8933

Merged
merged 64 commits into from
Dec 16, 2022
Merged

Commits on Sep 20, 2022

  1. Configuration menu
    Copy the full SHA
    139f0f7 View commit details
    Browse the repository at this point in the history
  2. feat(ct-base): remove the esh tool

    Will be replaced with a capability to make API endpoints
    for authentication providers read from MPCONFIG sources.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    2319a47 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f0202cb View commit details
    Browse the repository at this point in the history
  4. fix(ct-base): unpack Payara to target/payara

    Payara 5 defaults to a "payara5" topmost dir, Payara 6 to
    "payara6". To avoid adding different directories in the
    assembly, cut the number from the directories name when
    unpacking.
    
    This does not prevent you from doing stupid things like
    not cleaning before switching the version leading to an
    unknown state of old and new libs, etc.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    2dc0596 View commit details
    Browse the repository at this point in the history
  5. fix(ct-base): migrate base image from OpenJDK to Eclipse Temurin

    There was an ongoing discussion that the Docker Hub Image "openjdk"
    is not backed by any official supported project but complete
    goodwill of Oracle shipping their JRE/JDK.
    
    There is no "real" release of OpenJDK . There exist only real
    distributions like Oracle JDK, Eclipse Temurin, Azul JDK,
    AWS Corretto etc (see https://whichjdk.com).
    
    As for this reason the "openjdk" image has been deprecated,
    switching to Eclipse Temurin JRE here.
    
    See also: docker-library/openjdk#505
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    246f8b8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    76ea508 View commit details
    Browse the repository at this point in the history
  7. feat(ct-base): enable multiarch image build via docker buildx

    With the rise of Apple M1/M2 silicons, we need to provide ARM64
    based images in addition to AMD64.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    f62dee2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    72935d4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    17d8b53 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0a9947b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2e812dc View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7e836c7 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    fe7b2d0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a93dbbd View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    67db02f View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d5f8075 View commit details
    Browse the repository at this point in the history
  17. style(ct-base): incorporate requested changes by @pdurbin

    - Change order of guides
    - Remove unnecessary quotes from IQSS
    - Add TOC to base image docs
    - Add flag again about community support only to base image docs
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    5e61241 View commit details
    Browse the repository at this point in the history
  18. feat(ct-base): make image names configurable and rename

    Add new Maven properties to choose a different Java base image
    and change the name of the target base image when people customize it.
    Also changes the build arg for the Java base image name.
    
    With this, the image name changes to follow the same convention
    as the Java base image.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    a3a7099 View commit details
    Browse the repository at this point in the history
  19. fix(ct-base): make container build use install not package goal

    By switching to `mvn install` instead of `mvn package`, we allow
    the main image carrying the application to declare a dependency
    on the container-base module (to make sure it get's built alongside,
    as we might want to change the Payara version!)
    
    This commits also adds the Maven install plugin to the parent POM
    for versioning plus to the container-base POM for having the target available.
    (This is a necessary workaround for a Maven Docker Plugin shortcoming.)
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    06d31fd View commit details
    Browse the repository at this point in the history
  20. fix(ct-base): flatten container-base POM

    By using the flattening POM plugin, the installed POM will
    not carry references to the dataverse-parent module.
    This reference is a) unnecessary and b) troublesome because of
    the ${revision} hack. (And we do not provide it as a dependency
    from Central/...)
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    98ad936 View commit details
    Browse the repository at this point in the history
  21. docs(ct-base): add notes about publishing and updates of the image

    Also mentioning the Github Action secrets as requested by @pdurbin.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    a3e6e3d View commit details
    Browse the repository at this point in the history
  22. fix(parent): add container-base as submodule

    Including here to add to reactor builds.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    520337d View commit details
    Browse the repository at this point in the history
  23. feat(ct-base): remove expired CA certificates at build time

    The base image uses Payara Community edition which might come
    with expired CA certificates. These trigger ugly log messages
    on startup. Removing them at build time helps with this.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    4642a7c View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    297b739 View commit details
    Browse the repository at this point in the history
  25. feat(ct-base): harden domain, disable hot reload, enable dev mode

    The production-ready domain should have autodeploy and hot reloading
    turned off for security reasons. On the other hand, hot reload is
    very useful for development. Introducing an env variable
     ENABLE_RELOAD to enable it on request.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    783f83c View commit details
    Browse the repository at this point in the history
  26. refactor(ct-base): enable JMX, AMX and tune monitoring levels

    Instead of acivating the JMX settings by default, switch back to off.
    Extending this with enabling AMX and with all the log levels set to HIGH,
    this might cause a huge performance overhead.
    Also lacking is a MicroProfile Metrics mapping to retrieve JMX data
    via the /metrics endpoint for collection.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    6d52fef View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    92b97c0 View commit details
    Browse the repository at this point in the history
  28. perf(ct-base): disable HTTPS listener port 8181

    By disabling the unnecessary HTTPS listener, we'll save
    some memory and CPU cycles on startup
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    934e42e View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    3c71f31 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    270b064 View commit details
    Browse the repository at this point in the history
  31. ci(ct-base): add action to build base container image

    This will not (yet?) push to Docker Hub, as this might not be the
    best of all ideas after all. But it ensures the build doesn't fail
    on changes to the sources.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    c9f3e55 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    e144dcd View commit details
    Browse the repository at this point in the history
  33. ci(ct-base): limit base image build to IQSS upstream

    Avoids unnecessary tries to push things when people develop in their
    forked repos.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    d99921f View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    f6ccd06 View commit details
    Browse the repository at this point in the history
  35. style(ct-base): make up base image name from tag and add default

    With defaulting to develop, we rest on using any build of the image during
    experimentation etc to go with a (local) develop tag. Removing
    the Java version from the tag makes it easier to use and reflects
    the nature of it. It aligns image builds with the release schema
    of the actual application while still allowing for experiments
    and having different sources of truth for released and develop code.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    64f84ea View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    5a986af View commit details
    Browse the repository at this point in the history
  37. feat(ct-base): enable base image pushes for master and develop branch

    - Make pushes to develop or master branch release a container image
      to Docker Hub by default (can be changed / extended).
    - Defaulting to the develop tag by default makes it more reusable for
      depending workflows based on pull requests.
    - Moving all multi-arch building to only happen on pushes,
      as it will be done during push/deploy phase only and those need
      credentials only avail in git push context running at repo owner of
      CI action.
    - Removing the Java version matrix parameter, too - we are gonna stick
      with what is default for releasing the images as they are meant to
      be a somewhat reliable base. It's still open for experiments.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    65f9d63 View commit details
    Browse the repository at this point in the history
  38. style(ct-base): upgrade Dockerfile with heredocs IQSS#8932

    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 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    8f39ef2 View commit details
    Browse the repository at this point in the history
  39. feat,fix(ct-base): add extension point for background script IQSS#8932

    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 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    be82c36 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    b386c06 View commit details
    Browse the repository at this point in the history
  41. ci(shellcheck,shellspec): split ShellCheck and ShellSpec

    To avoid unnecessary Shellspec runs for scripts that have no
    such tests, branch out the Shellcheck part of it into different
    workflow.
    
    Also make "bash" explicit as the container base image using
    an "unknown shebang" via dumb-init, but it's simply bash.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    f8bf734 View commit details
    Browse the repository at this point in the history
  42. docs(ct-base): clarify support image tags IQSS#8932

    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 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    626b495 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    7759211 View commit details
    Browse the repository at this point in the history
  44. docs(ct-base): add notes about multiarch builds IQSS#8932

    Addin description on requirements to build cross platform
    added as subsection of the build instructions seemed valuable.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    2141bca View commit details
    Browse the repository at this point in the history
  45. feat(ct-base): add wait-for script to image

    Many scripts shipped with an app image might rely
    on the availability of an external service, API or simply
    the database or search index.
    
    Adding a standard script here to make it easier to wait for
    their availability.
    poikilotherm committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    276b3b5 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2022

  1. Configuration menu
    Copy the full SHA
    45abe31 View commit details
    Browse the repository at this point in the history
  2. chore(deps): remove Payara version from Maven ct profile

    With the merge of IQSS#8949 the custom version is no longer necessary.
    poikilotherm committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    0959c84 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2022

  1. Configuration menu
    Copy the full SHA
    a9700b6 View commit details
    Browse the repository at this point in the history
  2. build(ct-base): switch to Payara 5.2022.4

    The upgrade to 5.2022.3 made Dataverse deployments
    fail because the postboot script deployment method
    was broken. This has been fixed with 5.2022.4, which
    is why we use this version now.
    poikilotherm committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    ee1e0c8 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2022

  1. feat(ct-base): make buildx/BuildKit use a shared state for builds

    Should speed up recurring builds a bit.
    poikilotherm committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    05345ba View commit details
    Browse the repository at this point in the history
  2. feat(ct-base): switch /docroot to /dv and add volumes IQSS#8932

    - 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 committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    e261e37 View commit details
    Browse the repository at this point in the history
  3. ci(ct-base): switch some steps to run on push or schedule IQSS#8932

    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 committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    5d77ab9 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. docs,ci(ct-base): add and push README description to Docker Hub IQSS#…

    …8932
    
    When pushing to Docker Hub from development, we now also push
    a short description with disclaimers, links to docs and license hints.
    poikilotherm committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    fbfcaa4 View commit details
    Browse the repository at this point in the history
  2. docs(ct-base): add short intro to base image docs page IQSS#8932

    Explain a bit (short!) what this image is and what to expect.
    poikilotherm committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    1241591 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    22eb801 View commit details
    Browse the repository at this point in the history
  4. ci(ct-base): fix step if-conditions for branch names IQSS#8932

    Github context offers ".ref" but we need ".ref_name" to
    match *just* the branch name.
    poikilotherm committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    7d4388e View commit details
    Browse the repository at this point in the history
  5. ci(ct-base): fix failing image pushes IQSS#8932

    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 committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    3d790aa View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2022

  1. docs(ct-base): rephrase slightly to match wording in main index

    Co-authored-by: Benjamin Peuch <benjamin.peuch@gmail.com>
    poikilotherm and BPeuch authored Nov 9, 2022
    Configuration menu
    Copy the full SHA
    6096880 View commit details
    Browse the repository at this point in the history
  2. docs(ct-base): apply some language tweaks to docs pages

    Co-authored-by: Benjamin Peuch <benjamin.peuch@gmail.com>
    poikilotherm and BPeuch authored Nov 9, 2022
    Configuration menu
    Copy the full SHA
    4a79dcb View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2022

  1. Configuration menu
    Copy the full SHA
    f1a64a8 View commit details
    Browse the repository at this point in the history
  2. style(ct-base): rephrase container image tags IQSS#8932

    As requested by review from @pdurbin, aligning image tag names.
    poikilotherm committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    426f746 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2022

  1. Configuration menu
    Copy the full SHA
    c63feb7 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2022

  1. Configuration menu
    Copy the full SHA
    aa7b8ee View commit details
    Browse the repository at this point in the history
  2. tweak docs IQSS#8932

    pdurbin committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    5122515 View commit details
    Browse the repository at this point in the history