Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-28145

Allow some runtime configuration in Nuxeo Docker images

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.1, 2021.0
    • Component/s: CI/CD
    • Tags:
    • Upgrade notes:
      Hide

      In order to control the JVM heap size with the new options (since Java 10): InitialRAMPercentage and MaxRAMPercentage, in nuxeo.conf, we've changed:

      JAVA_OPTS=-Xms512m -Xmx1024m
      

      to:

      JAVA_OPTS=-XX:InitialRAMPercentage=3 -XX:MaxRAMPercentage=25
      

      See the best practices about the Java Virtual Machine Settings for more information.

      Show
      In order to control the JVM heap size with the new options (since Java 10): InitialRAMPercentage and MaxRAMPercentage , in nuxeo.conf , we've changed: JAVA_OPTS=-Xms512m -Xmx1024m to: JAVA_OPTS=-XX:InitialRAMPercentage=3 -XX:MaxRAMPercentage=25 See the best practices about the Java Virtual Machine Settings for more information.
    • Team:
      PLATFORM
    • Sprint:
      nxplatform 11.1.21, nxplatform 11.1.22
    • Story Points:
      3

      Description

      Even if the goal is to have an immutable image that goes from environment to environment

      Here are several configuration use case that have to be covered to deploy the image in various scenarios.

      Custom regular configuration

      At build time we can install a Nuxeo Package that contains the configuration parameter and add the package to the list of included templates in `nuxeo.conf`

      Backend configuration (DBs, Kafka etc...).

      Using DNS resolution is not enough as we also need credentials and other params (ssl=true in MongoDB for instance or specification of some certs). Nuxeo APB uses a convention with the presence of /opt/nuxeo/bindings/* folders (see https://github.com/nuxeo/nuxeo-apb-catalog/blob/master/nuxeo-apb/files/init.sh), NCO uses a slightly different approach by using a `nuxeo.conf.d` folder that is populated by the ansible provisioning system (https://github.com/nuxeo/nco-platform/tree/3c3ce91dcf9b039ffe249d00229d607eed684527/ansible/roles/nuxeo-configure/templates/nuxeo.conf.d). They both append the configuration to nuxeo.conf

      JAVA_OPTS

      JAVA_OPTS configuration is probably something that we want being able to change without having to rebuild an image. Options like -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1 may help, but we probably also want to configure options to enable debugging options.

      Complete this TODO in the docker README. 

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 6 hours
                  1d 6h