Expand my Community achievements bar.

SOLVED

Loading OSGI configurations from external folder

Avatar

Level 1

Hi,

Typically I would use run modes to separate OSGi system configurations per environment and all in the one package, this has worked well. However a security team has raised concern around storing Production configurations alongside dev/sit configurations, and want to externalise those configurations into a separate folder outside CQ, then load them (potentially by adding a classpath parameter).

Has anyone attempted a similar setup, and/or how have you achieved a result with similar constraints?

 

Cheers

1 Accepted Solution

Avatar

Correct answer by
Level 10

Configuring OSGi using settings defined outside of CQ is not best practice.  It would not work without extra coding. That is- reading the config values where they are stored and then using JCR API to update the OSGi nodes (content-nodes (sling:OsgiConfig) in the repository).

See this AEM doc topic for the supported methods: 

https://docs.adobe.com/docs/en/aem/6-0/deploy/configuring/configuring-osgi.html

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Configuring OSGi using settings defined outside of CQ is not best practice.  It would not work without extra coding. That is- reading the config values where they are stored and then using JCR API to update the OSGi nodes (content-nodes (sling:OsgiConfig) in the repository).

See this AEM doc topic for the supported methods: 

https://docs.adobe.com/docs/en/aem/6-0/deploy/configuring/configuring-osgi.html