brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Macartney <>
Subject Re: Catalog "bundle"
Date Tue, 14 Mar 2017 10:42:35 GMT
hi Graeme,

it's still possible to put all your catalog files into an OSGI bundle, if
you would prefer to do that. That's basically what the clocker example is
doing that Thomas linked to.

Just add your various boms as resources in the bundle when you build it.
You'll need to add the bundle to Brooklyn of course -  either, for classic
launcher, put it in lib/dropins, or, for Karaf, either use "bundle:install"
from the command line, or add a catalog entry with your bundle as a

For example, I knocked together a test bundle "brooklyn-dist-temp" with
three boms in it.  I can then add the item below to my catalog, (I'm
running in Karaf launcher) and Brooklyn reads the bundle at the given URL
(just a file:// in this case but could be http://), and adds the various
definitions in each of the included boms into my catalog.

    version: "0.11.0-SNAPSHOT"


    - classpath://
    - classpath://
    - classpath://

Is that the sort of thing you mean?  Note that the classpath url format is
"classpath://"  + bundle-symbolic-name + ":" + resource-name.


On Fri, 10 Mar 2017 at 16:41 Graham Ashby <> wrote:

It's interesting that if I wrote this as a series of Java classes, I could
put this in the dropins folder, and load a set of catalog entries in one
I imagine that isn't possible for yaml -- turn them into an OSGi bundle?
I notice also that resources (files, etc) can be specified as on the
classpath.  Any hope that we could do that for catalog items?


From:   Geoff Macartney <>
To:     Brooklyn dev <>
Date:   03/10/2017 11:07 AM
Subject:        Re: Catalog "bundle"

hi Graham

One point worth mentioning in relation to is that it will provide
the ability to upload via the REST API, but there will still be further
work needed to make this easy to use.  I plan to do some changes to the
command line client "br" to allow it to make use of the new API when it
arrives, so that you'll be able to do something like "br upload ..." and
will upload a zip of your project.   I'm not sure that anyone's discussed
adding this to the UI yet but that might be something for the future as


On Fri, 10 Mar 2017 at 14:56 Thomas Bouron

> Hi Graham.
> Uploading a ZIP file to Brooklyn is indeed a good idea. The good news
> there is a PR to support this in `brooklyn-server`[1]. The slightly less
> good news is that it's still in review and therefore not available yet
> the stable version.
> However, there are few of workarounds this.
> You could host your different bom files anywhere you want, then
> those into your main BOM file like so:
> ```
> brooklyn.catalog:
>   id: your-id
>   items:
>   - item: http://.....
>   - item: http://.....
> ```
> Or you could create a JAR with all your resources inside then reference
> this in your main BOM file, similar to what Clocker does[2].
> Finally, you would just distribute your main BOM file to other users.
> [1]
> [2]
> On Fri, 10 Mar 2017 at 14:15 Graham Ashby <>
> > (Not an OSGi bundle...)
> > I've developed a set of YAML catalog entries for defining my
> > Now I want to be able to distribute them so other people can load them
> > into their Brooklyn server.
> > I see that there are ways of defining an initial catalog, but as I see
> it,
> > this is a single file.  In my case, I have a number of separate
> > entries, so I don't want to embed them into a single yaml file.
> Including
> > them doesn't really work either, as then I'd need to know in advance
> > exactly what was in my set.
> > What I'd ideally like is to be able to, say, point the server at a zip
> > file of catalog entries, and have them all loaded.
> > I tried reading through the code, so I have suspicions it could be
> > but I'm not sure how.
> >
> > So, is there a way to do this?  The zip file (or whatever) would
> > be on the local file system.
> >
> > Thanks
> > Graham
> >
> > --
> Thomas Bouron • Software Engineer @ Cloudsoft Corporation •
> Github:
> Twitter:

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