You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Gert Vanthienen <ge...@gmail.com> on 2010/12/06 14:59:54 UTC

Ability to watch a bundle location

L.S.,

Last week, I was having a chat with some local Karaf/Camel/ServiceMix
users.  During the conversation, they came up with a few fair requests
for new features to be added to Karaf:
- a head and tail utility for limiting output on some commands
- a way to watch a bundle location for changes after installation -
e.g. when doing development, a way to trigger file-install to monitor
a mvn: url for changes to automatically update a bundle as soon as a
new snapshot has been built  (something like a osgi:install -s
watch:<original uri> perhaps)?

Wdyt?  I'll gladly raise the JIRA issues afterwards, but I wanted to
get some feedback first.

Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/

Re: Ability to watch a bundle location

Posted by Andreas Pieber <an...@gmail.com>.
Hey Gert,

IMHO you can go ahead and raise the jira issues.

kind regards,
andreas

On Mon, Dec 06, 2010 at 02:59:54PM +0100, Gert Vanthienen wrote:
> L.S.,
> 
> Last week, I was having a chat with some local Karaf/Camel/ServiceMix
> users.  During the conversation, they came up with a few fair requests
> for new features to be added to Karaf:
> - a head and tail utility for limiting output on some commands
> - a way to watch a bundle location for changes after installation -
> e.g. when doing development, a way to trigger file-install to monitor
> a mvn: url for changes to automatically update a bundle as soon as a
> new snapshot has been built  (something like a osgi:install -s
> watch:<original uri> perhaps)?
> 
> Wdyt?  I'll gladly raise the JIRA issues afterwards, but I wanted to
> get some feedback first.
> 
> Gert Vanthienen
> ------------------------
> FuseSource
> Web: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/

Re: Ability to watch a bundle location

Posted by Guillaume Nodet <gn...@gmail.com>.
Mhh, i misunderstood the fact you wanted to look all bundles using that groupId.
But it should be possible anyway and be really nice.
Actually, we may want to support "dev:watch *" too ...

On Mon, Dec 6, 2010 at 17:02, Guillaume Nodet <gn...@gmail.com> wrote:
> We should be able to do both I think, as in my mind, the bundle id
> would just be used to actually retrieve the mvn url location ;-)
>
> On Mon, Dec 6, 2010 at 16:55, Andreas Pieber <an...@gmail.com> wrote:
>> I'm not sure if this is possible, but a dev:watch mvn:groupId would be even more
>> helpful. I start karaf and build/change/update the bundles of a project
>> (typically within a specific mvn groupId) (the project has about 200 bundles
>> which makes it quite hard to enter dev:watch 1,2,3...,199,200). But dev:watch [BUNDLE_ID] will also
>> help a lot for the moment :)
>>
>> kind regards,
>> andreas
>>
>> On Mon, Dec 06, 2010 at 03:31:02PM +0100, Gert Vanthienen wrote:
>>> L.S.,
>>>
>>> dev:watch sounds like a good solution - their remark came from the
>>> fact that they had to update the code, run a build and then switch to
>>> the karaf console to update the bundle on every iteration, so yeah, I
>>> agree it would be a big help at development time.
>>>
>>> Regards,
>>>
>>> Gert Vanthienen
>>> ------------------------
>>> FuseSource
>>> Web: http://fusesource.com
>>> Blog: http://gertvanthienen.blogspot.com/
>>>
>>>
>>>
>>> On Mon, Dec 6, 2010 at 3:21 PM, Guillaume Nodet <gn...@gmail.com> wrote:
>>> > On Mon, Dec 6, 2010 at 15:13, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>> >> Hi Gert,
>>> >>
>>> >> For the head/tail command, for sure, it can be helpful. I added log:clear to
>>> >> avoid to get too larger log displayed.
>>> >> OK to raise a Jira to add head/tail "util" commands in addition of the grep
>>> >> one.
>>> >
>>> > Yeah, head/tail sounds good.
>>> > Note that we have a more command too.
>>> >
>>> >>
>>> >> For the second point, maybe we can set a kind of development mode to
>>> >> periodically watch no updated bundle. I don't think that putting this
>>> >> behavior in the bundle URL is interesting because most of the time, users
>>> >> will forget to set it.
>>> >> I'm more for a kind of etc/org.apache.karaf.deployer.cfg switching
>>> >> development mode. The configuration file could contain the watching
>>> >> interval, a watching filter (to exclude some bundle), etc.
>>> >> Like this, a production karaf instance will disable it and it's easy to
>>> >> switch on using just this configuration file. The feature descriptor and
>>> >> bundles URI are not changed.
>>> >
>>> > I suppose the update behavior is really only needed when using maven
>>> > snapshots, right ?
>>> > In that case, I don't think the deployer is involved at all if you
>>> > deploy using the mvn url handler.
>>> > I wonder if a simple command could be added to turn on watching
>>> > bundles, this would enable not changing the real urls.
>>> > For example:
>>> >     dev:watch [bundle-id,...]
>>> > It would only work for mvn urls, but if the bundles have been deployed
>>> > using that, it would resolve the url on the local repository and check
>>> > for changes, then update the bundles.
>>> > The bundle can even be made smart enough to work around the system
>>> > folder by passing the input stream directly, so that even snapshots in
>>> > that folder can be watched.
>>> > I do think that would be an awesome help at development time.
>>> >
>>> >
>>> >>
>>> >> Regards
>>> >> JB
>>> >>
>>> >> On 12/06/2010 02:59 PM, Gert Vanthienen wrote:
>>> >>>
>>> >>> L.S.,
>>> >>>
>>> >>> Last week, I was having a chat with some local Karaf/Camel/ServiceMix
>>> >>> users.  During the conversation, they came up with a few fair requests
>>> >>> for new features to be added to Karaf:
>>> >>> - a head and tail utility for limiting output on some commands
>>> >>> - a way to watch a bundle location for changes after installation -
>>> >>> e.g. when doing development, a way to trigger file-install to monitor
>>> >>> a mvn: url for changes to automatically update a bundle as soon as a
>>> >>> new snapshot has been built  (something like a osgi:install -s
>>> >>> watch:<original uri>  perhaps)?
>>> >>>
>>> >>> Wdyt?  I'll gladly raise the JIRA issues afterwards, but I wanted to
>>> >>> get some feedback first.
>>> >>>
>>> >>> Gert Vanthienen
>>> >>> ------------------------
>>> >>> FuseSource
>>> >>> Web: http://fusesource.com
>>> >>> Blog: http://gertvanthienen.blogspot.com/
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Cheers,
>>> > Guillaume Nodet
>>> > ------------------------
>>> > Blog: http://gnodet.blogspot.com/
>>> > ------------------------
>>> > Open Source SOA
>>> > http://fusesource.com
>>> >
>>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Ability to watch a bundle location

Posted by Guillaume Nodet <gn...@gmail.com>.
We should be able to do both I think, as in my mind, the bundle id
would just be used to actually retrieve the mvn url location ;-)

On Mon, Dec 6, 2010 at 16:55, Andreas Pieber <an...@gmail.com> wrote:
> I'm not sure if this is possible, but a dev:watch mvn:groupId would be even more
> helpful. I start karaf and build/change/update the bundles of a project
> (typically within a specific mvn groupId) (the project has about 200 bundles
> which makes it quite hard to enter dev:watch 1,2,3...,199,200). But dev:watch [BUNDLE_ID] will also
> help a lot for the moment :)
>
> kind regards,
> andreas
>
> On Mon, Dec 06, 2010 at 03:31:02PM +0100, Gert Vanthienen wrote:
>> L.S.,
>>
>> dev:watch sounds like a good solution - their remark came from the
>> fact that they had to update the code, run a build and then switch to
>> the karaf console to update the bundle on every iteration, so yeah, I
>> agree it would be a big help at development time.
>>
>> Regards,
>>
>> Gert Vanthienen
>> ------------------------
>> FuseSource
>> Web: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>>
>>
>>
>> On Mon, Dec 6, 2010 at 3:21 PM, Guillaume Nodet <gn...@gmail.com> wrote:
>> > On Mon, Dec 6, 2010 at 15:13, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>> >> Hi Gert,
>> >>
>> >> For the head/tail command, for sure, it can be helpful. I added log:clear to
>> >> avoid to get too larger log displayed.
>> >> OK to raise a Jira to add head/tail "util" commands in addition of the grep
>> >> one.
>> >
>> > Yeah, head/tail sounds good.
>> > Note that we have a more command too.
>> >
>> >>
>> >> For the second point, maybe we can set a kind of development mode to
>> >> periodically watch no updated bundle. I don't think that putting this
>> >> behavior in the bundle URL is interesting because most of the time, users
>> >> will forget to set it.
>> >> I'm more for a kind of etc/org.apache.karaf.deployer.cfg switching
>> >> development mode. The configuration file could contain the watching
>> >> interval, a watching filter (to exclude some bundle), etc.
>> >> Like this, a production karaf instance will disable it and it's easy to
>> >> switch on using just this configuration file. The feature descriptor and
>> >> bundles URI are not changed.
>> >
>> > I suppose the update behavior is really only needed when using maven
>> > snapshots, right ?
>> > In that case, I don't think the deployer is involved at all if you
>> > deploy using the mvn url handler.
>> > I wonder if a simple command could be added to turn on watching
>> > bundles, this would enable not changing the real urls.
>> > For example:
>> >     dev:watch [bundle-id,...]
>> > It would only work for mvn urls, but if the bundles have been deployed
>> > using that, it would resolve the url on the local repository and check
>> > for changes, then update the bundles.
>> > The bundle can even be made smart enough to work around the system
>> > folder by passing the input stream directly, so that even snapshots in
>> > that folder can be watched.
>> > I do think that would be an awesome help at development time.
>> >
>> >
>> >>
>> >> Regards
>> >> JB
>> >>
>> >> On 12/06/2010 02:59 PM, Gert Vanthienen wrote:
>> >>>
>> >>> L.S.,
>> >>>
>> >>> Last week, I was having a chat with some local Karaf/Camel/ServiceMix
>> >>> users.  During the conversation, they came up with a few fair requests
>> >>> for new features to be added to Karaf:
>> >>> - a head and tail utility for limiting output on some commands
>> >>> - a way to watch a bundle location for changes after installation -
>> >>> e.g. when doing development, a way to trigger file-install to monitor
>> >>> a mvn: url for changes to automatically update a bundle as soon as a
>> >>> new snapshot has been built  (something like a osgi:install -s
>> >>> watch:<original uri>  perhaps)?
>> >>>
>> >>> Wdyt?  I'll gladly raise the JIRA issues afterwards, but I wanted to
>> >>> get some feedback first.
>> >>>
>> >>> Gert Vanthienen
>> >>> ------------------------
>> >>> FuseSource
>> >>> Web: http://fusesource.com
>> >>> Blog: http://gertvanthienen.blogspot.com/
>> >>
>> >
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> > ------------------------
>> > Blog: http://gnodet.blogspot.com/
>> > ------------------------
>> > Open Source SOA
>> > http://fusesource.com
>> >
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Ability to watch a bundle location

Posted by Andreas Pieber <an...@gmail.com>.
I'm not sure if this is possible, but a dev:watch mvn:groupId would be even more
helpful. I start karaf and build/change/update the bundles of a project
(typically within a specific mvn groupId) (the project has about 200 bundles
which makes it quite hard to enter dev:watch 1,2,3...,199,200). But dev:watch [BUNDLE_ID] will also
help a lot for the moment :)

kind regards,
andreas

On Mon, Dec 06, 2010 at 03:31:02PM +0100, Gert Vanthienen wrote:
> L.S.,
> 
> dev:watch sounds like a good solution - their remark came from the
> fact that they had to update the code, run a build and then switch to
> the karaf console to update the bundle on every iteration, so yeah, I
> agree it would be a big help at development time.
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> FuseSource
> Web: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 
> 
> 
> On Mon, Dec 6, 2010 at 3:21 PM, Guillaume Nodet <gn...@gmail.com> wrote:
> > On Mon, Dec 6, 2010 at 15:13, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> >> Hi Gert,
> >>
> >> For the head/tail command, for sure, it can be helpful. I added log:clear to
> >> avoid to get too larger log displayed.
> >> OK to raise a Jira to add head/tail "util" commands in addition of the grep
> >> one.
> >
> > Yeah, head/tail sounds good.
> > Note that we have a more command too.
> >
> >>
> >> For the second point, maybe we can set a kind of development mode to
> >> periodically watch no updated bundle. I don't think that putting this
> >> behavior in the bundle URL is interesting because most of the time, users
> >> will forget to set it.
> >> I'm more for a kind of etc/org.apache.karaf.deployer.cfg switching
> >> development mode. The configuration file could contain the watching
> >> interval, a watching filter (to exclude some bundle), etc.
> >> Like this, a production karaf instance will disable it and it's easy to
> >> switch on using just this configuration file. The feature descriptor and
> >> bundles URI are not changed.
> >
> > I suppose the update behavior is really only needed when using maven
> > snapshots, right ?
> > In that case, I don't think the deployer is involved at all if you
> > deploy using the mvn url handler.
> > I wonder if a simple command could be added to turn on watching
> > bundles, this would enable not changing the real urls.
> > For example:
> >     dev:watch [bundle-id,...]
> > It would only work for mvn urls, but if the bundles have been deployed
> > using that, it would resolve the url on the local repository and check
> > for changes, then update the bundles.
> > The bundle can even be made smart enough to work around the system
> > folder by passing the input stream directly, so that even snapshots in
> > that folder can be watched.
> > I do think that would be an awesome help at development time.
> >
> >
> >>
> >> Regards
> >> JB
> >>
> >> On 12/06/2010 02:59 PM, Gert Vanthienen wrote:
> >>>
> >>> L.S.,
> >>>
> >>> Last week, I was having a chat with some local Karaf/Camel/ServiceMix
> >>> users.  During the conversation, they came up with a few fair requests
> >>> for new features to be added to Karaf:
> >>> - a head and tail utility for limiting output on some commands
> >>> - a way to watch a bundle location for changes after installation -
> >>> e.g. when doing development, a way to trigger file-install to monitor
> >>> a mvn: url for changes to automatically update a bundle as soon as a
> >>> new snapshot has been built  (something like a osgi:install -s
> >>> watch:<original uri>  perhaps)?
> >>>
> >>> Wdyt?  I'll gladly raise the JIRA issues afterwards, but I wanted to
> >>> get some feedback first.
> >>>
> >>> Gert Vanthienen
> >>> ------------------------
> >>> FuseSource
> >>> Web: http://fusesource.com
> >>> Blog: http://gertvanthienen.blogspot.com/
> >>
> >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> > ------------------------
> > Open Source SOA
> > http://fusesource.com
> >

Re: Ability to watch a bundle location

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

dev:watch sounds like a good solution - their remark came from the
fact that they had to update the code, run a build and then switch to
the karaf console to update the bundle on every iteration, so yeah, I
agree it would be a big help at development time.

Regards,

Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



On Mon, Dec 6, 2010 at 3:21 PM, Guillaume Nodet <gn...@gmail.com> wrote:
> On Mon, Dec 6, 2010 at 15:13, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>> Hi Gert,
>>
>> For the head/tail command, for sure, it can be helpful. I added log:clear to
>> avoid to get too larger log displayed.
>> OK to raise a Jira to add head/tail "util" commands in addition of the grep
>> one.
>
> Yeah, head/tail sounds good.
> Note that we have a more command too.
>
>>
>> For the second point, maybe we can set a kind of development mode to
>> periodically watch no updated bundle. I don't think that putting this
>> behavior in the bundle URL is interesting because most of the time, users
>> will forget to set it.
>> I'm more for a kind of etc/org.apache.karaf.deployer.cfg switching
>> development mode. The configuration file could contain the watching
>> interval, a watching filter (to exclude some bundle), etc.
>> Like this, a production karaf instance will disable it and it's easy to
>> switch on using just this configuration file. The feature descriptor and
>> bundles URI are not changed.
>
> I suppose the update behavior is really only needed when using maven
> snapshots, right ?
> In that case, I don't think the deployer is involved at all if you
> deploy using the mvn url handler.
> I wonder if a simple command could be added to turn on watching
> bundles, this would enable not changing the real urls.
> For example:
>     dev:watch [bundle-id,...]
> It would only work for mvn urls, but if the bundles have been deployed
> using that, it would resolve the url on the local repository and check
> for changes, then update the bundles.
> The bundle can even be made smart enough to work around the system
> folder by passing the input stream directly, so that even snapshots in
> that folder can be watched.
> I do think that would be an awesome help at development time.
>
>
>>
>> Regards
>> JB
>>
>> On 12/06/2010 02:59 PM, Gert Vanthienen wrote:
>>>
>>> L.S.,
>>>
>>> Last week, I was having a chat with some local Karaf/Camel/ServiceMix
>>> users.  During the conversation, they came up with a few fair requests
>>> for new features to be added to Karaf:
>>> - a head and tail utility for limiting output on some commands
>>> - a way to watch a bundle location for changes after installation -
>>> e.g. when doing development, a way to trigger file-install to monitor
>>> a mvn: url for changes to automatically update a bundle as soon as a
>>> new snapshot has been built  (something like a osgi:install -s
>>> watch:<original uri>  perhaps)?
>>>
>>> Wdyt?  I'll gladly raise the JIRA issues afterwards, but I wanted to
>>> get some feedback first.
>>>
>>> Gert Vanthienen
>>> ------------------------
>>> FuseSource
>>> Web: http://fusesource.com
>>> Blog: http://gertvanthienen.blogspot.com/
>>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>

Re: Ability to watch a bundle location

Posted by Guillaume Nodet <gn...@gmail.com>.
On Mon, Dec 6, 2010 at 15:13, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> Hi Gert,
>
> For the head/tail command, for sure, it can be helpful. I added log:clear to
> avoid to get too larger log displayed.
> OK to raise a Jira to add head/tail "util" commands in addition of the grep
> one.

Yeah, head/tail sounds good.
Note that we have a more command too.

>
> For the second point, maybe we can set a kind of development mode to
> periodically watch no updated bundle. I don't think that putting this
> behavior in the bundle URL is interesting because most of the time, users
> will forget to set it.
> I'm more for a kind of etc/org.apache.karaf.deployer.cfg switching
> development mode. The configuration file could contain the watching
> interval, a watching filter (to exclude some bundle), etc.
> Like this, a production karaf instance will disable it and it's easy to
> switch on using just this configuration file. The feature descriptor and
> bundles URI are not changed.

I suppose the update behavior is really only needed when using maven
snapshots, right ?
In that case, I don't think the deployer is involved at all if you
deploy using the mvn url handler.
I wonder if a simple command could be added to turn on watching
bundles, this would enable not changing the real urls.
For example:
     dev:watch [bundle-id,...]
It would only work for mvn urls, but if the bundles have been deployed
using that, it would resolve the url on the local repository and check
for changes, then update the bundles.
The bundle can even be made smart enough to work around the system
folder by passing the input stream directly, so that even snapshots in
that folder can be watched.
I do think that would be an awesome help at development time.


>
> Regards
> JB
>
> On 12/06/2010 02:59 PM, Gert Vanthienen wrote:
>>
>> L.S.,
>>
>> Last week, I was having a chat with some local Karaf/Camel/ServiceMix
>> users.  During the conversation, they came up with a few fair requests
>> for new features to be added to Karaf:
>> - a head and tail utility for limiting output on some commands
>> - a way to watch a bundle location for changes after installation -
>> e.g. when doing development, a way to trigger file-install to monitor
>> a mvn: url for changes to automatically update a bundle as soon as a
>> new snapshot has been built  (something like a osgi:install -s
>> watch:<original uri>  perhaps)?
>>
>> Wdyt?  I'll gladly raise the JIRA issues afterwards, but I wanted to
>> get some feedback first.
>>
>> Gert Vanthienen
>> ------------------------
>> FuseSource
>> Web: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Ability to watch a bundle location

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Gert,

For the head/tail command, for sure, it can be helpful. I added 
log:clear to avoid to get too larger log displayed.
OK to raise a Jira to add head/tail "util" commands in addition of the 
grep one.

For the second point, maybe we can set a kind of development mode to 
periodically watch no updated bundle. I don't think that putting this 
behavior in the bundle URL is interesting because most of the time, 
users will forget to set it.
I'm more for a kind of etc/org.apache.karaf.deployer.cfg switching 
development mode. The configuration file could contain the watching 
interval, a watching filter (to exclude some bundle), etc.
Like this, a production karaf instance will disable it and it's easy to 
switch on using just this configuration file. The feature descriptor and 
bundles URI are not changed.

Regards
JB

On 12/06/2010 02:59 PM, Gert Vanthienen wrote:
> L.S.,
>
> Last week, I was having a chat with some local Karaf/Camel/ServiceMix
> users.  During the conversation, they came up with a few fair requests
> for new features to be added to Karaf:
> - a head and tail utility for limiting output on some commands
> - a way to watch a bundle location for changes after installation -
> e.g. when doing development, a way to trigger file-install to monitor
> a mvn: url for changes to automatically update a bundle as soon as a
> new snapshot has been built  (something like a osgi:install -s
> watch:<original uri>  perhaps)?
>
> Wdyt?  I'll gladly raise the JIRA issues afterwards, but I wanted to
> get some feedback first.
>
> Gert Vanthienen
> ------------------------
> FuseSource
> Web: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/