0% found this document useful (0 votes)
108 views9 pages

AEM OSGi Configuration Nodes

Uploaded by

DominoDevelop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views9 pages

AEM OSGi Configuration Nodes

Uploaded by

DominoDevelop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

AEM OSGi Configuration Nodes

Dennis Selfridge

© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 1


Agenda

§  Config as a listener


§  OSGi configuration nodes and run mode behavior
§  OSGi Console properties - The ConfigMgr Tab
§  Behavior when edits are made
§  Deployment/Packaging/Source Code Control

© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 2


Config Folders in the Repository: The Best match wins!

§  AEM listens for any folder named “config”.


§  By appending run modes, configuration can be regulated in a given
repository by creating folder names that match the existing run modes
present in that environment.
§  This allows me to use “config, config.author and config.publish” to set
values in any OOTB AEM installation. The addition of custom run modes
passed in via JVM start up options provides even greater, more granular
flexibility to this process.
§  In the event the same property is configured in multiple folders, the folder
that has the most matching run modes will win out. Any partial config (i.e.
a folder that has run modes not present in the current environment) will
be ignored.
§  Let’s see what that looks like on the next page….

© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 3


What AEM will load based on the following…..

Run Modes: Author


System will load:
SlingWebConsoleSecurityProvider from
config
CleanupServiceImpl and
WCMDebugFilter from config.author
and will ignore config.author.dev

Run Modes: Author, Dev


System will load:
SlingWebConsoleSecurityProvider from
config
WCMDebugFilter from config.author
and CleanupServiceImpl from
config.author.dev

Run Modes: Publish


System will load:
CleanupServiceImpl from config
WCMDebugFilter,
HtmlLibraryManagerImpl and
SlingWebConsoleSecurityProvider from
config.publish

© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 4


Web Console Configuration Tab

§  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.

© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 5


Look more closely at OSGi 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.

© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 6


Use CRX Package Manger

§  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.

© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 7


Recap on OSGI configuration nodes

§  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.

© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 8


© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

You might also like