AEM OSGi Configuration Nodes
AEM OSGi Configuration Nodes
Dennis Selfridge
§ This is (usually) the default tab you will land on when you access http://localhost:4502/system/console.
§ All of the configurable properties in the bundles that make up all of AEM are exposed here.
§ Many of these configurations are things you may never need to address but then again…
§ Each instance of AEM comes OOTB in Author mode by default with all of the configurations geared
toward an Authoring instance. Configurable properties exist for everything from WCM Debug and
content grabbing to MSM, DAM, Communities and Scene7 and more.
§ In AEM6 there is The Production Ready Package to assist customers: A Config package that makes
customer instance "production-ready", rather than having the customers figure out the correct settings
themselves. This is not installed by default.
§ Any configuration made directly from the Web Console will result in an nt:file node being created
directly beneath /apps/system/config. The name of the node corresponds to the PID of the class
configured and the configuration values are stored in the jcr:data property of the jcr:content node.
§ If a value set by a sling:OsgiConfig node is overridden in the Web Console (i.e. manually edited) the
corresponding node is converted to an nt:file and the values entered are stored in the jcr:data property of
the jcr:content node.
§ Note: This is by DESIGN! Only one approach can be in charge of the value at any given time. This quickly
identifies whether the value is controlled from the repository or the console.
§ A best practice recommendation is to use CRX Package Manager to manage your organization’s
configurations.
§ There are two different packaging styles suggested: Either create two separate packages (one for code
and one for configuration per environment) or create one package that utilizes run mode appropriate
folders to apply the correct configuration automatically for each instance.
§ Best practice recommendation is to create config folders of node type sling:folder. A node type of
nt:folder will work but is much more restricted in terms of properties and nodes. The sling:folder is
basically nt:folder + nt:unstructured and can be used inside of nt:folders.
§ Once you’ve created your folder structure and the appropriate sling:OsgiConfig nodes, simply wrap it all
up in a package where it can be activated/replicated/exported/imported and checked into your source
code control system.
§ AEM leverages config folders to allow customization of OSGi properties exposed in not only the core
AEM bundles but the same approach can be used to manipulate any custom code created and deployed
using OSGi bundles.
§ Custom run modes can be implemented in addition to the OOTB author and publish modes to manage
these configurations.
§ There is defined and consistent behavior in how these nodes are treated and stored in your AEM
repository(ies). Either the console or the repository can be used to configure behavior.
§ AEM6 now ships with a Production Ready Package to give customers a template to use in creating their
own package or to simply install as is.
§ Use CRX Package Manager and Replication Agents to create, activate, export and store your
configurations.