Wednesday, May 29, 2013

How to set up Run modes in AEM

 

Recommendation

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:

  • author
  • publish

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:
   cq-<standard-run-mode>-<port-number>

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,

Method 1:

Through <cq-installation-dir>/crx-quickstart/config/sling.properties Add the following properties (following example is for author, prod, marketing):

   sling.jcrinstall.folder.name.regexp=.*/(install|config)?
sling.run.modes=author,prod,marketing

In above case config.author.prod.marketing will get picked up (Or whatever with maximum match)

Method 2:

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
References:

http://www.wemblog.com/2012/01/how-to-set-up-run-mode-in-cq-wem.html
http://dev.day.com/docs/en/cq/current/deploying/configure_runmodes.html
http://helpx.adobe.com/cq/kb/RunModeSetUp.html
http://helpx.adobe.com/cq/kb/RunModeDependentConfigAndInstall.html


 

 

No comments:

Post a Comment