You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Jakob Külzer <ja...@gmail.com> on 2012/10/29 16:47:41 UTC

Runmodes, JCRInstaller and the Console

Hey guys,

I'm working on a Day CQ 5.5 installation and I'm trying to implement
configurations using Slings runmodes. I added runmodes for the different
environments (dev, prod, etc) and configurations. However, after inspecting
the JCR Installer's console, I noticed that for the dev environment (and
other environments as well) always two configs are displayed as "INSTALL"
and "INSTALLED". This leads to my first question:

Are /app/foo/config* folders not exclusive or? For example, if I have
config and config.dev and the runmodes are "foo,dev", would it not load
config.dev only? Or is configuration in "config" (without any runmodes)
always selected).
Sidenote: I looked at the source code of the JCR installer and it appears
that every node that matches the regular expressions is assigned a priority
and every node with a larger than zero priority will be watched. Is that
correct?)

Next, I'm confused (this happens a lot) by the terminology in the console.
For example:

com.xxx.service.navcache.AppgatewayNavCacheService
4acca0fec73d890e8ef92b6d169a2388/201
jcrinstall:/apps/xxx/config.dev/com.xxx.service.navcache.AppgatewayNavCacheService
INSTALLED
17:20:13:360 2012-Oct-24616b9837f364873f0d28b7c645ca030e/200
jcrinstall:/apps/xxx/config/com.xxx.service.navcache.AppgatewayNavCacheService
INSTALL

What is the difference between "INSTALL" and "INSTALLED"? Which one is
active? Both? If so, why do they have different status?


Thanks a lot for any help!

-- 
Cheers,
Jakob

Re: Runmodes, JCRInstaller and the Console

Posted by Jakob Külzer <ja...@gmail.com>.
Perfect! Thanks Alexander and Carsten! :)

On Mon, Oct 29, 2012 at 12:55 PM, Carsten Ziegeler <cz...@apache.org>wrote:

> As Alex explains configurations get a priority, configurations not
> bound to a run mode have the lowest priority. Nevertheless all
> configurations that apply to the current setup are passed to the
> installer, so if you have a configuration for the same server X in a
> folder named "config" and "config.dev" and dev is an active run mode,
> both are seen by the installer.
>
> The installer installs the one with the highest priority which in this
> case is the one from config.dev. So this one gets the state
> "INSTALLED" in the console, and the other one gets the state
> "INSTALL".
>
> Carsten
>
> 2012/10/29 Alexander Klimetschek <ak...@adobe.com>:
> > On 29.10.2012, at 16:47, Jakob Külzer <ja...@gmail.com> wrote:
> >
> >> Are /app/foo/config* folders not exclusive or? For example, if I have
> >> config and config.dev and the runmodes are "foo,dev", would it not load
> >> config.dev only? Or is configuration in "config" (without any runmodes)
> >> always selected).
> >
> > Yes, if you have a "config" folder without any runmode, it is always
> considered. However, a specific service configuration in "config.<mode>"
> should be preferred over one for the same service pid in "config". The
> "config" folder acts as default configuration basically.
> >
> > Cheers,
> > Alex
>
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>



-- 
Cheers,
Jakob

Re: Runmodes, JCRInstaller and the Console

Posted by Carsten Ziegeler <cz...@apache.org>.
As Alex explains configurations get a priority, configurations not
bound to a run mode have the lowest priority. Nevertheless all
configurations that apply to the current setup are passed to the
installer, so if you have a configuration for the same server X in a
folder named "config" and "config.dev" and dev is an active run mode,
both are seen by the installer.

The installer installs the one with the highest priority which in this
case is the one from config.dev. So this one gets the state
"INSTALLED" in the console, and the other one gets the state
"INSTALL".

Carsten

2012/10/29 Alexander Klimetschek <ak...@adobe.com>:
> On 29.10.2012, at 16:47, Jakob Külzer <ja...@gmail.com> wrote:
>
>> Are /app/foo/config* folders not exclusive or? For example, if I have
>> config and config.dev and the runmodes are "foo,dev", would it not load
>> config.dev only? Or is configuration in "config" (without any runmodes)
>> always selected).
>
> Yes, if you have a "config" folder without any runmode, it is always considered. However, a specific service configuration in "config.<mode>" should be preferred over one for the same service pid in "config". The "config" folder acts as default configuration basically.
>
> Cheers,
> Alex



-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Runmodes, JCRInstaller and the Console

Posted by Alexander Klimetschek <ak...@adobe.com>.
On 29.10.2012, at 16:47, Jakob Külzer <ja...@gmail.com> wrote:

> Are /app/foo/config* folders not exclusive or? For example, if I have
> config and config.dev and the runmodes are "foo,dev", would it not load
> config.dev only? Or is configuration in "config" (without any runmodes)
> always selected).

Yes, if you have a "config" folder without any runmode, it is always considered. However, a specific service configuration in "config.<mode>" should be preferred over one for the same service pid in "config". The "config" folder acts as default configuration basically.

Cheers,
Alex