Re: [osgi-dev] Docker configuration via environment variables

2018-08-21 Thread Peter Kriens via osgi-dev
I think you get the point …

A simple macro processor is ~10k and would go a long way to address the far 
majority of the common requirements. And there is more than 6 years experience 
with the model already :-)

Kind regards,

Peter Kriens

> On 21 Aug 2018, at 12:09, Christian Schneider  wrote:
> 
> I agree this easily can cause ordering issues.
> In the best case these can cause components to be started with wrong 
> configuration first and with the correct one later. This can at least cause 
> some error messages but might also cause more serious issues.
> 
> For a cloud deployment were config is mainly static I hope we can provide a 
> solution that avoids restarts in most cases. Env variable substitution could 
> be a core feature of the configurator as it is very common.
> 
> Christian
> 
> 
> Am Di., 21. Aug. 2018 um 10:22 Uhr schrieb Peter Kriens via osgi-dev 
> mailto:osgi-dev@mail.osgi.org>>:
>> On 21 Aug 2018, at 10:11, Tim Ward via osgi-dev > > wrote:
>> Just another vote in favour of the ConfigurationPlugin model - you can use 
>> this to post-process configurations wherever they come from (meaning it 
>> isn’t tied to the Configurer or Configurator).
>> A configuration plugin that does this sort of work is easy to write, and if 
>> using DS could be done in a lot less than 100 LoC. It can also look at 
>> things other than environment variables if you want, and if/else logic is 
>> much easier to write/maintain in Java code than it is in macros in a JSON 
>> file!
> 
> It is only easier after you sold the ordering problem of the 
> 
> * Configurator, 
> * Configuration bundle, and 
> * Configuration plugin bundle … 
> 
> It also adds quite a bit of complexity by:
> 
> * Separating the rules from the actual configuration, and 
> * Adding extra bundles.
> 
> This additional complexity is only worth it if you can reuse the rules in 
> many different places. Hmm. Maybe a configuration plugin with a macro 
> processor? :-)
> 
>   Peter Kriens
> 
>> 
>> Best Regards,
>> 
>> Tim
>> 
>>> On 20 Aug 2018, at 17:08, Mark Hoffmann via osgi-dev 
>>> mailto:osgi-dev@mail.osgi.org>> wrote:
>>> 
>>> Hi all,
>>> 
>>> Carsten Ziegeler pointed us to the Configuration Plugin Services, that are 
>>> part of the ConfigurationAdmin specification. Together with the 
>>> Configurator specification, it could be possible to do that substitution in 
>>> such an plugin.
>>> Regards,
>>> 
>>> Mark
>>> 
>>> Am 20.08.2018 um 17:56 schrieb Christian Schneider via osgi-dev:
 I think this would be a good extension to the configurator to also allow 
 env variable replacement.
 Actually I hoped it would already do this...
 WDYT?
 
 Christian
 
 Am Mo., 20. Aug. 2018 um 17:05 Uhr schrieb Peter Kriens via osgi-dev 
 mailto:osgi-dev@mail.osgi.org>>:
 Are you using v2Archive enRoute or the new one?
 
 The v2Archive OSGi enRoute has the simple Configurer (the predecessor of 
 the OSGi R7 Configurator but with, according to some, a better name :-). 
 It runs things through the macro processor you could therefore use 
 environment variables to make the difference. 
 
 E.g. ${env;XUZ} in the json files. Since it also supports ${if} you can 
 eat your heart out! You can set environment variables in docker with -e in 
 the command line when you start the container. You can also use @{ instead 
 of ${ to not run afoul of the bnd processing that can happen at build 
 time. I.e. the Configurer replaces all @{…} with ${…}.
 
 If you are using the new R7 Configurator then you are on your own ...
 
 Kind regards,
 
 Peter Kriens
 
 
 
 
 > On 18 Aug 2018, at 18:51, Randy Leonard via osgi-dev 
 > mailto:osgi-dev@mail.osgi.org>> wrote:
 > 
 > To all:
 > 
 > We are at the point where we are deploying our OSGI enRoute applications 
 > via Docker.
 > 
 > - A key sticking point is the syntax for embedding environment variables 
 > within our configuration.json files.  
 > - For example, a developer would set a hostName to ‘localhost’ for 
 > development, but this same environment variable would be different for 
 > QA, UAT, and Production environments
 > - I presume this is the best way of allowing the same container to be 
 > deployed in different environments without modification?
 > - Suggestions and/or examples are appreciated.
 > 
 > 
 > 
 > Thanks,
 > Randy Leonard
 > 
 > ___
 > 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 
 

Re: [osgi-dev] Docker configuration via environment variables

2018-08-21 Thread Christian Schneider via osgi-dev
I agree this easily can cause ordering issues.
In the best case these can cause components to be started with wrong
configuration first and with the correct one later. This can at least cause
some error messages but might also cause more serious issues.

For a cloud deployment were config is mainly static I hope we can provide a
solution that avoids restarts in most cases. Env variable substitution
could be a core feature of the configurator as it is very common.

Christian


Am Di., 21. Aug. 2018 um 10:22 Uhr schrieb Peter Kriens via osgi-dev <
osgi-dev@mail.osgi.org>:

> On 21 Aug 2018, at 10:11, Tim Ward via osgi-dev 
> wrote:
> Just another vote in favour of the ConfigurationPlugin model - you can use
> this to post-process configurations wherever they come from (meaning it
> isn’t tied to the Configurer or Configurator).
> A configuration plugin that does this sort of work is easy to write, and
> if using DS could be done in a lot less than 100 LoC. It can also look at
> things other than environment variables if you want, and if/else logic is
> much easier to write/maintain in Java code than it is in macros in a JSON
> file!
>
>
> It is only easier after you sold the ordering problem of the
>
> * Configurator,
> * Configuration bundle, and
> * Configuration plugin bundle …
>
> It also adds quite a bit of complexity by:
>
> * Separating the rules from the actual configuration, and
> * Adding extra bundles.
>
> This additional complexity is only worth it if you can reuse the rules in
> many different places. Hmm. Maybe a configuration plugin with a macro
> processor? :-)
>
> Peter Kriens
>
>
> Best Regards,
>
> Tim
>
> On 20 Aug 2018, at 17:08, Mark Hoffmann via osgi-dev <
> osgi-dev@mail.osgi.org> wrote:
>
> Hi all,
>
> Carsten Ziegeler pointed us to the Configuration Plugin Services, that are
> part of the ConfigurationAdmin specification. Together with the
> Configurator specification, it could be possible to do that substitution in
> such an plugin.
>
> Regards,
>
> Mark
>
> Am 20.08.2018 um 17:56 schrieb Christian Schneider via osgi-dev:
>
> I think this would be a good extension to the configurator to also allow
> env variable replacement.
> Actually I hoped it would already do this...
> WDYT?
>
> Christian
>
> Am Mo., 20. Aug. 2018 um 17:05 Uhr schrieb Peter Kriens via osgi-dev <
> osgi-dev@mail.osgi.org>:
>
>> Are you using v2Archive enRoute or the new one?
>>
>> The v2Archive OSGi enRoute has the simple Configurer (the predecessor of
>> the OSGi R7 Configurator but with, according to some, a better name :-). It
>> runs things through the macro processor you could therefore use environment
>> variables to make the difference.
>>
>> E.g. ${env;XUZ} in the json files. Since it also supports ${if} you can
>> eat your heart out! You can set environment variables in docker with -e in
>> the command line when you start the container. You can also use @{ instead
>> of ${ to not run afoul of the bnd processing that can happen at build time.
>> I.e. the Configurer replaces all @{…} with ${…}.
>>
>> If you are using the new R7 Configurator then you are on your own ...
>>
>> Kind regards,
>>
>> Peter Kriens
>>
>>
>>
>>
>> > On 18 Aug 2018, at 18:51, Randy Leonard via osgi-dev <
>> osgi-dev@mail.osgi.org> wrote:
>> >
>> > To all:
>> >
>> > We are at the point where we are deploying our OSGI enRoute
>> applications via Docker.
>> >
>> > - A key sticking point is the syntax for embedding environment
>> variables within our configuration.json files.
>> > - For example, a developer would set a hostName to ‘localhost’ for
>> development, but this same environment variable would be different for QA,
>> UAT, and Production environments
>> > - I presume this is the best way of allowing the same container to be
>> deployed in different environments without modification?
>> > - Suggestions and/or examples are appreciated.
>> >
>> >
>> >
>> > Thanks,
>> > Randy Leonard
>> >
>> > ___
>> > 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
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>
>
>
> ___
> OSGi Developer Mail 
> listosgi-...@mail.osgi.orghttps://mail.osgi.org/mailman/listinfo/osgi-dev
>
>
> --
> Mark Hoffmann
> M.A. Dipl.-Betriebswirt (FH)
> Geschäftsführer
>
> Tel:+49 3641 384 910 0
> Mobil:  +49 175 701 2201
> E-Mail: m.hoffm...@data-in-motion.biz
> Web: www.datainmotion.de
>
> Data In Motion Consulting GmbH
> Kahlaische Straße 4
> 07745 Jena
>
> Geschäftsführer
> Mark Hoffmann
> Jürgen Albert
>
> Jena HRB 513025
> Steuernummer 162/107/05779
> USt-Id DE310002614
>
>
>
> ___
> OSGi 

Re: [osgi-dev] Docker configuration via environment variables

2018-08-21 Thread Tim Ward via osgi-dev
I’m not sure where you think the ordering problem is between the Configurator, 
the Configuration Bundle and the bundle being configured…

As for the Configuration Plugin, I would expect a ConfigurationPlugin like this 
to be a feature of the launcher, being the one part of the system with at least 
some reason to couple to the environment.

Best Regards,

Tim

> On 21 Aug 2018, at 09:21, Peter Kriens  wrote:
> 
>> On 21 Aug 2018, at 10:11, Tim Ward via osgi-dev > > wrote:
>> Just another vote in favour of the ConfigurationPlugin model - you can use 
>> this to post-process configurations wherever they come from (meaning it 
>> isn’t tied to the Configurer or Configurator).
>> A configuration plugin that does this sort of work is easy to write, and if 
>> using DS could be done in a lot less than 100 LoC. It can also look at 
>> things other than environment variables if you want, and if/else logic is 
>> much easier to write/maintain in Java code than it is in macros in a JSON 
>> file!
> 
> It is only easier after you sold the ordering problem of the 
> 
> * Configurator, 
> * Configuration bundle, and 
> * Configuration plugin bundle … 
> 
> It also adds quite a bit of complexity by:
> 
> * Separating the rules from the actual configuration, and 
> * Adding extra bundles.
> 
> This additional complexity is only worth it if you can reuse the rules in 
> many different places. Hmm. Maybe a configuration plugin with a macro 
> processor? :-)
> 
>   Peter Kriens
> 
>> 
>> Best Regards,
>> 
>> Tim
>> 
>>> On 20 Aug 2018, at 17:08, Mark Hoffmann via osgi-dev 
>>> mailto:osgi-dev@mail.osgi.org>> wrote:
>>> 
>>> Hi all,
>>> 
>>> Carsten Ziegeler pointed us to the Configuration Plugin Services, that are 
>>> part of the ConfigurationAdmin specification. Together with the 
>>> Configurator specification, it could be possible to do that substitution in 
>>> such an plugin.
>>> 
>>> Regards,
>>> 
>>> Mark
>>> 
>>> 
>>> Am 20.08.2018 um 17:56 schrieb Christian Schneider via osgi-dev:
 I think this would be a good extension to the configurator to also allow 
 env variable replacement.
 Actually I hoped it would already do this...
 WDYT?
 
 Christian
 
 Am Mo., 20. Aug. 2018 um 17:05 Uhr schrieb Peter Kriens via osgi-dev 
 mailto:osgi-dev@mail.osgi.org>>:
 Are you using v2Archive enRoute or the new one?
 
 The v2Archive OSGi enRoute has the simple Configurer (the predecessor of 
 the OSGi R7 Configurator but with, according to some, a better name :-). 
 It runs things through the macro processor you could therefore use 
 environment variables to make the difference. 
 
 E.g. ${env;XUZ} in the json files. Since it also supports ${if} you can 
 eat your heart out! You can set environment variables in docker with -e in 
 the command line when you start the container. You can also use @{ instead 
 of ${ to not run afoul of the bnd processing that can happen at build 
 time. I.e. the Configurer replaces all @{…} with ${…}.
 
 If you are using the new R7 Configurator then you are on your own ...
 
 Kind regards,
 
 Peter Kriens
 
 
 
 
 > On 18 Aug 2018, at 18:51, Randy Leonard via osgi-dev 
 > mailto:osgi-dev@mail.osgi.org>> wrote:
 > 
 > To all:
 > 
 > We are at the point where we are deploying our OSGI enRoute applications 
 > via Docker.
 > 
 > - A key sticking point is the syntax for embedding environment variables 
 > within our configuration.json files.  
 > - For example, a developer would set a hostName to ‘localhost’ for 
 > development, but this same environment variable would be different for 
 > QA, UAT, and Production environments
 > - I presume this is the best way of allowing the same container to be 
 > deployed in different environments without modification?
 > - Suggestions and/or examples are appreciated.
 > 
 > 
 > 
 > Thanks,
 > Randy Leonard
 > 
 > ___
 > 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 
 
 
 -- 
 -- 
 Christian Schneider
 http://www.liquid-reality.de 
 
 Computer Scientist
 http://www.adobe.com 
 
 
 
 ___
 OSGi Developer Mail List
 osgi-dev@mail.osgi.org 
 

Re: [osgi-dev] Docker configuration via environment variables

2018-08-21 Thread Peter Kriens via osgi-dev
> On 21 Aug 2018, at 10:11, Tim Ward via osgi-dev  
> wrote:
> Just another vote in favour of the ConfigurationPlugin model - you can use 
> this to post-process configurations wherever they come from (meaning it isn’t 
> tied to the Configurer or Configurator).
> A configuration plugin that does this sort of work is easy to write, and if 
> using DS could be done in a lot less than 100 LoC. It can also look at things 
> other than environment variables if you want, and if/else logic is much 
> easier to write/maintain in Java code than it is in macros in a JSON file!

It is only easier after you sold the ordering problem of the 

* Configurator, 
* Configuration bundle, and 
* Configuration plugin bundle … 

It also adds quite a bit of complexity by:

* Separating the rules from the actual configuration, and 
* Adding extra bundles.

This additional complexity is only worth it if you can reuse the rules in many 
different places. Hmm. Maybe a configuration plugin with a macro processor? :-)

Peter Kriens

> 
> Best Regards,
> 
> Tim
> 
>> On 20 Aug 2018, at 17:08, Mark Hoffmann via osgi-dev > > wrote:
>> 
>> Hi all,
>> 
>> Carsten Ziegeler pointed us to the Configuration Plugin Services, that are 
>> part of the ConfigurationAdmin specification. Together with the Configurator 
>> specification, it could be possible to do that substitution in such an 
>> plugin.
>> Regards,
>> 
>> Mark
>> 
>> Am 20.08.2018 um 17:56 schrieb Christian Schneider via osgi-dev:
>>> I think this would be a good extension to the configurator to also allow 
>>> env variable replacement.
>>> Actually I hoped it would already do this...
>>> WDYT?
>>> 
>>> Christian
>>> 
>>> Am Mo., 20. Aug. 2018 um 17:05 Uhr schrieb Peter Kriens via osgi-dev 
>>> mailto:osgi-dev@mail.osgi.org>>:
>>> Are you using v2Archive enRoute or the new one?
>>> 
>>> The v2Archive OSGi enRoute has the simple Configurer (the predecessor of 
>>> the OSGi R7 Configurator but with, according to some, a better name :-). It 
>>> runs things through the macro processor you could therefore use environment 
>>> variables to make the difference. 
>>> 
>>> E.g. ${env;XUZ} in the json files. Since it also supports ${if} you can eat 
>>> your heart out! You can set environment variables in docker with -e in the 
>>> command line when you start the container. You can also use @{ instead of 
>>> ${ to not run afoul of the bnd processing that can happen at build time. 
>>> I.e. the Configurer replaces all @{…} with ${…}.
>>> 
>>> If you are using the new R7 Configurator then you are on your own ...
>>> 
>>> Kind regards,
>>> 
>>> Peter Kriens
>>> 
>>> 
>>> 
>>> 
>>> > On 18 Aug 2018, at 18:51, Randy Leonard via osgi-dev 
>>> > mailto:osgi-dev@mail.osgi.org>> wrote:
>>> > 
>>> > To all:
>>> > 
>>> > We are at the point where we are deploying our OSGI enRoute applications 
>>> > via Docker.
>>> > 
>>> > - A key sticking point is the syntax for embedding environment variables 
>>> > within our configuration.json files.  
>>> > - For example, a developer would set a hostName to ‘localhost’ for 
>>> > development, but this same environment variable would be different for 
>>> > QA, UAT, and Production environments
>>> > - I presume this is the best way of allowing the same container to be 
>>> > deployed in different environments without modification?
>>> > - Suggestions and/or examples are appreciated.
>>> > 
>>> > 
>>> > 
>>> > Thanks,
>>> > Randy Leonard
>>> > 
>>> > ___
>>> > 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 
>>> 
>>> 
>>> -- 
>>> -- 
>>> Christian Schneider
>>> http://www.liquid-reality.de 
>>> 
>>> Computer Scientist
>>> http://www.adobe.com 
>>> 
>>> 
>>> 
>>> ___
>>> OSGi Developer Mail List
>>> osgi-dev@mail.osgi.org 
>>> https://mail.osgi.org/mailman/listinfo/osgi-dev 
>>> 
>> -- 
>> Mark Hoffmann
>> M.A. Dipl.-Betriebswirt (FH)
>> Geschäftsführer
>> 
>> Tel:+49 3641 384 910 0
>> Mobil:  +49 175 701 2201  
>> E-Mail: m.hoffm...@data-in-motion.biz 
>> Web: www.datainmotion.de  
>> 
>> Data In Motion Consulting GmbH
>> Kahlaische Straße 4
>> 07745 Jena
>> 
>> Geschäftsführer
>> Mark Hoffmann
>> Jürgen Albert
>> 
>> Jena HRB 513025
>> Steuernummer 162/107/05779
>> USt-Id DE310002614
>> 
>> 
>> 

Re: [osgi-dev] Docker configuration via environment variables

2018-08-21 Thread Tim Ward via osgi-dev
Just another vote in favour of the ConfigurationPlugin model - you can use this 
to post-process configurations wherever they come from (meaning it isn’t tied 
to the Configurer or Configurator).

A configuration plugin that does this sort of work is easy to write, and if 
using DS could be done in a lot less than 100 LoC. It can also look at things 
other than environment variables if you want, and if/else logic is much easier 
to write/maintain in Java code than it is in macros in a JSON file!

Best Regards,

Tim

> On 20 Aug 2018, at 17:08, Mark Hoffmann via osgi-dev  
> wrote:
> 
> Hi all,
> 
> Carsten Ziegeler pointed us to the Configuration Plugin Services, that are 
> part of the ConfigurationAdmin specification. Together with the Configurator 
> specification, it could be possible to do that substitution in such an plugin.
> Regards,
> 
> Mark
> 
> Am 20.08.2018 um 17:56 schrieb Christian Schneider via osgi-dev:
>> I think this would be a good extension to the configurator to also allow env 
>> variable replacement.
>> Actually I hoped it would already do this...
>> WDYT?
>> 
>> Christian
>> 
>> Am Mo., 20. Aug. 2018 um 17:05 Uhr schrieb Peter Kriens via osgi-dev 
>> mailto:osgi-dev@mail.osgi.org>>:
>> Are you using v2Archive enRoute or the new one?
>> 
>> The v2Archive OSGi enRoute has the simple Configurer (the predecessor of the 
>> OSGi R7 Configurator but with, according to some, a better name :-). It runs 
>> things through the macro processor you could therefore use environment 
>> variables to make the difference. 
>> 
>> E.g. ${env;XUZ} in the json files. Since it also supports ${if} you can eat 
>> your heart out! You can set environment variables in docker with -e in the 
>> command line when you start the container. You can also use @{ instead of ${ 
>> to not run afoul of the bnd processing that can happen at build time. I.e. 
>> the Configurer replaces all @{…} with ${…}.
>> 
>> If you are using the new R7 Configurator then you are on your own ...
>> 
>> Kind regards,
>> 
>> Peter Kriens
>> 
>> 
>> 
>> 
>> > On 18 Aug 2018, at 18:51, Randy Leonard via osgi-dev 
>> > mailto:osgi-dev@mail.osgi.org>> wrote:
>> > 
>> > To all:
>> > 
>> > We are at the point where we are deploying our OSGI enRoute applications 
>> > via Docker.
>> > 
>> > - A key sticking point is the syntax for embedding environment variables 
>> > within our configuration.json files.  
>> > - For example, a developer would set a hostName to ‘localhost’ for 
>> > development, but this same environment variable would be different for QA, 
>> > UAT, and Production environments
>> > - I presume this is the best way of allowing the same container to be 
>> > deployed in different environments without modification?
>> > - Suggestions and/or examples are appreciated.
>> > 
>> > 
>> > 
>> > Thanks,
>> > Randy Leonard
>> > 
>> > ___
>> > 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 
>> 
>> 
>> -- 
>> -- 
>> Christian Schneider
>> http://www.liquid-reality.de 
>> 
>> Computer Scientist
>> http://www.adobe.com 
>> 
>> 
>> 
>> ___
>> OSGi Developer Mail List
>> osgi-dev@mail.osgi.org 
>> https://mail.osgi.org/mailman/listinfo/osgi-dev 
>> 
> -- 
> Mark Hoffmann
> M.A. Dipl.-Betriebswirt (FH)
> Geschäftsführer
> 
> Tel:+49 3641 384 910 0
> Mobil:  +49 175 701 2201  
> E-Mail: m.hoffm...@data-in-motion.biz 
> Web: www.datainmotion.de  
> 
> Data In Motion Consulting GmbH
> Kahlaische Straße 4
> 07745 Jena
> 
> Geschäftsführer
> Mark Hoffmann
> Jürgen Albert
> 
> Jena HRB 513025
> Steuernummer 162/107/05779
> USt-Id DE310002614
> 
> 
> ___
> 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] Docker configuration via environment variables

2018-08-20 Thread Mark Hoffmann via osgi-dev

Hi all,

Carsten Ziegeler pointed us to the Configuration Plugin Services, that 
are part of the ConfigurationAdmin specification. Together with the 
Configurator specification, it could be possible to do that substitution 
in such an plugin.


Regards,

Mark


Am 20.08.2018 um 17:56 schrieb Christian Schneider via osgi-dev:
I think this would be a good extension to the configurator to also 
allow env variable replacement.

Actually I hoped it would already do this...
WDYT?

Christian

Am Mo., 20. Aug. 2018 um 17:05 Uhr schrieb Peter Kriens via osgi-dev 
mailto:osgi-dev@mail.osgi.org>>:


Are you using v2Archive enRoute or the new one?

The v2Archive OSGi enRoute has the simple Configurer (the
predecessor of the OSGi R7 Configurator but with, according to
some, a better name :-). It runs things through the macro
processor you could therefore use environment variables to make
the difference.

E.g. ${env;XUZ} in the json files. Since it also supports ${if}
you can eat your heart out! You can set environment variables in
docker with -e in the command line when you start the container.
You can also use @{ instead of ${ to not run afoul of the bnd
processing that can happen at build time. I.e. the Configurer
replaces all @{…} with ${…}.

If you are using the new R7 Configurator then you are on your own ...

Kind regards,

        Peter Kriens




> On 18 Aug 2018, at 18:51, Randy Leonard via osgi-dev
mailto:osgi-dev@mail.osgi.org>> wrote:
>
> To all:
>
> We are at the point where we are deploying our OSGI enRoute
applications via Docker.
>
> - A key sticking point is the syntax for embedding environment
variables within our configuration.json files.
> - For example, a developer would set a hostName to ‘localhost’
for development, but this same environment variable would be
different for QA, UAT, and Production environments
> - I presume this is the best way of allowing the same container
to be deployed in different environments without modification?
> - Suggestions and/or examples are appreciated.
>
>
>
> Thanks,
> Randy Leonard
>
> ___
> 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



--
--
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com



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


--
Mark Hoffmann
M.A. Dipl.-Betriebswirt (FH)
Geschäftsführer

Tel:+49 3641 384 910 0
Mobil:  +49 175 701 2201
E-Mail: m.hoffm...@data-in-motion.biz
Web: www.datainmotion.de

Data In Motion Consulting GmbH
Kahlaische Straße 4
07745 Jena

Geschäftsführer
Mark Hoffmann
Jürgen Albert

Jena HRB 513025
Steuernummer 162/107/05779
USt-Id DE310002614


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

Re: [osgi-dev] Docker configuration via environment variables

2018-08-20 Thread Christian Schneider via osgi-dev
I think this would be a good extension to the configurator to also allow
env variable replacement.
Actually I hoped it would already do this...
WDYT?

Christian

Am Mo., 20. Aug. 2018 um 17:05 Uhr schrieb Peter Kriens via osgi-dev <
osgi-dev@mail.osgi.org>:

> Are you using v2Archive enRoute or the new one?
>
> The v2Archive OSGi enRoute has the simple Configurer (the predecessor of
> the OSGi R7 Configurator but with, according to some, a better name :-). It
> runs things through the macro processor you could therefore use environment
> variables to make the difference.
>
> E.g. ${env;XUZ} in the json files. Since it also supports ${if} you can
> eat your heart out! You can set environment variables in docker with -e in
> the command line when you start the container. You can also use @{ instead
> of ${ to not run afoul of the bnd processing that can happen at build time.
> I.e. the Configurer replaces all @{…} with ${…}.
>
> If you are using the new R7 Configurator then you are on your own ...
>
> Kind regards,
>
> Peter Kriens
>
>
>
>
> > On 18 Aug 2018, at 18:51, Randy Leonard via osgi-dev <
> osgi-dev@mail.osgi.org> wrote:
> >
> > To all:
> >
> > We are at the point where we are deploying our OSGI enRoute applications
> via Docker.
> >
> > - A key sticking point is the syntax for embedding environment variables
> within our configuration.json files.
> > - For example, a developer would set a hostName to ‘localhost’ for
> development, but this same environment variable would be different for QA,
> UAT, and Production environments
> > - I presume this is the best way of allowing the same container to be
> deployed in different environments without modification?
> > - Suggestions and/or examples are appreciated.
> >
> >
> >
> > Thanks,
> > Randy Leonard
> >
> > ___
> > 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



-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Docker configuration via environment variables

2018-08-20 Thread Peter Kriens via osgi-dev
Are you using v2Archive enRoute or the new one?

The v2Archive OSGi enRoute has the simple Configurer (the predecessor of the 
OSGi R7 Configurator but with, according to some, a better name :-). It runs 
things through the macro processor you could therefore use environment 
variables to make the difference. 

E.g. ${env;XUZ} in the json files. Since it also supports ${if} you can eat 
your heart out! You can set environment variables in docker with -e in the 
command line when you start the container. You can also use @{ instead of ${ to 
not run afoul of the bnd processing that can happen at build time. I.e. the 
Configurer replaces all @{…} with ${…}.

If you are using the new R7 Configurator then you are on your own ...

Kind regards,

Peter Kriens




> On 18 Aug 2018, at 18:51, Randy Leonard via osgi-dev  
> wrote:
> 
> To all:
> 
> We are at the point where we are deploying our OSGI enRoute applications via 
> Docker.
> 
> - A key sticking point is the syntax for embedding environment variables 
> within our configuration.json files.  
> - For example, a developer would set a hostName to ‘localhost’ for 
> development, but this same environment variable would be different for QA, 
> UAT, and Production environments
> - I presume this is the best way of allowing the same container to be 
> deployed in different environments without modification?
> - Suggestions and/or examples are appreciated.
> 
> 
> 
> Thanks,
> Randy Leonard
> 
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev



smime.p7s
Description: S/MIME cryptographic signature
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Docker configuration via environment variables

2018-08-18 Thread Randy Leonard via osgi-dev
To all:

We are at the point where we are deploying our OSGI enRoute applications via 
Docker.

 - A key sticking point is the syntax for embedding environment variables 
within our configuration.json files.  
 - For example, a developer would set a hostName to ‘localhost’ for 
development, but this same environment variable would be different for QA, UAT, 
and Production environments
 - I presume this is the best way of allowing the same container to be deployed 
in different environments without modification?
 - Suggestions and/or examples are appreciated.



Thanks,
Randy Leonard

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