Run modes allow you to tune your CQ instance for a specific purpose; for example author, publish or development. This is done by defining collections of configuration parameters for each run mode. A basic set is applied for all run modes, additional sets are each tuned to the purpose of your specific environment.
All configuration settings are stored in the one repository and activated by setting the Run Mode.
Standard run modes are:
You can also create environment specific run mode such as,
- author, development
- publish, test
- author, intranet, us or as required...
There are two mechanisms for setting standard and environment specific run mode for your instance:
- To set up standard run mode Use the naming convention:
For example, set a standard run mode by naming the jar file cq-author-4502 or cq-publish-4503
- To set up environment specific run mode there are two methods,
Through <cq-installation-dir>/crx-quickstart/config/sling.properties Add the following properties (following example is for author, prod, marketing):
In above case config.author.prod.marketing will get picked up (Or whatever with maximum match)
Through <cq-installation-dir>/crx-quickstart/config/sling.properties and system property (In start script):
sling.jcrinstall.folder.name.regexp=.*/(install|config)? #<------ In sling.properties file
-Dsling.run.modes=publish,prod,marketing #<----- In start script or system property
In above case config.publish.prod.marketing will get picked up (Or whatever with maximum match)
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