Re: [osgi-dev] Configurator resources that depend on a ConfigurationPlugin

2019-10-08 Thread Jürgen Albert via osgi-dev

Hi Clement,

we have discussed this problem you have at a OSGi meeting and Carsten 
Ziegler implemented something that goes beyond the Spec, that might help 
you I assume here that you are using the Felix ConfigAdmin. See: 
https://issues.apache.org/jira/browse/FELIX-6059


You have to possibilities:
1. The ConfigAdmin will be registered with a property config.plugins, 
that names all ConfigurationPlugins that serve a property 
config.plugin.id. Thus register your plugin with e.g. 
config.plugin.id=my.id. Add a mandatory Service reference for the Config 
Admin with a target filter like (config.plugins=my.id) in the service 
that needs configuration. With this your Service will be activated after 
the ConfigAdmin knows about you plugin and handles the properties 
accordingly.


2. If you start your runtime with a framework property 
felix.cm.config.plugins=my.id1,my.id2 the ConfigAdmin will not become 
active and registered until the a Plugin with config.plugin.id=my.id1 
and config.plugin.id=my.id2 is available.


I hope this helps,

Jürgen.



Am 08/10/2019 um 16:27 schrieb Tim Ward via osgi-dev:
My question is, how can I tell to the Configurator bundle to not 
process resources that contains placeholder until my 
ConfigurationPlugin is up?


There are ways that you could attempt to do this, however they’re all 
inelegant and error prone. What would make more sense would be for the 
ConfigurationPlugin to detect the existing configurations which 
contain placeholders at startup and trigger an update for them. This 
will cause the configuration to be re-delivered, including any 
necessary configuration plugin execution.


In general you are better off trying to make things ordering 
independent rather than to control the order that things happen in. 
The result is a much more flexible and stable system.


Best Regards,

Tim

On 8 Oct 2019, at 12:54, BJ Hargrave via osgi-dev 
mailto:osgi-dev@mail.osgi.org>> wrote:


Configuration Plugins mutate configuration data each time it is 
delivered to a configuration target. So the Configuration Plugin must 
be active before any configuration targets which care about the 
mutated configuration data.
So this is orthogonal to Configurator which is about putting 
configuration data in the CM configuration data store.

--

BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com 

- Original message -
From: "Clément Delgrange via osgi-dev" mailto:osgi-dev@mail.osgi.org>>
Sent by: osgi-dev-boun...@mail.osgi.org

To: OSGi Developer Mail List mailto:osgi-dev@mail.osgi.org>>
Cc:
Subject: [EXTERNAL] [osgi-dev] Configurator resources that depend
on a ConfigurationPlugin
Date: Tue, Oct 8, 2019 06:08
Hi all,
I have a question regarding the Configurator and the
ConfigurationPlugin spec. I would like to provision my
application with configurations as I do with my the bundles, for
this the Configurator seems perfect. But, the values inside my
configurations could be different depending of the environment
(dev, beta, prod, ...) and my configurations may contain
sensitive data that I don't want in my Git repo. In this case I
think I could provide a ConfigurationPlugin which will replace
placeholders with data coming from a database.
My question is, how can I tell to the Configurator bundle to not
process resources that contains placeholder until my
ConfigurationPlugin is up?
Thanks,
Clément Delgrange.
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org 
https://mail.osgi.org/mailman/listinfo/osgi-dev


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org 
https://mail.osgi.org/mailman/listinfo/osgi-dev



___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev



--
Jürgen Albert
Geschäftsführer

Data In Motion Consulting GmbH

Kahlaische Str. 4
07745 Jena

Mobil:  0157-72521634
E-Mail: j.alb...@datainmotion.de
Web: www.datainmotion.de

XING:   https://www.xing.com/profile/Juergen_Albert5

Rechtliches

Jena HBR 513025

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Configurator resources that depend on a ConfigurationPlugin

2019-10-08 Thread Tim Ward via osgi-dev
> My question is, how can I tell to the Configurator bundle to not process 
> resources that contains placeholder until my ConfigurationPlugin is up? 

There are ways that you could attempt to do this, however they’re all inelegant 
and error prone. What would make more sense would be for the 
ConfigurationPlugin to detect the existing configurations which contain 
placeholders at startup and trigger an update for them. This will cause the 
configuration to be re-delivered, including any necessary configuration plugin 
execution.

In general you are better off trying to make things ordering independent rather 
than to control the order that things happen in. The result is a much more 
flexible and stable system.

Best Regards,

Tim

> On 8 Oct 2019, at 12:54, BJ Hargrave via osgi-dev  
> wrote:
> 
> Configuration Plugins mutate configuration data each time it is delivered to 
> a configuration target. So the Configuration Plugin must be active before any 
> configuration targets which care about the mutated configuration data.
>  
> So this is orthogonal to Configurator which is about putting configuration 
> data in the CM configuration data store.
> --
> 
> BJ Hargrave
> Senior Technical Staff Member, IBM // office: +1 386 848 1781
> OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
> hargr...@us.ibm.com
>  
>  
> - Original message -
> From: "Clément Delgrange via osgi-dev" 
> Sent by: osgi-dev-boun...@mail.osgi.org
> To: OSGi Developer Mail List 
> Cc:
> Subject: [EXTERNAL] [osgi-dev] Configurator resources that depend on a 
> ConfigurationPlugin
> Date: Tue, Oct 8, 2019 06:08
>  
> Hi all,
>  
> I have a question regarding the Configurator and the ConfigurationPlugin 
> spec. I would like to provision my application with configurations as I do 
> with my the bundles, for this the Configurator seems perfect. But, the values 
> inside my configurations could be different depending of the environment 
> (dev, beta, prod, ...) and my configurations may contain sensitive data that 
> I don't want in my Git repo. In this case I think I could provide a 
> ConfigurationPlugin which will replace placeholders with data coming from a 
> database.
>  
> My question is, how can I tell to the Configurator bundle to not process 
> resources that contains placeholder until my ConfigurationPlugin is up?
>  
> Thanks,
>  
> Clément Delgrange.
>  
>  
>  
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev 
>  
>  
> 
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Configurator resources that depend on a ConfigurationPlugin

2019-10-08 Thread BJ Hargrave via osgi-dev
Configuration Plugins mutate configuration data each time it is delivered to a configuration target. So the Configuration Plugin must be active before any configuration targets which care about the mutated configuration data.
 
So this is orthogonal to Configurator which is about putting configuration data in the CM configuration data store.
--BJ HargraveSenior Technical Staff Member, IBM // office: +1 386 848 1781OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788hargr...@us.ibm.com
 
 
- Original message -From: "Clément Delgrange via osgi-dev" Sent by: osgi-dev-boun...@mail.osgi.orgTo: OSGi Developer Mail List Cc:Subject: [EXTERNAL] [osgi-dev] Configurator resources that depend on a ConfigurationPluginDate: Tue, Oct 8, 2019 06:08 
Hi all,
 
I have a question regarding the Configurator and the ConfigurationPlugin spec. I would like to provision my application with configurations as I do with my the bundles, for this the Configurator seems perfect. But, the values inside my configurations could be different depending of the environment (dev, beta, prod, ...) and my configurations may contain sensitive data that I don't want in my Git repo. In this case I think I could provide a ConfigurationPlugin which will replace placeholders with data coming from a database.
 
My question is, how can I tell to the Configurator bundle to not process resources that contains placeholder until my ConfigurationPlugin is up?
 
Thanks,
 
Clément Delgrange.
 
 
 
___OSGi Developer Mail Listosgi-dev@mail.osgi.orghttps://mail.osgi.org/mailman/listinfo/osgi-dev 
 

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Configurator resources that depend on a ConfigurationPlugin

2019-10-08 Thread Clément Delgrange via osgi-dev
Hi all,

I have a question regarding the Configurator and the ConfigurationPlugin spec. 
I would like to provision my application with configurations as I do with my 
the bundles, for this the Configurator seems perfect. But, the values inside my 
configurations could be different depending of the environment (dev, beta, 
prod, ...) and my configurations may contain sensitive data that I don't want 
in my Git repo. In this case I think I could provide a ConfigurationPlugin 
which will replace placeholders with data coming from a database.

My question is, how can I tell to the Configurator bundle to not process 
resources that contains placeholder until my ConfigurationPlugin is up?

Thanks,

Clément Delgrange.___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev