You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Tim Moloney <ti...@gmail.com> on 2013/05/23 21:09:44 UTC

Pass desired feature to load to the karaf script

Is it possible to pass the name of a feature to load to the shell script
that starts karaf?
Alternately, is it possible to pass a gogo command to the shell script that
starts karaf?

We have several applications that all use the same underlying dependencies
that are deployed in the ${KARAF_BASE}/system repo.  We'd like to be able
to create bash shell aliases to conveniently start each of the
applications, e.g.,

  alias app1='/path/to/karaf/bin/karaf featuresBoot=app1'
  alias app2='/path/to/karaf/bin/karaf featuresBoot=app2'
  ...

or

  alias app1='/path/to/karaf/bin/karaf gogoCommand=features:install app1'
  alias app2='/path/to/karaf/bin/karaf gogoCommand=features:install app2'
  ...

Thanks,
Tim

Re: Pass desired feature to load to the karaf script

Posted by Tim Moloney <ti...@gmail.com>.
Are you suggesting to have multiple installations of Karaf or to run an
instance command on the gogo command line?

While we could have multiple installations, we are hoping to avoid
duplication since our applications have the same dependencies and can use
the same system repository.

Running an instance command on the gogo command line doesn't really solve
anything since we can already run feature:install command.  We are trying
to avoid typing anything on the gogo command line.

If I've misunderstood your suggestion, could you try explaining it again?

Thanks,
Tim



On Sun, May 26, 2013 at 5:27 PM, Achim Nierbeck <bc...@googlemail.com>wrote:

> You might also try to use instances to have different Karaf versions
> running in parallel.
>
> Regards, Achim
>
>
> 2013/5/23 Tim Moloney <ti...@gmail.com>
>
>> We can only have one application running in each karaf session so we
>> can't add all the applications to org.apache.karaf.features.cfg.
>>
>> We don't want to edit org.apache.karaf.features.cfg before running each
>> application.
>>
>> Tim
>>
>>
>>
>> On Thu, May 23, 2013 at 3:19 PM, Achim Nierbeck <bc...@googlemail.com>wrote:
>>
>>> And why don't you just alter the features config and add your features
>>> to the boot features?
>>> Or did you consider to built a custom distribution on top of Karaf with
>>> those features as boot features?
>>>
>>> regards, Achim
>>>
>>>
>>> 2013/5/23 Tim Moloney <ti...@gmail.com>
>>>
>>>> Is it possible to pass the name of a feature to load to the shell
>>>> script that starts karaf?
>>>> Alternately, is it possible to pass a gogo command to the shell script
>>>> that starts karaf?
>>>>
>>>> We have several applications that all use the same underlying
>>>> dependencies that are deployed in the ${KARAF_BASE}/system repo.  We'd like
>>>> to be able to create bash shell aliases to conveniently start each of the
>>>> applications, e.g.,
>>>>
>>>>   alias app1='/path/to/karaf/bin/karaf featuresBoot=app1'
>>>>   alias app2='/path/to/karaf/bin/karaf featuresBoot=app2'
>>>>   ...
>>>>
>>>> or
>>>>
>>>>   alias app1='/path/to/karaf/bin/karaf gogoCommand=features:install
>>>> app1'
>>>>   alias app2='/path/to/karaf/bin/karaf gogoCommand=features:install
>>>> app2'
>>>>   ...
>>>>
>>>> Thanks,
>>>> Tim
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>>> & Project Lead
>>> OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
>>> Commiter & Project Lead
>>> blog <http://notizblog.nierbeck.de/>
>>>
>>
>>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
> Commiter & Project Lead
> blog <http://notizblog.nierbeck.de/>
>

Re: Pass desired feature to load to the karaf script

Posted by Achim Nierbeck <bc...@googlemail.com>.
You might also try to use instances to have different Karaf versions
running in parallel.

Regards, Achim


2013/5/23 Tim Moloney <ti...@gmail.com>

> We can only have one application running in each karaf session so we can't
> add all the applications to org.apache.karaf.features.cfg.
>
> We don't want to edit org.apache.karaf.features.cfg before running each
> application.
>
> Tim
>
>
>
> On Thu, May 23, 2013 at 3:19 PM, Achim Nierbeck <bc...@googlemail.com>wrote:
>
>> And why don't you just alter the features config and add your features to
>> the boot features?
>> Or did you consider to built a custom distribution on top of Karaf with
>> those features as boot features?
>>
>> regards, Achim
>>
>>
>> 2013/5/23 Tim Moloney <ti...@gmail.com>
>>
>>> Is it possible to pass the name of a feature to load to the shell script
>>> that starts karaf?
>>> Alternately, is it possible to pass a gogo command to the shell script
>>> that starts karaf?
>>>
>>> We have several applications that all use the same underlying
>>> dependencies that are deployed in the ${KARAF_BASE}/system repo.  We'd like
>>> to be able to create bash shell aliases to conveniently start each of the
>>> applications, e.g.,
>>>
>>>   alias app1='/path/to/karaf/bin/karaf featuresBoot=app1'
>>>   alias app2='/path/to/karaf/bin/karaf featuresBoot=app2'
>>>   ...
>>>
>>> or
>>>
>>>   alias app1='/path/to/karaf/bin/karaf gogoCommand=features:install app1'
>>>   alias app2='/path/to/karaf/bin/karaf gogoCommand=features:install app2'
>>>   ...
>>>
>>> Thanks,
>>> Tim
>>>
>>>
>>
>>
>> --
>>
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>> & Project Lead
>> OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
>> Commiter & Project Lead
>> blog <http://notizblog.nierbeck.de/>
>>
>
>


-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>

Re: Pass desired feature to load to the karaf script

Posted by Tim Moloney <ti...@gmail.com>.
We can only have one application running in each karaf session so we can't
add all the applications to org.apache.karaf.features.cfg.

We don't want to edit org.apache.karaf.features.cfg before running each
application.

Tim



On Thu, May 23, 2013 at 3:19 PM, Achim Nierbeck <bc...@googlemail.com>wrote:

> And why don't you just alter the features config and add your features to
> the boot features?
> Or did you consider to built a custom distribution on top of Karaf with
> those features as boot features?
>
> regards, Achim
>
>
> 2013/5/23 Tim Moloney <ti...@gmail.com>
>
>> Is it possible to pass the name of a feature to load to the shell script
>> that starts karaf?
>> Alternately, is it possible to pass a gogo command to the shell script
>> that starts karaf?
>>
>> We have several applications that all use the same underlying
>> dependencies that are deployed in the ${KARAF_BASE}/system repo.  We'd like
>> to be able to create bash shell aliases to conveniently start each of the
>> applications, e.g.,
>>
>>   alias app1='/path/to/karaf/bin/karaf featuresBoot=app1'
>>   alias app2='/path/to/karaf/bin/karaf featuresBoot=app2'
>>   ...
>>
>> or
>>
>>   alias app1='/path/to/karaf/bin/karaf gogoCommand=features:install app1'
>>   alias app2='/path/to/karaf/bin/karaf gogoCommand=features:install app2'
>>   ...
>>
>> Thanks,
>> Tim
>>
>>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
> Commiter & Project Lead
> blog <http://notizblog.nierbeck.de/>
>

Re: Pass desired feature to load to the karaf script

Posted by Achim Nierbeck <bc...@googlemail.com>.
And why don't you just alter the features config and add your features to
the boot features?
Or did you consider to built a custom distribution on top of Karaf with
those features as boot features?

regards, Achim


2013/5/23 Tim Moloney <ti...@gmail.com>

> Is it possible to pass the name of a feature to load to the shell script
> that starts karaf?
> Alternately, is it possible to pass a gogo command to the shell script
> that starts karaf?
>
> We have several applications that all use the same underlying dependencies
> that are deployed in the ${KARAF_BASE}/system repo.  We'd like to be able
> to create bash shell aliases to conveniently start each of the
> applications, e.g.,
>
>   alias app1='/path/to/karaf/bin/karaf featuresBoot=app1'
>   alias app2='/path/to/karaf/bin/karaf featuresBoot=app2'
>   ...
>
> or
>
>   alias app1='/path/to/karaf/bin/karaf gogoCommand=features:install app1'
>   alias app2='/path/to/karaf/bin/karaf gogoCommand=features:install app2'
>   ...
>
> Thanks,
> Tim
>
>


-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>