Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Jean-Baptiste Onofré

Fair enough. Please, create a Jira to do this improvement.

Regards
JB

On 10/31/2016 03:38 PM, Johannes Utzig wrote:

It is true that it is very possible to just add this to setenv, but it is
actually not all that easy to do if you take into account all the edge
cases with spaces in paths, current working directory and so on.
Shipping a solution directly with karaf might make this easier for other
people. For reference, here is what we ended up with after a lot trial and
error:

PUSHD "%~dp0%.."

if exist "%cd%\runtime\jvm64\bin\java.exe" (
set JAVA_HOME_LOCAL="%cd%\runtime\jvm64"
)
rem quote spaces
if defined JAVA_HOME_LOCAL set JAVA_HOME="%JAVA_HOME_LOCAL: =^ %"
set JAVA_HOME_LOCAL=

POPD

2016-10-31 14:22 GMT+01:00 Jean-Baptiste Onofré :


I see your point, but as you will provide your own distribution, you can
always override the default scripts with your definition and let the user
with bin/setenv.

My point is that what you are proposing make sense but very specific to
your use case.

You can create a Jira with such improvement, we will see what the others
think about that.

Regards
JB


On 10/31/2016 02:14 PM, Sascha Vogt wrote:


Well, if you provide a product for someone else you need to clearly
separate between files you ship and files the user is allowed to modify.

We want to keep the setenv empty so the user can adjust things there and
we don't have to worry during upgrades (at least not that much to worry,
of course certain variables might no longer be used or their values
become counter productive...). Now if WE ship already data within setenv
and the user adds his own stuff there, we have an issue during upgrades
if we need to change "our part" of the script. We need to figure out
what it is that we changed vs. what the user changed so we don't
"overwrite" or remove the users settings.

Hence the idea to modify the base scripts to additionally detect a JVM
inside KARAF_HOME and prefer that one if present.

Greetings
-Sascha-

Am 31.10.2016 um 14:05 schrieb Jean-Baptiste Onofré:


Ah, I understand now.

It was also the purpose of the bin/setenv to be able to override Karaf
defined location (like the Java).

I'm not against to use $KARAF_HOME/java folder as JAVA_HOME if it's
provided, but I don't see a huge value compared to define it in
bin/setenv.

Regards
JB

On 10/31/2016 02:02 PM, Sascha Vogt wrote:


@Achim / @JB:

Sorry for the misunderstanding. I didn't mean to ship a binary
distribution with a JVM embedded, I meant to modify the scripts so that
Karaf by default prefers a JVM if (and only if) one is present in a
certain directory within KARAF_HOME.

In case none is there, just follow the same search order like at the
moment (ie. first look for a JAVA_HOME env var and if that is missing
search for a java binary in the path).

That would be enough for users to package a JVM without needing to
modify the setenv scripts...

Greetings
-Sascha-

Am 31.10.2016 um 13:49 schrieb Jean-Baptiste Onofré:


Hi Sascha,

An "embedded" distribution of Karaf with JVM is a good idea. It sounds
a
bit like a docker image ;)

However, unfortunately, I'm not sure it would be possible to provide
such distribution directly at Karaf due to legal constraint.

We can provide a script (like a dockerfiles I created) to let users
create their own custom distro.

Regards
JB

On 10/31/2016 01:33 PM, Sascha Vogt wrote:


Hi all,

we're workig on a Karaf based product and have the requirement to use
the JVM we ship with the product. We thought that might also be
interesting to others, so we wanted to share our proposal / current
implementation (and are also willing to provide the required patches).

Main idea is to modify the start scripts (including the service
wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
directory is present it is prefered over a JAVA_HOME env var or
whatever
else is in the path.

Reason to also prefer it over JAVA_HOME is because if you run
alongside
other Java applications on a server, JAVA_HOME might already be set
for
other applications and the admin cannot change it.

At the moment we have implemented the above via custom setenv
scripts we
ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
"wrapper:install" is called, this JAVA_HOME is taken to the wrapper
properties.

We spoke with the Instana[1] people as their agent is also Karaf based
and they were interested in it as well, so we know at least one other
Karaf user who would welcome that :)

Anyway, any feeback is welcome. Also of course the name of the
directory(ies) can be discussed.

Greetings
-Sascha-

[1]https://www.instana.com/











--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com





--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Johannes Utzig
It is true that it is very possible to just add this to setenv, but it is
actually not all that easy to do if you take into account all the edge
cases with spaces in paths, current working directory and so on.
Shipping a solution directly with karaf might make this easier for other
people. For reference, here is what we ended up with after a lot trial and
error:

PUSHD "%~dp0%.."

if exist "%cd%\runtime\jvm64\bin\java.exe" (
set JAVA_HOME_LOCAL="%cd%\runtime\jvm64"
)
rem quote spaces
if defined JAVA_HOME_LOCAL set JAVA_HOME="%JAVA_HOME_LOCAL: =^ %"
set JAVA_HOME_LOCAL=

POPD

2016-10-31 14:22 GMT+01:00 Jean-Baptiste Onofré :

> I see your point, but as you will provide your own distribution, you can
> always override the default scripts with your definition and let the user
> with bin/setenv.
>
> My point is that what you are proposing make sense but very specific to
> your use case.
>
> You can create a Jira with such improvement, we will see what the others
> think about that.
>
> Regards
> JB
>
>
> On 10/31/2016 02:14 PM, Sascha Vogt wrote:
>
>> Well, if you provide a product for someone else you need to clearly
>> separate between files you ship and files the user is allowed to modify.
>>
>> We want to keep the setenv empty so the user can adjust things there and
>> we don't have to worry during upgrades (at least not that much to worry,
>> of course certain variables might no longer be used or their values
>> become counter productive...). Now if WE ship already data within setenv
>> and the user adds his own stuff there, we have an issue during upgrades
>> if we need to change "our part" of the script. We need to figure out
>> what it is that we changed vs. what the user changed so we don't
>> "overwrite" or remove the users settings.
>>
>> Hence the idea to modify the base scripts to additionally detect a JVM
>> inside KARAF_HOME and prefer that one if present.
>>
>> Greetings
>> -Sascha-
>>
>> Am 31.10.2016 um 14:05 schrieb Jean-Baptiste Onofré:
>>
>>> Ah, I understand now.
>>>
>>> It was also the purpose of the bin/setenv to be able to override Karaf
>>> defined location (like the Java).
>>>
>>> I'm not against to use $KARAF_HOME/java folder as JAVA_HOME if it's
>>> provided, but I don't see a huge value compared to define it in
>>> bin/setenv.
>>>
>>> Regards
>>> JB
>>>
>>> On 10/31/2016 02:02 PM, Sascha Vogt wrote:
>>>
 @Achim / @JB:

 Sorry for the misunderstanding. I didn't mean to ship a binary
 distribution with a JVM embedded, I meant to modify the scripts so that
 Karaf by default prefers a JVM if (and only if) one is present in a
 certain directory within KARAF_HOME.

 In case none is there, just follow the same search order like at the
 moment (ie. first look for a JAVA_HOME env var and if that is missing
 search for a java binary in the path).

 That would be enough for users to package a JVM without needing to
 modify the setenv scripts...

 Greetings
 -Sascha-

 Am 31.10.2016 um 13:49 schrieb Jean-Baptiste Onofré:

> Hi Sascha,
>
> An "embedded" distribution of Karaf with JVM is a good idea. It sounds
> a
> bit like a docker image ;)
>
> However, unfortunately, I'm not sure it would be possible to provide
> such distribution directly at Karaf due to legal constraint.
>
> We can provide a script (like a dockerfiles I created) to let users
> create their own custom distro.
>
> Regards
> JB
>
> On 10/31/2016 01:33 PM, Sascha Vogt wrote:
>
>> Hi all,
>>
>> we're workig on a Karaf based product and have the requirement to use
>> the JVM we ship with the product. We thought that might also be
>> interesting to others, so we wanted to share our proposal / current
>> implementation (and are also willing to provide the required patches).
>>
>> Main idea is to modify the start scripts (including the service
>> wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
>> runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
>> directory is present it is prefered over a JAVA_HOME env var or
>> whatever
>> else is in the path.
>>
>> Reason to also prefer it over JAVA_HOME is because if you run
>> alongside
>> other Java applications on a server, JAVA_HOME might already be set
>> for
>> other applications and the admin cannot change it.
>>
>> At the moment we have implemented the above via custom setenv
>> scripts we
>> ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
>> "wrapper:install" is called, this JAVA_HOME is taken to the wrapper
>> properties.
>>
>> We spoke with the Instana[1] people as their agent is also Karaf based
>> and they were interested in it as well, so we know at least one other
>> Karaf user who would welcome that :)
>>
>> Anyway, any feeback is welcome. Also of course the name

Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Jean-Baptiste Onofré
I see your point, but as you will provide your own distribution, you can 
always override the default scripts with your definition and let the 
user with bin/setenv.


My point is that what you are proposing make sense but very specific to 
your use case.


You can create a Jira with such improvement, we will see what the others 
think about that.


Regards
JB

On 10/31/2016 02:14 PM, Sascha Vogt wrote:

Well, if you provide a product for someone else you need to clearly
separate between files you ship and files the user is allowed to modify.

We want to keep the setenv empty so the user can adjust things there and
we don't have to worry during upgrades (at least not that much to worry,
of course certain variables might no longer be used or their values
become counter productive...). Now if WE ship already data within setenv
and the user adds his own stuff there, we have an issue during upgrades
if we need to change "our part" of the script. We need to figure out
what it is that we changed vs. what the user changed so we don't
"overwrite" or remove the users settings.

Hence the idea to modify the base scripts to additionally detect a JVM
inside KARAF_HOME and prefer that one if present.

Greetings
-Sascha-

Am 31.10.2016 um 14:05 schrieb Jean-Baptiste Onofré:

Ah, I understand now.

It was also the purpose of the bin/setenv to be able to override Karaf
defined location (like the Java).

I'm not against to use $KARAF_HOME/java folder as JAVA_HOME if it's
provided, but I don't see a huge value compared to define it in bin/setenv.

Regards
JB

On 10/31/2016 02:02 PM, Sascha Vogt wrote:

@Achim / @JB:

Sorry for the misunderstanding. I didn't mean to ship a binary
distribution with a JVM embedded, I meant to modify the scripts so that
Karaf by default prefers a JVM if (and only if) one is present in a
certain directory within KARAF_HOME.

In case none is there, just follow the same search order like at the
moment (ie. first look for a JAVA_HOME env var and if that is missing
search for a java binary in the path).

That would be enough for users to package a JVM without needing to
modify the setenv scripts...

Greetings
-Sascha-

Am 31.10.2016 um 13:49 schrieb Jean-Baptiste Onofré:

Hi Sascha,

An "embedded" distribution of Karaf with JVM is a good idea. It sounds a
bit like a docker image ;)

However, unfortunately, I'm not sure it would be possible to provide
such distribution directly at Karaf due to legal constraint.

We can provide a script (like a dockerfiles I created) to let users
create their own custom distro.

Regards
JB

On 10/31/2016 01:33 PM, Sascha Vogt wrote:

Hi all,

we're workig on a Karaf based product and have the requirement to use
the JVM we ship with the product. We thought that might also be
interesting to others, so we wanted to share our proposal / current
implementation (and are also willing to provide the required patches).

Main idea is to modify the start scripts (including the service
wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
directory is present it is prefered over a JAVA_HOME env var or
whatever
else is in the path.

Reason to also prefer it over JAVA_HOME is because if you run alongside
other Java applications on a server, JAVA_HOME might already be set for
other applications and the admin cannot change it.

At the moment we have implemented the above via custom setenv
scripts we
ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
"wrapper:install" is called, this JAVA_HOME is taken to the wrapper
properties.

We spoke with the Instana[1] people as their agent is also Karaf based
and they were interested in it as well, so we know at least one other
Karaf user who would welcome that :)

Anyway, any feeback is welcome. Also of course the name of the
directory(ies) can be discussed.

Greetings
-Sascha-

[1]https://www.instana.com/











--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Sascha Vogt
Well, if you provide a product for someone else you need to clearly
separate between files you ship and files the user is allowed to modify.

We want to keep the setenv empty so the user can adjust things there and
we don't have to worry during upgrades (at least not that much to worry,
of course certain variables might no longer be used or their values
become counter productive...). Now if WE ship already data within setenv
and the user adds his own stuff there, we have an issue during upgrades
if we need to change "our part" of the script. We need to figure out
what it is that we changed vs. what the user changed so we don't
"overwrite" or remove the users settings.

Hence the idea to modify the base scripts to additionally detect a JVM
inside KARAF_HOME and prefer that one if present.

Greetings
-Sascha-

Am 31.10.2016 um 14:05 schrieb Jean-Baptiste Onofré:
> Ah, I understand now.
> 
> It was also the purpose of the bin/setenv to be able to override Karaf
> defined location (like the Java).
> 
> I'm not against to use $KARAF_HOME/java folder as JAVA_HOME if it's
> provided, but I don't see a huge value compared to define it in bin/setenv.
> 
> Regards
> JB
> 
> On 10/31/2016 02:02 PM, Sascha Vogt wrote:
>> @Achim / @JB:
>>
>> Sorry for the misunderstanding. I didn't mean to ship a binary
>> distribution with a JVM embedded, I meant to modify the scripts so that
>> Karaf by default prefers a JVM if (and only if) one is present in a
>> certain directory within KARAF_HOME.
>>
>> In case none is there, just follow the same search order like at the
>> moment (ie. first look for a JAVA_HOME env var and if that is missing
>> search for a java binary in the path).
>>
>> That would be enough for users to package a JVM without needing to
>> modify the setenv scripts...
>>
>> Greetings
>> -Sascha-
>>
>> Am 31.10.2016 um 13:49 schrieb Jean-Baptiste Onofré:
>>> Hi Sascha,
>>>
>>> An "embedded" distribution of Karaf with JVM is a good idea. It sounds a
>>> bit like a docker image ;)
>>>
>>> However, unfortunately, I'm not sure it would be possible to provide
>>> such distribution directly at Karaf due to legal constraint.
>>>
>>> We can provide a script (like a dockerfiles I created) to let users
>>> create their own custom distro.
>>>
>>> Regards
>>> JB
>>>
>>> On 10/31/2016 01:33 PM, Sascha Vogt wrote:
 Hi all,

 we're workig on a Karaf based product and have the requirement to use
 the JVM we ship with the product. We thought that might also be
 interesting to others, so we wanted to share our proposal / current
 implementation (and are also willing to provide the required patches).

 Main idea is to modify the start scripts (including the service
 wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
 runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
 directory is present it is prefered over a JAVA_HOME env var or
 whatever
 else is in the path.

 Reason to also prefer it over JAVA_HOME is because if you run alongside
 other Java applications on a server, JAVA_HOME might already be set for
 other applications and the admin cannot change it.

 At the moment we have implemented the above via custom setenv
 scripts we
 ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
 "wrapper:install" is called, this JAVA_HOME is taken to the wrapper
 properties.

 We spoke with the Instana[1] people as their agent is also Karaf based
 and they were interested in it as well, so we know at least one other
 Karaf user who would welcome that :)

 Anyway, any feeback is welcome. Also of course the name of the
 directory(ies) can be discussed.

 Greetings
 -Sascha-

 [1]https://www.instana.com/

>>>
>>
> 



Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Jean-Baptiste Onofré

Ah, I understand now.

It was also the purpose of the bin/setenv to be able to override Karaf 
defined location (like the Java).


I'm not against to use $KARAF_HOME/java folder as JAVA_HOME if it's 
provided, but I don't see a huge value compared to define it in bin/setenv.


Regards
JB

On 10/31/2016 02:02 PM, Sascha Vogt wrote:

@Achim / @JB:

Sorry for the misunderstanding. I didn't mean to ship a binary
distribution with a JVM embedded, I meant to modify the scripts so that
Karaf by default prefers a JVM if (and only if) one is present in a
certain directory within KARAF_HOME.

In case none is there, just follow the same search order like at the
moment (ie. first look for a JAVA_HOME env var and if that is missing
search for a java binary in the path).

That would be enough for users to package a JVM without needing to
modify the setenv scripts...

Greetings
-Sascha-

Am 31.10.2016 um 13:49 schrieb Jean-Baptiste Onofré:

Hi Sascha,

An "embedded" distribution of Karaf with JVM is a good idea. It sounds a
bit like a docker image ;)

However, unfortunately, I'm not sure it would be possible to provide
such distribution directly at Karaf due to legal constraint.

We can provide a script (like a dockerfiles I created) to let users
create their own custom distro.

Regards
JB

On 10/31/2016 01:33 PM, Sascha Vogt wrote:

Hi all,

we're workig on a Karaf based product and have the requirement to use
the JVM we ship with the product. We thought that might also be
interesting to others, so we wanted to share our proposal / current
implementation (and are also willing to provide the required patches).

Main idea is to modify the start scripts (including the service
wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
directory is present it is prefered over a JAVA_HOME env var or whatever
else is in the path.

Reason to also prefer it over JAVA_HOME is because if you run alongside
other Java applications on a server, JAVA_HOME might already be set for
other applications and the admin cannot change it.

At the moment we have implemented the above via custom setenv scripts we
ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
"wrapper:install" is called, this JAVA_HOME is taken to the wrapper
properties.

We spoke with the Instana[1] people as their agent is also Karaf based
and they were interested in it as well, so we know at least one other
Karaf user who would welcome that :)

Anyway, any feeback is welcome. Also of course the name of the
directory(ies) can be discussed.

Greetings
-Sascha-

[1]https://www.instana.com/







--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Sascha Vogt
@Achim / @JB:

Sorry for the misunderstanding. I didn't mean to ship a binary
distribution with a JVM embedded, I meant to modify the scripts so that
Karaf by default prefers a JVM if (and only if) one is present in a
certain directory within KARAF_HOME.

In case none is there, just follow the same search order like at the
moment (ie. first look for a JAVA_HOME env var and if that is missing
search for a java binary in the path).

That would be enough for users to package a JVM without needing to
modify the setenv scripts...

Greetings
-Sascha-

Am 31.10.2016 um 13:49 schrieb Jean-Baptiste Onofré:
> Hi Sascha,
> 
> An "embedded" distribution of Karaf with JVM is a good idea. It sounds a
> bit like a docker image ;)
> 
> However, unfortunately, I'm not sure it would be possible to provide
> such distribution directly at Karaf due to legal constraint.
> 
> We can provide a script (like a dockerfiles I created) to let users
> create their own custom distro.
> 
> Regards
> JB
> 
> On 10/31/2016 01:33 PM, Sascha Vogt wrote:
>> Hi all,
>>
>> we're workig on a Karaf based product and have the requirement to use
>> the JVM we ship with the product. We thought that might also be
>> interesting to others, so we wanted to share our proposal / current
>> implementation (and are also willing to provide the required patches).
>>
>> Main idea is to modify the start scripts (including the service
>> wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
>> runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
>> directory is present it is prefered over a JAVA_HOME env var or whatever
>> else is in the path.
>>
>> Reason to also prefer it over JAVA_HOME is because if you run alongside
>> other Java applications on a server, JAVA_HOME might already be set for
>> other applications and the admin cannot change it.
>>
>> At the moment we have implemented the above via custom setenv scripts we
>> ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
>> "wrapper:install" is called, this JAVA_HOME is taken to the wrapper
>> properties.
>>
>> We spoke with the Instana[1] people as their agent is also Karaf based
>> and they were interested in it as well, so we know at least one other
>> Karaf user who would welcome that :)
>>
>> Anyway, any feeback is welcome. Also of course the name of the
>> directory(ies) can be discussed.
>>
>> Greetings
>> -Sascha-
>>
>> [1]https://www.instana.com/
>>
> 



Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Achim Nierbeck
ah ... ok so I missed that part then ... :)

2016-10-31 13:47 GMT+01:00 Fabian Lange :

> Hi Achim,
> Karaf does not need to ship this and can leave those questions up to the
> distributors using the feature.
>
> Fabian
>
>
> On Mon, Oct 31, 2016 at 1:43 PM, Achim Nierbeck 
> wrote:
>
> > hmm ... even though I like the idea ... what Implications does it have
> for
> >
> > a) is it compliant with the ASF license?
> > b) how about different JVMs and different processors ... don't we need to
> > provide it for intel, arm, ppc?
> >
> > regards, Achim
> >
> >
> > 2016-10-31 13:39 GMT+01:00 Fabian Lange :
> >
> > > Hi Sascha,
> > >
> > > i very much like the idea. It can be a very lightweight enhancement to
> > the
> > > start scripts, because what it basically does is that it defines a
> > "search
> > > list" for "JAVA_HOME". Maybe it is sufficient to add that feature to
> the
> > > scripts and every distributor can customize the directory they prefer.
> > >
> > > Fabian
> > >
> > > --
> > > Fabian Lange | Performance Expert
> > > mobil: +49 (0) 160.3673393
> > >
> > > codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
> > >
> > > Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> > > Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> > > Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen
> > Schütz
> > >
> > > On Mon, Oct 31, 2016 at 1:33 PM, Sascha Vogt 
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > we're workig on a Karaf based product and have the requirement to use
> > > > the JVM we ship with the product. We thought that might also be
> > > > interesting to others, so we wanted to share our proposal / current
> > > > implementation (and are also willing to provide the required
> patches).
> > > >
> > > > Main idea is to modify the start scripts (including the service
> > > > wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
> > > > runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
> > > > directory is present it is prefered over a JAVA_HOME env var or
> > whatever
> > > > else is in the path.
> > > >
> > > > Reason to also prefer it over JAVA_HOME is because if you run
> alongside
> > > > other Java applications on a server, JAVA_HOME might already be set
> for
> > > > other applications and the admin cannot change it.
> > > >
> > > > At the moment we have implemented the above via custom setenv scripts
> > we
> > > > ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
> > > > "wrapper:install" is called, this JAVA_HOME is taken to the wrapper
> > > > properties.
> > > >
> > > > We spoke with the Instana[1] people as their agent is also Karaf
> based
> > > > and they were interested in it as well, so we know at least one other
> > > > Karaf user who would welcome that :)
> > > >
> > > > Anyway, any feeback is welcome. Also of course the name of the
> > > > directory(ies) can be discussed.
> > > >
> > > > Greetings
> > > > -Sascha-
> > > >
> > > > [1]https://www.instana.com/
> > > >
> > >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf  Committer & PMC
> > OPS4J Pax Web  Committer
> &
> > Project Lead
> > blog 
> > Co-Author of Apache Karaf Cookbook 
> >
> > Software Architect / Project Manager / Scrum Master
> >
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


[GitHub] karaf pull request #261: [KARAF-4810] Exit karaf.bat with a proper exit code

2016-10-31 Thread svogt
GitHub user svogt opened a pull request:

https://github.com/apache/karaf/pull/261

[KARAF-4810] Exit karaf.bat with a proper exit code



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svogt/karaf KARAF-4810

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/karaf/pull/261.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #261


commit 33d001fa85ed78bb0eef304348d77e34094bee34
Author: Sascha Vogt 
Date:   2016-10-31T10:59:00Z

[KARAF-4810] Exit karaf.bat with a proper exit code




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Jean-Baptiste Onofré

Hi Sascha,

An "embedded" distribution of Karaf with JVM is a good idea. It sounds a 
bit like a docker image ;)


However, unfortunately, I'm not sure it would be possible to provide 
such distribution directly at Karaf due to legal constraint.


We can provide a script (like a dockerfiles I created) to let users 
create their own custom distro.


Regards
JB

On 10/31/2016 01:33 PM, Sascha Vogt wrote:

Hi all,

we're workig on a Karaf based product and have the requirement to use
the JVM we ship with the product. We thought that might also be
interesting to others, so we wanted to share our proposal / current
implementation (and are also willing to provide the required patches).

Main idea is to modify the start scripts (including the service
wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
directory is present it is prefered over a JAVA_HOME env var or whatever
else is in the path.

Reason to also prefer it over JAVA_HOME is because if you run alongside
other Java applications on a server, JAVA_HOME might already be set for
other applications and the admin cannot change it.

At the moment we have implemented the above via custom setenv scripts we
ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
"wrapper:install" is called, this JAVA_HOME is taken to the wrapper
properties.

We spoke with the Instana[1] people as their agent is also Karaf based
and they were interested in it as well, so we know at least one other
Karaf user who would welcome that :)

Anyway, any feeback is welcome. Also of course the name of the
directory(ies) can be discussed.

Greetings
-Sascha-

[1]https://www.instana.com/



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Fabian Lange
Hi Achim,
Karaf does not need to ship this and can leave those questions up to the
distributors using the feature.

Fabian


On Mon, Oct 31, 2016 at 1:43 PM, Achim Nierbeck 
wrote:

> hmm ... even though I like the idea ... what Implications does it have for
>
> a) is it compliant with the ASF license?
> b) how about different JVMs and different processors ... don't we need to
> provide it for intel, arm, ppc?
>
> regards, Achim
>
>
> 2016-10-31 13:39 GMT+01:00 Fabian Lange :
>
> > Hi Sascha,
> >
> > i very much like the idea. It can be a very lightweight enhancement to
> the
> > start scripts, because what it basically does is that it defines a
> "search
> > list" for "JAVA_HOME". Maybe it is sufficient to add that feature to the
> > scripts and every distributor can customize the directory they prefer.
> >
> > Fabian
> >
> > --
> > Fabian Lange | Performance Expert
> > mobil: +49 (0) 160.3673393
> >
> > codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
> >
> > Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> > Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> > Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen
> Schütz
> >
> > On Mon, Oct 31, 2016 at 1:33 PM, Sascha Vogt 
> > wrote:
> >
> > > Hi all,
> > >
> > > we're workig on a Karaf based product and have the requirement to use
> > > the JVM we ship with the product. We thought that might also be
> > > interesting to others, so we wanted to share our proposal / current
> > > implementation (and are also willing to provide the required patches).
> > >
> > > Main idea is to modify the start scripts (including the service
> > > wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
> > > runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
> > > directory is present it is prefered over a JAVA_HOME env var or
> whatever
> > > else is in the path.
> > >
> > > Reason to also prefer it over JAVA_HOME is because if you run alongside
> > > other Java applications on a server, JAVA_HOME might already be set for
> > > other applications and the admin cannot change it.
> > >
> > > At the moment we have implemented the above via custom setenv scripts
> we
> > > ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
> > > "wrapper:install" is called, this JAVA_HOME is taken to the wrapper
> > > properties.
> > >
> > > We spoke with the Instana[1] people as their agent is also Karaf based
> > > and they were interested in it as well, so we know at least one other
> > > Karaf user who would welcome that :)
> > >
> > > Anyway, any feeback is welcome. Also of course the name of the
> > > directory(ies) can be discussed.
> > >
> > > Greetings
> > > -Sascha-
> > >
> > > [1]https://www.instana.com/
> > >
> >
>
>
>
> --
>
> Apache Member
> Apache Karaf  Committer & PMC
> OPS4J Pax Web  Committer &
> Project Lead
> blog 
> Co-Author of Apache Karaf Cookbook 
>
> Software Architect / Project Manager / Scrum Master
>


Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Achim Nierbeck
hmm ... even though I like the idea ... what Implications does it have for

a) is it compliant with the ASF license?
b) how about different JVMs and different processors ... don't we need to
provide it for intel, arm, ppc?

regards, Achim


2016-10-31 13:39 GMT+01:00 Fabian Lange :

> Hi Sascha,
>
> i very much like the idea. It can be a very lightweight enhancement to the
> start scripts, because what it basically does is that it defines a "search
> list" for "JAVA_HOME". Maybe it is sufficient to add that feature to the
> scripts and every distributor can customize the directory they prefer.
>
> Fabian
>
> --
> Fabian Lange | Performance Expert
> mobil: +49 (0) 160.3673393
>
> codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
>
> Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz
>
> On Mon, Oct 31, 2016 at 1:33 PM, Sascha Vogt 
> wrote:
>
> > Hi all,
> >
> > we're workig on a Karaf based product and have the requirement to use
> > the JVM we ship with the product. We thought that might also be
> > interesting to others, so we wanted to share our proposal / current
> > implementation (and are also willing to provide the required patches).
> >
> > Main idea is to modify the start scripts (including the service
> > wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
> > runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
> > directory is present it is prefered over a JAVA_HOME env var or whatever
> > else is in the path.
> >
> > Reason to also prefer it over JAVA_HOME is because if you run alongside
> > other Java applications on a server, JAVA_HOME might already be set for
> > other applications and the admin cannot change it.
> >
> > At the moment we have implemented the above via custom setenv scripts we
> > ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
> > "wrapper:install" is called, this JAVA_HOME is taken to the wrapper
> > properties.
> >
> > We spoke with the Instana[1] people as their agent is also Karaf based
> > and they were interested in it as well, so we know at least one other
> > Karaf user who would welcome that :)
> >
> > Anyway, any feeback is welcome. Also of course the name of the
> > directory(ies) can be discussed.
> >
> > Greetings
> > -Sascha-
> >
> > [1]https://www.instana.com/
> >
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: [Proposal] Karaf with embedded JVM

2016-10-31 Thread Fabian Lange
Hi Sascha,

i very much like the idea. It can be a very lightweight enhancement to the
start scripts, because what it basically does is that it defines a "search
list" for "JAVA_HOME". Maybe it is sufficient to add that feature to the
scripts and every distributor can customize the directory they prefer.

Fabian

--
Fabian Lange | Performance Expert
mobil: +49 (0) 160.3673393

codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland

Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz

On Mon, Oct 31, 2016 at 1:33 PM, Sascha Vogt  wrote:

> Hi all,
>
> we're workig on a Karaf based product and have the requirement to use
> the JVM we ship with the product. We thought that might also be
> interesting to others, so we wanted to share our proposal / current
> implementation (and are also willing to provide the required patches).
>
> Main idea is to modify the start scripts (including the service
> wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
> runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
> directory is present it is prefered over a JAVA_HOME env var or whatever
> else is in the path.
>
> Reason to also prefer it over JAVA_HOME is because if you run alongside
> other Java applications on a server, JAVA_HOME might already be set for
> other applications and the admin cannot change it.
>
> At the moment we have implemented the above via custom setenv scripts we
> ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
> "wrapper:install" is called, this JAVA_HOME is taken to the wrapper
> properties.
>
> We spoke with the Instana[1] people as their agent is also Karaf based
> and they were interested in it as well, so we know at least one other
> Karaf user who would welcome that :)
>
> Anyway, any feeback is welcome. Also of course the name of the
> directory(ies) can be discussed.
>
> Greetings
> -Sascha-
>
> [1]https://www.instana.com/
>


[Proposal] Karaf with embedded JVM

2016-10-31 Thread Sascha Vogt
Hi all,

we're workig on a Karaf based product and have the requirement to use
the JVM we ship with the product. We thought that might also be
interesting to others, so we wanted to share our proposal / current
implementation (and are also willing to provide the required patches).

Main idea is to modify the start scripts (including the service
wrappers?) to prefer a JVM inside the KARAF_HOME directory (ie.
runtime/jvm64, or just plain jvm in KARAF_HOME). Whenever such a
directory is present it is prefered over a JAVA_HOME env var or whatever
else is in the path.

Reason to also prefer it over JAVA_HOME is because if you run alongside
other Java applications on a server, JAVA_HOME might already be set for
other applications and the admin cannot change it.

At the moment we have implemented the above via custom setenv scripts we
ship which then sets JAVA_HOME to KARAF_HOME/runtime/jvm64. When
"wrapper:install" is called, this JAVA_HOME is taken to the wrapper
properties.

We spoke with the Instana[1] people as their agent is also Karaf based
and they were interested in it as well, so we know at least one other
Karaf user who would welcome that :)

Anyway, any feeback is welcome. Also of course the name of the
directory(ies) can be discussed.

Greetings
-Sascha-

[1]https://www.instana.com/


Re: [HEADS UP] Next releases

2016-10-31 Thread Jean-Baptiste Onofré

Thanks Markus, it will help for sure.

Regards
JB

On 10/31/2016 11:15 AM, Markus Rathgeb wrote:

Hi,


Karaf 4.0.8 is plan for the end of this week and next week. Unfortunately,
it seems that the ARM/Solaris issue with jansi is not fully fixed. I have to
find a way to reproduce and fix it.


when I am on the way, without access to my ARM devices, I am using
qemu to emulate a ARM machine.
I am using this script to setup my qemu Arch Linux ARM VMs:
https://github.com/maggu2810/qemu-utils

Best regards,
Markus



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: [HEADS UP] Next releases

2016-10-31 Thread Markus Rathgeb
Hi,

> Karaf 4.0.8 is plan for the end of this week and next week. Unfortunately,
> it seems that the ARM/Solaris issue with jansi is not fully fixed. I have to
> find a way to reproduce and fix it.

when I am on the way, without access to my ARM devices, I am using
qemu to emulate a ARM machine.
I am using this script to setup my qemu Arch Linux ARM VMs:
https://github.com/maggu2810/qemu-utils

Best regards,
Markus


[GitHub] karaf pull request #259: KARAF-4809, SSH should not listen to all hosts

2016-10-31 Thread lkiesow
Github user lkiesow closed the pull request at:

https://github.com/apache/karaf/pull/259


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] karaf pull request #258: KARAF-4806: specify /bin/bash for scripts with bash...

2016-10-31 Thread skitt
Github user skitt closed the pull request at:

https://github.com/apache/karaf/pull/258


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] karaf pull request #257: KARAF-4806: specify /bin/bash for scripts with bash...

2016-10-31 Thread skitt
Github user skitt closed the pull request at:

https://github.com/apache/karaf/pull/257


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---