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

Fix Docker handling of property nuxeo.vcs.ddlmode

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.10
    • Fix Version/s: ADDONS_9.1
    • Component/s: Docker Image

      Description

      1. During deployment of Nuxeo version upgrades or adding a new Nuxeo Package to an existing deployment, it is common to start Nuxeo multiple times with different nuxeo.vcs.ddlmode values to ensure needed SQL schema changes are applied. This is especially important in a clustered environment where the wrong value for this property can cause errors on startup.
      2. The current Dockerfile entrypoint script includes nuxeo.vcs.ddlmode as a "configured" property which means it gets set during the initial "configured" run but is ignored for subsequent runs. This behavior is unexpected and not desirable. At a minimum, this property must be treated special and moved out of the "configured" mode conditional logic so that it can be easily changed across runs.
      3. The installation of a Nuxeo Package may add values to the nuxeo.templates property in nuxeo.conf. This is another case where the nuxeo.conf is changed outside the "configured" mode conditional logic.
      4. In general, the use of "configured" mode in the entrypoint script is problematic. There is no getting around the fact that Nuxeo startup configuration is heavyweight, complex, and not container-friendly. Nuxeo property "nuxeo.force.generation" is the currently supported mechanism to minimize this weight and complexity. In a production environment, the current best practice is to set nuxeo.force.generation=true once the initial configuration has been set.

      In order to better support Production Docker deployments, the current touch-file managed "configured" mode could be replaced with explicit support for a boolean NUXEO_FORCE_GENERATION environment variable.

      1. In the default case when the environment variable is either unset or true, the entire entrypoint script is executed without the "configured" conditional. In case the NUXEO_FORCE_GENERATION environment variable is false, all but the final statement(s) in the entrypoint script are skipped. This is desirable Production behavior that is repeatable and has no dependencies on external connections to Nuxeo Connect, for example. In either case, nuxeo.conf property nuxeo.force.generation is set according to the environment variable.
      2. In some OpenShift environment, it is natural to save and subsequently deploy a fully-configured Nuxeo image that is generated during the build process with all properties set, hot-fixes installed, packages installed, etc. The deployment of the image would set environment variable NUXEO_FORCE_GENERATION to false. When an image needs to be deployed with property nuxeo.vcs.ddlmode set to a non-default value, one would either:
        • manually deploy and monitor the deployment with environment variable NUXEO_FORCE_GENERATION set to true
        • or build a special one-time upgrade image that has nuxeo.vcs.ddlmode set to the non-default value, deploy it with NUXEO_FORCE_GENERATION set to false, then deploy the normal image across all nodes in the cluster with NUXEO_FORCE_GENERATION again set to false (this is the preferred option which we can likely automate w/out manual intervention).

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: