*** The wcm.io Project is closing down this JIRA Instance in favor of GitHub issues. *** Please use the corresponding GitHub projects to report issues - or the mailing list for general discussion.

Issues

Select view

Select search mode

 
21 of 21

Minimize duplication between multiple environments

Fixed

Description

in CONGA you have usually multiple environments - e.g. for different stages test, integration, prod etc.

if you have have a lot of global or role-global parameters they need to be duplicated across the environments. it would be nice to share the common parts between the environment.

we have to check whether we can do this e.g. with includes in the YAML file format, or with a special support in CONGA itself.

Gliffy Diagrams

Details

Assignee

Reporter

Components

Priority

Created October 10, 2017 at 1:08 PM
Updated January 10, 2018 at 9:02 PM
Resolved January 10, 2018 at 9:02 PM

Activity

Show:

Stefan SeifertJanuary 10, 2018 at 9:02 PM

using role inheritance works well.

example - this is a role pv-aem-cms-all.yaml defined in the configuration-management project part:

it inherits two roles defines by an AEM applications which contain all osgi configs, application packages etc.
additional the role contains all configuration that is common for all environments.
within the environments only the role pv-aem-cms-all is references, inhering all files and all common configuration from this role.

Stefan SeifertDecember 13, 2017 at 5:13 PM

the YAML extension magnolia uses are somewhat "proprietary", and they seem to have implemented their own yaml parser and extensions for it
https://documentation.magnolia-cms.com/display/DOCS56/YAML+inherit+and+include

i'm not sure if we should go this way and extend our YAML processing like this.

a better approach i my opinion is:

  • create custom CONGA roles for your project hat inherit from the generic roles of AEM definitions (e.g. aem-cms, aem-dispatcher)

  • define all configuration that is project-specific but common for all stages/environments in the custom role

  • include these custom roles in the environments - now you should have not duplication in the environment because all shared config resided in the role definition

the role inheritance feature was introduced in CONGA 1.4.0 ().

Martin WehnerNovember 22, 2017 at 5:45 PM
Edited

For reference, here is the documentation of how Magnolia is handling the problem within their YAML definitions:
https://documentation.magnolia-cms.com/display/DOCS56/Reusing+configuration

Stefan SeifertNovember 14, 2017 at 4:12 PM

the YAML file format does not have any support for include/import statements, see also https://stackoverflow.com/q/528281

some YAML libaries add support for a syntax like !include xyz.yaml - but this is a proprietary extension. other products express custom import statements as part of their YAML grammar. not sure which way we should take

can you share some use cases you see for this? do we need it only for the "global" section in the environment files, or for other places as well?

Loading...