User Tools

Site Tools


sensorweaver:admin-guide

This is an old revision of the document!


Administrator Guide

This guide shows how to setup an OSGi execution environment with the Middleware platform services.

The guide assume that:

  • You have a java 7 JRE installed on your system
  • Have basic administration knowledge of the Karaf OSGi container

MQTT Broker

The communication platforms relies on MQTT at the lowest communication layer. On linux/windows machines you can easily install the Mosquitto MQTT broker by downloading it on the official website.

Ubuntu repositories alredy host a Mosquitto package, install it using apt with

sudo apt-get install mosquitto

Without any further configuration you should already have an instance of mosquitto running on your machine, with open access on port 1883.

Karaf

We strongly recommend Apache Karaf as the OSGi container of choice. You have two choices:

SensorWeaver Karaf Bundle

The preconfigured SensorWeaver karaf bundle can be downloaded from this link. That is based on Karaf 3.0.2 and already includes a default configuration that will launch the execution environment (Middleware included) with minimal effort required.

You can install your bundles in the container and test it using Karaf debug and logging tools.

SensorWeaver features

Alternatively you can download an Apache Karaf Distribution from the Karaf download page and add the feature file manually.

Please refer to Karaf documentation to setup the feature repository.

Bundles configuration

Middleware needs two components to be configured in order to run:

  • Messaging configuration
  • Middleware configuration

Keep in mind that, since the Middleware components are stateful services, the configuration cannot be updated at runtime without disrupting clients, hence a bundle restart is required each time the configuration is changed. Middleware components will just ignore dynamic changes to their configuration at runtime.

Messaging configuration includes the target MQTT broker and security options.

Default messaging system configuration assumes that you have a MQTT broker listening on localhost on port 1883, without security enabled.

You can modify messaging system configuration by creating a configuration file in the etc folder of Apache Karaf.

Here is the default configuration:

sensorweaver.mqtt.cfg
truststorePassword=
keystorePassword=
truststorePath=
keystorePath=
secure=false
host=localhost
port=1883

Middleware configuration includes scope names assigned to the middleware instance. Scopes identifies areas of visibility of data on the Middleware. There are two scopes to set:

  • Listen scopes: scopes on which the middleware instance can listen for messages
  • Publish scopes: scope on which the middleware instance publish messages on behalf of its clients

Here is the default configuration:

sensorweaver.middleware.cfg
listen_scopes=test
publish_scopes=test
sensorweaver/admin-guide.1419266731.txt.gz · Last modified: 2014-12-22 16:45 by luigi.fortunati

Donate Powered by PHP Valid HTML5 Valid CSS Run on Debian Driven by DokuWiki