Expand my Community achievements bar.

SOLVED

How does CQ choose run mods?

Avatar

Level 4

Hi,

Can someone describe how to run mods works?
I have 3 configs with different values:
  - config.author
  - config.production
  - config.usa
 
CQ runs with CQ_RUNMODE=author,production,usa

Which one will be in the configuration?

Thanks you.

1 Accepted Solution

Avatar

Correct answer by
Level 10
3 Replies

Avatar

Correct answer by
Level 10

Don;t do partial config do the full as it is not determenstic.

http://ebookbrowsee.net/2011-lightning-runmodes-and-configs-for-fun-and-profit-pdf-d414804732

Avatar

Level 1

This might help.... the Author is a standard setting that can NOT be changed.  This appears to be the name your team defined for a given RunMode.  This appears to be a creation by your team.  You can combine configs into a SINGLE CONFIG but not linking them in a chain as it appears you are thinking here.

Configuration values for the run modes are saved in the repository. You can store all configurations in one repository as the run mode is indicated by a suffix on the folder name; for example:

 

  •   config, applicable for all run modes
  •   config.author, used in author run mode
  •   config.publish, used in publish run mode
  •   config.<standard-run-mode>.<env-specific-mode>, used in the applicable run mode

 

Following order of precedence are used to set up run mode (From top to bottom, Top being highest)

 

  1. From jar file
  2. From Sling property
  3. From System property

 

NOTE: From CQ5.5 there is no need to set sling property regexp to set up run mode. Setting enviornment specific run mode through system property or sling property will be enough to decide run mode.

Avatar

Level 2

Basically all of them, I don't know if CQ has a deterministic way of deciding which config to use if you have the same config in more than one of your folders.

If you want to be sure, create a folder config.author.usa for author servers in usa and config.author.production for author prod servers and place the appropriate config there.

 

cheers,

Ben