Using Oak Run with complex setup and configurations
Currently oak-run (and to some extent oak-upgrade) both instantiate Repository (or NodeStore) instance outside of OSGi env. So far some level of customizations are supported. Looking for some guidance on how to support bit more complex configuration like using different DataStore and providing config to those DataStore? Current way of configuring custom BlobStore relies on system properties to achieve the same. As part of OAK-1502 I need to refactor the way the BlobStores are configured. I would like to configure them via OSGi configuration and use SCR annotation for the same With such a change supporting oak-run and oak-upgrade becomes tricky. One option is to expose all such config options as command line options but then that would require duplicate work for handling configuration. Another way is to switch to proposed PojoSR based setup [2]. So one would provide all the config in a single json file for example oak-config.json { "properties": { "oak.documentMK.revisionAge": 7 }, "configs": { "org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService": { "db": "test", "mongouri": "mongodb://localhost:27017" }, "org.apache.jackrabbit.oak.security.user.UserConfigurationImpl": { "usersPath": "/home/users", "/home/users": "/home/groups" } } } And on command line we pass on that file as one of the arguments java -jar oak-run-*.jar --config oak-config.json Chetan Mehrotra [1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobStoreHelper.java#L52-52 [2] http://markmail.org/thread/26g2fqbda3uyahmm
Re: Using Oak Run with complex setup and configurations
Hi, On Mon, Mar 10, 2014 at 11:00 AM, Chetan Mehrotra wrote: > Looking for some guidance on how to support bit more complex > configuration like using different DataStore and providing config to > those DataStore? Do we need such complex configurations in oak-run? That jar was never intended or designed as a production-ready deployment mechanism, an OSGi container or some other managed runtime would be much better for such cases. The only place I can see where complex configuration in oak-run would be needed is the benchmark feature, but the RepositoryFixture mechanism should already cover that use case. BR, Jukka Zitting