On Monday 27 March 2017 16:02:50 Carsten Ziegeler wrote:
> Hi,

Hi,

> for a long time we have tried to use sensible defaults for all of our
> configurations. This allows our users to run a default Sling without any
> additional configuration (it should even be possible to run it without a
> Configuration Admin service available - but that's another story).
> 
> While we were pretty successful with this, we simply blew it with the
> move from login administrative to service users. A lot of the (core)
> modules now use service users and these require a configured mapping in
> order to work properly. While for example the servlets resolver
> previously did not require any configuration, it requires at least the
> mapping. Which in turn means you can't simply use that module as-is.
> 
> Switching to service users is of course a good idea but I'm wondering if
> we can find a way to get back to a configurationless Sling again?
> 
> Clearly we don't want to the mapping to be part of the bundles using the
> service users.
> 
> One possible solution would be an out of the box bundle with the
> necessary repo init and configurations. This would cover the core
> bundles like servlets resolver and resource resolver.

we already have artifacts for all repoinit statements (bundle) and 
configurations.

I had to externalize all configurations for Karaf as features only support the 
simple cfg format inline (but Sling and Oak require newer Config Admin 
format):

https://github.com/apache/sling/tree/trunk/karaf/org.apache.sling.karaf-configs/src/main/resources

That said, Sling is one half only. The other half is Oak.

Configurations are part of a feature which get installed together with its 
bundles (and features) when using Sling's Karaf features.

The missing piece for repoinit (to make statements part of a feature) is a 
component which can be feed with "fragments" - similar to what we have for 
service user mappings and "login administrative" white listings (it's on my 
TODO). Currently all repoinit statements are executed when installing a sling-
launchpad-oak-* feature.

https://github.com/apache/sling/tree/trunk/karaf/org.apache.sling.karaf-repoinit/src/main/resources

Those repoinit statements and configurations are used by Testing PaxExam also, 
e.g. Option slingExtensionI18n() will provision all required bundles and 
configurations and in the near future also all repoinit statements.

Regards,
O.

> But maybe there is a better option?
> 
> Regards
> Carsten

Reply via email to