OSGi Distribution

The Apache Brooklyn Karaf based distribution lives in brooklyn-dist/karaf/apache-brooklyn folder. 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.11.0.tar.gz
cd apache-brooklyn-0.11.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.

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.

Debugging

To start in debug mode use

bin/karaf debug

and connect to port 5005 using your normal Java debugger.

If you want to change dt_socket port you can pass JAVA_DEBUG_PORT environment variable

JAVA_DEBUG_PORT=5006 bin/karaf debug

To pause startup until the debugger is connected you can use

JAVA_DEBUG_OPTS='-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005' bin/karaf debug

For other options please check your JVM JPDA documentation. Hotspot JPDA: https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/

Configuring

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