You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Sander de Groot <s....@jdi.nl> on 2010/07/22 10:33:14 UTC

Custom resolver

Hi all,

Does anybody know wether it is possible to create a custom resolver?
I'd like to create some kind of auto-install mechanism which downloads 
bundles from a central repository.
I've searched for these kind of things and found OBR(?) but 
unfortunately topics aren't too clear on this subject.

My context is as follows: I've a cluster of servers (OSGi) and I want to 
deploy a new application to each of these servers. These new 
applications however sometimes have dependencies which are not installed 
on the (OSGi) server in question. In these cases I want the server to 
handle the missing dependencies by looking in a central repository. If 
the dependency is found then it should be installed if not: throw the 
unresolved dependencies exception.

Is something like this possible or should I look for alternatives.

Regards,

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Custom resolver

Posted by David Savage <da...@paremus.com>.
On Thu, Jul 22, 2010 at 10:58 AM, Sander de Groot <s....@jdi.nl> wrote:
>
> On 07/22/2010 11:06 AM, Holger Hoffstätte wrote:
>>
>> Sander de Groot wrote:
>>
>>>
>>> Does anybody know wether it is possible to create a custom resolver?
>>>
>>
>> Yes, but hardly advisable unless you have Way Too Much Time™ on your
>> hands.
>>
>
> Yes, I thought so.
>>>
>>> I've searched for these kind of things and found OBR(?) but
>>> unfortunately topics aren't too clear on this subject.
>>>
>>
>> OBR is for now under-specified and only implemented in the most simplistic
>> way. There is active work going on in the OSGi working group to make it
>> more practical.
>>
>>
>>>
>>> My context is as follows: I've a cluster of servers (OSGi) and I want to
>>> deploy a new application to each of these servers. These new
>>> applications however sometimes have dependencies which are not installed
>>> on the (OSGi) server in question. In these cases I want the server to
>>> handle the missing dependencies by looking in a central repository. If
>>> the dependency is found then it should be installed if not: throw the
>>> unresolved dependencies exception.
>>>
>>
>> <shameless commercial plug>
>> http://www.paremus.com/products/products_nimble.html
>>
>> Nimble uses the metadata present in every bundle and resolves
>> dependencies, taking special care of optionality and situations that are
>> impossible to resolve automatically due to any ambiguities.
>>
>
> Thanks for the reference, it sounds very interesting. I'm definitely
> checking the possibility.
>>
>> I use this every day - including hot-updating bundles from my maven repo
>> into a running runtime - and haven't manually installed bundle
>> dependencies in forever. Disclaimer: I work for the company, but not
>> directly on Nimble.
>>
>> If you think you can reinvent this on your own..good luck. :)
>>
>
> I'd rather not but I couldn't find something like Paremus provides.
>
> Another possibility provided by Christopher Brind is Apache Felix Sigil.
>  http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html

Hi Sander,

Ironically we (Paremus) are behind both. Sigil is our contribution to
Apache to help the tooling effort to make OSGi development easier. It
does include a resolver but nothing near as advanced as the
capabilities we've put into Nimble.

To compare and contrast:

* Sigil is targeted at solving build time dependency analysis i.e.
calculating classpath elements based on bundle metadata.

* The Nimble resolver is targeted at runtime dependency analysis where
the problem space get's much more interesting, e.g. support for auto
activation of dependencies, policy to specify fragment attachment
rules, extension rules and version range management.

* Sigil supports OSGi development in headless builds via ant/ivy and
IDE workflows in Eclipse.

* Nimble provides a scriptable shell environment to aid with the
runtime deployment and management of OSGi bundles.

* Both Sigil and Nimble (along side Felix OBR) support external
repositories which can be used to source bundles to satisfy resolution
dependencies.

I have to admit that Sigil has been stalled for a bit due to work
overload regarding company product releases during the day and
finishing off my contributions to the OSGi In Action book in the
evenings - along side parenting for 2 kids (I need a holiday ;) ) That
said I'm back on the case as of this week with Sigil and it is my aim
to push out a 1.0 release in the near future (hopefully a few weeks -
fingers crossed).

Sigil questions I can definitely answer here and if you have any
Nimble questions feel free to post them to me privately...

Anyway company spiel and excuses over with...hope that helps.

Regards,

Dave
>
> But Sigil can't run in Felix, right? It seems its only intended for
> compile-time (Eclipse/Ivy)
>>
>> Holger
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Custom resolver

Posted by Chris Blunck <ch...@thebluncks.com>.
Another possibility would be to deliver OSGi feature files via Puppet to the
deploy directory of your container.  The feature files can reference bundles
stored in a central Maven repository (just an Apache container - a Nexus
isn't necessary) via the mvn protocol (ref:  pax url handlers).

The net result here is that a very small XML file is sent to your servers
and the container then reaches back to a central repository to pull
bytecode.


-c

On Thu, Jul 22, 2010 at 6:01 AM, Christopher Brind <br...@brindy.org.uk>wrote:

> Yes, Sigil is a development/build tool.  The link I sent you was in
> reference to the resolver that Holger mentioned. :)
>
> Cheers,
> Chris
>
>
> On 22 July 2010 10:58, Sander de Groot <s....@jdi.nl> wrote:
>
> >
> > On 07/22/2010 11:06 AM, Holger Hoffstätte wrote:
> >
> >> Sander de Groot wrote:
> >>
> >>
> >>> Does anybody know wether it is possible to create a custom resolver?
> >>>
> >>>
> >> Yes, but hardly advisable unless you have Way Too Much Time™ on your
> >> hands.
> >>
> >>
> > Yes, I thought so.
> >
> >  I've searched for these kind of things and found OBR(?) but
> >>> unfortunately topics aren't too clear on this subject.
> >>>
> >>>
> >> OBR is for now under-specified and only implemented in the most
> simplistic
> >> way. There is active work going on in the OSGi working group to make it
> >> more practical.
> >>
> >>
> >>
> >>> My context is as follows: I've a cluster of servers (OSGi) and I want
> to
> >>> deploy a new application to each of these servers. These new
> >>> applications however sometimes have dependencies which are not
> installed
> >>> on the (OSGi) server in question. In these cases I want the server to
> >>> handle the missing dependencies by looking in a central repository. If
> >>> the dependency is found then it should be installed if not: throw the
> >>> unresolved dependencies exception.
> >>>
> >>>
> >> <shameless commercial plug>
> >> http://www.paremus.com/products/products_nimble.html
> >>
> >> Nimble uses the metadata present in every bundle and resolves
> >> dependencies, taking special care of optionality and situations that are
> >> impossible to resolve automatically due to any ambiguities.
> >>
> >>
> > Thanks for the reference, it sounds very interesting. I'm definitely
> > checking the possibility.
> >
> >  I use this every day - including hot-updating bundles from my maven repo
> >> into a running runtime - and haven't manually installed bundle
> >> dependencies in forever. Disclaimer: I work for the company, but not
> >> directly on Nimble.
> >>
> >> If you think you can reinvent this on your own..good luck. :)
> >>
> >>
> > I'd rather not but I couldn't find something like Paremus provides.
> >
> > Another possibility provided by Christopher Brind is Apache Felix Sigil.
> >  http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html
> >
> > But Sigil can't run in Felix, right? It seems its only intended for
> > compile-time (Eclipse/Ivy)
> >
> >  Holger
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
>

Re: Custom resolver

Posted by Christopher Brind <br...@brindy.org.uk>.
Yes, Sigil is a development/build tool.  The link I sent you was in
reference to the resolver that Holger mentioned. :)

Cheers,
Chris


On 22 July 2010 10:58, Sander de Groot <s....@jdi.nl> wrote:

>
> On 07/22/2010 11:06 AM, Holger Hoffstätte wrote:
>
>> Sander de Groot wrote:
>>
>>
>>> Does anybody know wether it is possible to create a custom resolver?
>>>
>>>
>> Yes, but hardly advisable unless you have Way Too Much Time™ on your
>> hands.
>>
>>
> Yes, I thought so.
>
>  I've searched for these kind of things and found OBR(?) but
>>> unfortunately topics aren't too clear on this subject.
>>>
>>>
>> OBR is for now under-specified and only implemented in the most simplistic
>> way. There is active work going on in the OSGi working group to make it
>> more practical.
>>
>>
>>
>>> My context is as follows: I've a cluster of servers (OSGi) and I want to
>>> deploy a new application to each of these servers. These new
>>> applications however sometimes have dependencies which are not installed
>>> on the (OSGi) server in question. In these cases I want the server to
>>> handle the missing dependencies by looking in a central repository. If
>>> the dependency is found then it should be installed if not: throw the
>>> unresolved dependencies exception.
>>>
>>>
>> <shameless commercial plug>
>> http://www.paremus.com/products/products_nimble.html
>>
>> Nimble uses the metadata present in every bundle and resolves
>> dependencies, taking special care of optionality and situations that are
>> impossible to resolve automatically due to any ambiguities.
>>
>>
> Thanks for the reference, it sounds very interesting. I'm definitely
> checking the possibility.
>
>  I use this every day - including hot-updating bundles from my maven repo
>> into a running runtime - and haven't manually installed bundle
>> dependencies in forever. Disclaimer: I work for the company, but not
>> directly on Nimble.
>>
>> If you think you can reinvent this on your own..good luck. :)
>>
>>
> I'd rather not but I couldn't find something like Paremus provides.
>
> Another possibility provided by Christopher Brind is Apache Felix Sigil.
>  http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html
>
> But Sigil can't run in Felix, right? It seems its only intended for
> compile-time (Eclipse/Ivy)
>
>  Holger
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Custom resolver

Posted by Sander de Groot <s....@jdi.nl>.
On 07/22/2010 11:06 AM, Holger Hoffstätte wrote:
> Sander de Groot wrote:
>    
>> Does anybody know wether it is possible to create a custom resolver?
>>      
> Yes, but hardly advisable unless you have Way Too Much Time™ on your hands.
>    
Yes, I thought so.
>> I've searched for these kind of things and found OBR(?) but
>> unfortunately topics aren't too clear on this subject.
>>      
> OBR is for now under-specified and only implemented in the most simplistic
> way. There is active work going on in the OSGi working group to make it
> more practical.
>
>    
>> My context is as follows: I've a cluster of servers (OSGi) and I want to
>> deploy a new application to each of these servers. These new
>> applications however sometimes have dependencies which are not installed
>> on the (OSGi) server in question. In these cases I want the server to
>> handle the missing dependencies by looking in a central repository. If
>> the dependency is found then it should be installed if not: throw the
>> unresolved dependencies exception.
>>      
> <shameless commercial plug>
> http://www.paremus.com/products/products_nimble.html
>
> Nimble uses the metadata present in every bundle and resolves
> dependencies, taking special care of optionality and situations that are
> impossible to resolve automatically due to any ambiguities.
>    
Thanks for the reference, it sounds very interesting. I'm definitely 
checking the possibility.
> I use this every day - including hot-updating bundles from my maven repo
> into a running runtime - and haven't manually installed bundle
> dependencies in forever. Disclaimer: I work for the company, but not
> directly on Nimble.
>
> If you think you can reinvent this on your own..good luck. :)
>    
I'd rather not but I couldn't find something like Paremus provides.

Another possibility provided by Christopher Brind is Apache Felix Sigil.
   http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html

But Sigil can't run in Felix, right? It seems its only intended for 
compile-time (Eclipse/Ivy)
> Holger
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Custom resolver

Posted by Holger Hoffstätte <ho...@googlemail.com>.
Sander de Groot wrote:
> Does anybody know wether it is possible to create a custom resolver?

Yes, but hardly advisable unless you have Way Too Much Time™ on your hands.

> I've searched for these kind of things and found OBR(?) but 
> unfortunately topics aren't too clear on this subject.

OBR is for now under-specified and only implemented in the most simplistic
way. There is active work going on in the OSGi working group to make it
more practical.

> My context is as follows: I've a cluster of servers (OSGi) and I want to 
> deploy a new application to each of these servers. These new 
> applications however sometimes have dependencies which are not installed 
> on the (OSGi) server in question. In these cases I want the server to 
> handle the missing dependencies by looking in a central repository. If 
> the dependency is found then it should be installed if not: throw the 
> unresolved dependencies exception.

<shameless commercial plug>
http://www.paremus.com/products/products_nimble.html

Nimble uses the metadata present in every bundle and resolves
dependencies, taking special care of optionality and situations that are
impossible to resolve automatically due to any ambiguities.

I use this every day - including hot-updating bundles from my maven repo
into a running runtime - and haven't manually installed bundle
dependencies in forever. Disclaimer: I work for the company, but not
directly on Nimble.

If you think you can reinvent this on your own..good luck. :)

Holger


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Custom resolver

Posted by Marcel Offermans <ma...@luminis.nl>.
On Jul 26, 2010, at 11:09 , Bertrand Delacretaz wrote:

> On Mon, Jul 26, 2010 at 9:28 AM, Sander de Groot <s....@jdi.nl> wrote:
>> ...ACE looks promising, I'm going to take a look.
>> However, whats bothering me is that I didn't found this (these kind of)
>> product while searching on google.
>> It seems to me that I'm searching for the wrong keywords, mm, better
>> rephrase them....
> 
> OSGi's lingo is unusual sometimes, maybe due to its origins in
> embedded systems and (AFAIK) telecoms.
> 
> I don't think I ever heard the word "provisioning" before starting to
> work with OSGi ;-)

Same here. Software distribution system might ring more bells for people.

Anyway, Sander, as you're probably quite close to me (at least in the same, small country), we can always meet up to have a chat in person. I should be able to tell you all about Apache ACE.

Greetings, Marcel


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Custom resolver

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Mon, Jul 26, 2010 at 9:28 AM, Sander de Groot <s....@jdi.nl> wrote:
> ...ACE looks promising, I'm going to take a look.
> However, whats bothering me is that I didn't found this (these kind of)
> product while searching on google.
> It seems to me that I'm searching for the wrong keywords, mm, better
> rephrase them....

OSGi's lingo is unusual sometimes, maybe due to its origins in
embedded systems and (AFAIK) telecoms.

I don't think I ever heard the word "provisioning" before starting to
work with OSGi ;-)

-Bertrand

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Custom resolver

Posted by Sander de Groot <s....@jdi.nl>.
ACE looks promising, I'm going to take a look.
However, whats bothering me is that I didn't found this (these kind of) 
product while searching on google.
It seems to me that I'm searching for the wrong keywords, mm, better 
rephrase them.

Thanks!

On 07/22/2010 11:19 AM, Bertrand Delacretaz wrote:
> Hi,
>
> On Thu, Jul 22, 2010 at 10:33 AM, Sander de Groot<s....@jdi.nl>  wrote:
>    
>> ...My context is as follows: I've a cluster of servers (OSGi) and I want to
>> deploy a new application to each of these servers. These new applications
>> however sometimes have dependencies which are not installed on the (OSGi)
>> server in question. In these cases I want the server to handle the missing
>> dependencies by looking in a central repository. If the dependency is found
>> then it should be installed if not: throw the unresolved dependencies
>> exception....
>>      
> ACE might be helpful for this, http://incubator.apache.org/ace/
>
> -Bertrand
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>    

Re: Custom resolver

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Thu, Jul 22, 2010 at 10:33 AM, Sander de Groot <s....@jdi.nl> wrote:
> ...My context is as follows: I've a cluster of servers (OSGi) and I want to
> deploy a new application to each of these servers. These new applications
> however sometimes have dependencies which are not installed on the (OSGi)
> server in question. In these cases I want the server to handle the missing
> dependencies by looking in a central repository. If the dependency is found
> then it should be installed if not: throw the unresolved dependencies
> exception....

ACE might be helpful for this, http://incubator.apache.org/ace/

-Bertrand

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Custom resolver

Posted by Jean-Philippe Clement <je...@sogeti.com>.

   In Karaf, if you install twice exactly the same bundle, then  
nothing happens (in the console the previous id is displayed). Maybe,  
you should always deploy a bundle with all its dependent bundles, no  
matter if they are already installed or not.

   Take a look to Maven =>  
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html  
=> "deploy" / "deploy-file"

   Quoting Sander de Groot <s....@jdi.nl>:

> Hi all,
>
> Does anybody know wether it is possible to create a custom resolver?
> I'd like to create some kind of auto-install mechanism which downloads
> bundles from a central repository.
> I've searched for these kind of things and found OBR(?) but
> unfortunately topics aren't too clear on this subject.
>
> My context is as follows: I've a cluster of servers (OSGi) and I want
> to deploy a new application to each of these servers. These new
> applications however sometimes have dependencies which are not
> installed on the (OSGi) server in question. In these cases I want the
> server to handle the missing dependencies by looking in a central
> repository. If the dependency is found then it should be installed if
> not: throw the unresolved dependencies exception.
>
> Is something like this possible or should I look for alternatives.
>
> Regards,
>
> Sander
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org