Skip to content
Carsten Stocklöw edited this page Apr 20, 2018 · 13 revisions

Quickstart

  1. Get yourself a universAAL distro.
    1. Download any of the ready built releases and uncompress
    2. You may build from source
  2. Run bin/karaf (use the appropriate script according to your Operative System)
  3. This will start universAAL middleware by default (in versions up to 3.4.0 you'll need to run feature:install uAAL-MW). To add specific components use the command feature:install <name_of_component>, you may find the full list of components by running the command feature:list | grep universAAL (find documentation about each one on their respecive wikis)
    1. Each of these "features" will automatically install its dependencies, i.e. if you choose an ontology feature, it will install all universAAL and all needed ontologies before it.
    2. "uAAL-Basic.Coordinator" feature (feature:install uAAL-Basic.Coordinator) is the recommended core for typical basic runs.
  4. To deploy your own apps there are different methods
    1. You may add your modules (a.k.a. bundles) to the deploy folder. Every jar file placed in this folder is automatically installed, and uninstalled if it is removed. This is only recommended for tests - the start order is not reliable.
    2. Manually install the bundle, using the command install. For bundles compiled with Maven this is like install mvn:groupId/artifactId/version (add wrap: before mvn: if it's a jar library rather than a OSGi bundle).
    3. Create your own karaf features, copy the feature.xml file to deploy folder or configure your Karaf container.
  5. Debugging: the Karaf distro is already set up to be debug-able. To debug from Eclipse, create a new debug configuration from Run > Debug Configurations > Remote Java Application > New. Name the configuration and edit its Connection Properties with host: localhost, and port: 5005. Once the Karaf distro is running, select this debug configuration from Eclipse and click Debug. Any breakpoint you set in your code or in uAAL source code will interrupt like debugging as usual.

Video tutorial

Using Karaf to run universAAL IoT

Quick Notes

To reset the container: delete the data folder; alternativelly add clean to the launching command (which just deletes the data folder automatically)

Karaf can be runned as background service by using the start and stop scripts instead of the karaf script. To access command line to background karaf service launch the client script. To set up karaf as a system daemon, try using the service wrapper feature.

In embedded systems, using the JVM's distribution for ARM architecture (like the Raspberry Pi) for example, the standard karaf script may fail. The server flag is not recognized, the solution is simple: edit bin/karaf and remove the server tag.

Further Details