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

Allow adding new templates without overriding the whole nuxeo.templates property

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.5, 2021.2
    • Component/s: Configuration, Launcher
    • Tags:
    • Upgrade notes:
      Hide

      There're breaking changes on ConfigurationGenerator, a lot of methods has been removed, constants have been removed or moved to ConfigurationConstants.

      The new class ConfigurationHolder is the new first citizen to get the Nuxeo Configuration in this layer. You can retrieve it with ConfigurationGenerator#getConfigurationHolder method.

      You now can use nuxeo.append.templates.SOMETHING=A_TEMPLATE parameter in nuxeo.conf to append templates to load by the configuration generator.

      Show
      There're breaking changes on ConfigurationGenerator , a lot of methods has been removed, constants have been removed or moved to ConfigurationConstants . The new class ConfigurationHolder is the new first citizen to get the Nuxeo Configuration in this layer. You can retrieve it with ConfigurationGenerator#getConfigurationHolder method. You now can use nuxeo.append.templates.SOMETHING=A_TEMPLATE parameter in nuxeo.conf to append templates to load by the configuration generator.
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #23, nxplatform #24, nxplatform #25, nxplatform #26, nxplatform #27
    • Story Points:
      3

      Description

      Currently, there is no other way than overriding the whole nuxeo.templates property in nuxeo.conf if we want to add new templates to be deployed in a given environment: that means we must know the exact list of templates configured by default + all installed packages.

      We want to allow nuxeo.append.templates.* properties in nuxeo.conf.
      All those properties will be sorted alphabetically (for determinism and reproducibility), and all the values will be added after the ones from the nuxeo.templates property when passing everything to the ConfigurationGenerator.

      For instance, we could have:

      nuxeo.templates=default
      ...
      nuxeo.append.templates.infra=mongodb,redis,kafka
      nuxeo.append.templates.cloud=cloud-cloudfront, cloud-directupload
      

      The effective list will be: default,cloud-cloudfront,cloud-directupload, mongodb,redis,kafka.

      This could then be used in our default Nuxeo Helm chart:

      ...
      {{- if or .Values.mongodb.deploy .Values.tags.mongodb }}
          nuxeo.append.templates.mongo=mongodb
          nuxeo.mongodb.server=mongodb://{{ .Release.Name }}-mongodb:27017
          nuxeo.mongodb.dbname={{ .Values.nuxeo.mongodb.dbname }}
      {{- end }}
      {{- if or .Values.postgresql.deploy .Values.tags.postgresql }}
          nuxeo.append.templates.postgres=postgresql
          nuxeo.db.name={{ .Values.nuxeo.postgresql.dbname }}
          nuxeo.db.user={{ .Values.nuxeo.postgresql.username }}
          nuxeo.db.password={{ .Values.nuxeo.postgresql.password }}
          nuxeo.db.host={{ .Release.Name }}-postgresql
          nuxeo.db.port=5432
      {{- end }}
      {{- if or .Values.redis.deploy .Values.tags.redis }}
          nuxeo.append.templates.redis=redis
      {{- end }}
      ...
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 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 week, 1 day, 3 hours
                  1w 1d 3h