You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Ivan Navarro <in...@imathresearch.com> on 2014/06/16 10:25:20 UTC

How to update catalogues and add entities onruntime?

 

Hi all, 

I can see Brooklyn's community groups are DEPRECATED (both for user and
developers). I do not know if it is the appropriate way to ask questions
to the community, but I will do anyway ;) 

Questions: 

1) Is it possible to update catalog's content (or maybe change the
pointed catalog.xml file) on runtime? (I mean, in the way you want to
update available applications from the catalog just with a "refresh
button" in the while Brooklyn is already launched). As I can see, the
only way to do it is re-launching Brooklyn but it is not a very pretty
solution if applications are already running and they must to be
restarted... 

2) Is it possible to add new entities by YAML just specifying the
"*.jar" path? I know it is possible to deploy packaged applications
(*.war files) related to an existing entity type, but I do not know how
to launch an entire application. Something like catalog enables, but by
YAML... 

If this is a wrong way to resolve doubts, please let me know how to do
it. And sorry for the inconveniences. 

Best Regards 
-- 

……………………………………………………………………………………………
IVAN NAVARRO
R&D Engineer
……………………………………………………………………………………………
IMATHRESEARCH S.L.
Edifici Eureka, Campus UAB,
08193 Bellaterra (Barcelona) - Spain
TEL: +34 93 586 87 43

http://www.imathresearch.com [1]

……………………………………………………………………………………………

This message together with any attached documents may contain
confidential information.

If you are not the intended recipient of this message, please notify it
to the sender and delete it. 

Links:
------
[1] http://www.imathresearch.com

Re: How to update catalogues and add entities on runtime?

Posted by Aled Sage <al...@cloudsoftcorp.com>.
Hi Ivan,

The Google groops mailing list is deprecated; this apache dev@brooklyn 
mailing list is the right one.

Currently in Brooklyn, it's only possible to update the catalog 
programmatically. Same goes for adding jars to the classpath [1].
Unfortunately, there's not a nice way to drive this from the web-console 
or command line.

Currently, restarting Brooklyn is the "safest" option in such cases - if 
Brooklyn was started with `--persist auto` then the applications' state 
will have been persisted, and it will rebind to the apps (this work is 
ongoing to ensure it works with all the entities out there).

Moving forwards, there is work afoot to use OSGi for these exact 
use-cases. I expect you'll be seeing a lot of traffic on dev@brooklyn on 
this topic soon!
It would be great to get your thoughts on that - either now or when the 
OSGi discussion kicks off properly.
There's a lot of interest in this, so I think it should make it into 
Brooklyn in the near future.

Aled

[1] api/src/main/java/brooklyn/catalog/BrooklynCatalog.java - methods 
like addItem() and addToClasspath()
     However, these are not used much (and are lacking good unit test 
coverage) so treat with caution.


On 16/06/2014 09:25, Ivan Navarro wrote:
>   
>
> Hi all,
>
> I can see Brooklyn's community groups are DEPRECATED (both for user and
> developers). I do not know if it is the appropriate way to ask questions
> to the community, but I will do anyway ;)
>
> Questions:
>
> 1) Is it possible to update catalog's content (or maybe change the
> pointed catalog.xml file) on runtime? (I mean, in the way you want to
> update available applications from the catalog just with a "refresh
> button" in the while Brooklyn is already launched). As I can see, the
> only way to do it is re-launching Brooklyn but it is not a very pretty
> solution if applications are already running and they must to be
> restarted...
>
> 2) Is it possible to add new entities by YAML just specifying the
> "*.jar" path? I know it is possible to deploy packaged applications
> (*.war files) related to an existing entity type, but I do not know how
> to launch an entire application. Something like catalog enables, but by
> YAML...
>
> If this is a wrong way to resolve doubts, please let me know how to do
> it. And sorry for the inconveniences.
>
> Best Regards