OSGi Distribution

Running Apache Brooklyn inside Karaf container

The Apache Brooklyn Karaf based distribution lives in brooklyn-dist/karaf/apache-brooklyn folder. It’s still in a testing stage so some features might not work as expected. Please contact us on the mailing list if you find any problems.

Building

cd brooklyn-dist
mvn clean install
cd karaf/apache-brooklyn/target
tar -zxvf apache-brooklyn-0.10.0.tar.gz
cd apache-brooklyn-0.10.0

Running

Start the instance with a console in the foreground using the following command

bin/karaf

This will launch the Karaf console where you can interact with the running instance. Note that Brooklyn has already started at this point and is reachable at the usual web console url.

To start in debug mode use

bin/karaf debug

and connect to port 5005 using your normal Java debugger.

To pause startup until the debugger is connected you can use

JAVA_DEBUG_OPTS='-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005' bin/karaf debug

Start the instance as a server in the background using the following command

bin/start

The Karaf container will keep state such as installed bundles and configuration between restarts. To reset any changes add clean to the cli arguments.

Configuring

Configuration of Brooklyn when running under Karaf is largely done through standard Karaf mechanisms. See the page on OSGI Configuration for details.