karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: [HEADS UP] Docker friendly runtime with env variables compliant configuration
Date Tue, 29 Sep 2020 16:43:12 GMT
An interesting update your feature request makes me think about is to copy
the original value in <name>.original and then let the new value reuse this.

Example (using env format assuming it is not interpolated/does not require
escaping where set):

ORG_APACHE_KARAF_FEATURES_FEATURESREPOSITORIES=mvn:my/repo/1.0/xml/features,${featuresRepositories.original}
ORG_APACHE_KARAF_FEATURES_FEATURESBOOT=${featuresBoot.original},my-feature

Guess it just needs to
call org.apache.felix.utils.properties.InterpolationHelper#performSubstitution
on the new properties then drop the additional ones.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le mar. 29 sept. 2020 à 18:07, Steinar Bang <sb@dod.no> a écrit :

> >>>>> Jean-Baptiste Onofre <jb@nanthrax.net>:
>
> > Thoughts ?
>
> Not directly environment variable releated, but one thing I would like
> to see, is a simple way to add one or more feature repositories, and to
> add one or more features to the boot set.
>
> That's what I've done in my karaf based docker images.
>
> I've done it by copying in org.apache.karaf.features.cfg from a karaf
> distro and adding the feature repositories to featuresRepositories and
> the features to featuresBoot.
>
> That works great!
>
> But as you may remember: switching the karaf version and copying in the
> org.apache.karaf.features.cfg from an old karaf version can have strange
> results.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message