To follow up the proposal document I've written a small example to
demonstrate the important changes to the catalogue and to seek feedback
on a smaller part of the work:
<catalog>
<name>OSGi catalogue</name>
<template name="Entity" version="2.3"
type="com.example.entity.EntityInterface">
<description>An entity</description>
<iconUrl>http://...</iconUrl>
<context>
<bundle>
<url>file://path/to/osgi/bundle.jar</url>
</bundle>
</context>
</template>
<template name="Application" version="1.0.1"
type="com.example.blueprints.MyApplication">
<description>An application</description>
<context>
<bundle>
<url>file://path/to/osgi/bundle.jar</url>
</bundle>
<bundle>
<name>com.example.Bundle</name>
<version>4.5</version>
<repositories>
<repository>classpath://...jar</repository>
<repository>http://...jar</repository>
</repositories>
</bundle>
</context>
</template>
</catalog>
Questions:
* Is the current <classpath> element deprecated or just discouraged?
* Can the application refer to the entity directly?
Brooklyn loads this catalogue at start and persists it along with
app+entity+other data.
Later on I want to update the application to a YAML blueprint that
defines version 2.0.0. I POST something like this to the REST API:
<template name="Application" version="2.0.0"
type="http://www.example.com/application.v2.yaml">
<description>An application v2</description>
<context>
<bundle>
<url>file://path/to/osgi/bundle.jar</url>
</bundle>
<bundle>
<url>http://another/osgi/bundle.jar</url>
</bundle>
</context>
</template>
Question: How does the YAML file get to Brooklyn?
Any comments?
Sam
On 17/06/2014 11:18, Sam Corbett wrote:
Hi all,
There have been a number of requests for improvements to Brooklyn's
catalogue. At the moment it is not possible to add entries to the
catalogue, you cannot refer to YAML blueprints and it is overly hard
to manage several versions of an application.
Alex Heneveld (@ahgittin) has put together a proposal for how we can
change this that is visible at:
https://docs.google.com/document/d/1wWySDhfn5LBHfsNfj0cW0e2lSo-6T9_Ox3mHbKX1Hm8
The proposed features are:
1) Register new blueprints to the catalog with code isolation,
including at runtime
2) Allow references to these registered blueprints respecting their
classpaths
3) Allow catalog changes to be persisted and shared among HA servers
4) Support versioning of items in the catalog
5) Allow managing the catalog via the GUI
Brooklyn would use an embedded OSGi container (Apache Felix) as the
foundation of the catalogue.
Comments and feedback would be welcomed.
Sam