sensorweaver:admin-guide
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sensorweaver:admin-guide [2014-12-22 16:32] – [Karaf] luigi.fortunati | sensorweaver:admin-guide [2017-12-04 14:40] (current) – davide | ||
---|---|---|---|
Line 4: | Line 4: | ||
The guide assume that: | The guide assume that: | ||
- | * You have a java 7 JRE installed on your system | + | * You have a java 8 JRE installed on your system |
- | * Have basic administration | + | * You have basic knowledge |
==== MQTT Broker ==== | ==== MQTT Broker ==== | ||
Line 20: | Line 20: | ||
We strongly recommend Apache Karaf as the OSGi container of choice. You have two choices: | We strongly recommend Apache Karaf as the OSGi container of choice. You have two choices: | ||
- | * Download a preconfigure Apache Karaf bundle | + | * <del>Download a preconfigure Apache Karaf bundle</ |
* Download Apache Karaf and use [[http:// | * Download Apache Karaf and use [[http:// | ||
- | === Use the Karaf Bundle === | + | === SensorWeaver |
- | The preconfigured SensorWeaver karaf bundle can be downloaded from this {{: | + | <del>The preconfigured SensorWeaver karaf bundle can be downloaded from this {{: |
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. | 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 [[http:// | + | You can install your bundles in the container and test it using Karaf [[http:// |
+ | |||
+ | === SensorWeaver features === | ||
+ | |||
+ | Alternatively you can download an Apache Karaf Distribution from the [[http:// | ||
+ | |||
+ | Please refer to Karaf [[http:// | ||
+ | |||
+ | To use sensorweaver features you first have to setup the maven repo in file ' | ||
+ | |||
+ | The last lines of the file should look like this: | ||
+ | <file properties org.ops4j.pax.url.mvn.cfg> | ||
+ | .... | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | </ | ||
+ | |||
+ | Including the snapshot repository is not mandatory. | ||
+ | |||
+ | To install the whole set of middleware bundles, start karaf and execute the following karaf console commands: | ||
+ | |||
+ | <code console> | ||
+ | karaf@root()> | ||
+ | Adding feature url mvn: | ||
+ | karaf@root()> | ||
+ | karaf@root()> | ||
+ | START LEVEL 100 , List Threshold: 50 | ||
+ | ID | State | Lvl | Version | Name | ||
+ | ------------------------------------------------------------------- | ||
+ | 52 | Active | 80 | 2.3.1 | Gson | ||
+ | 53 | Active | 80 | 18.0.0 | ||
+ | 54 | Active | 80 | 2.0.6 | Messaging Service API | ||
+ | 55 | Active | 90 | 2.0.7 | MQTT Messaging Service | ||
+ | 56 | Active | 80 | 2.1.2 | Middleware API | ||
+ | 57 | Active | 90 | 2.1.2 | Middleware Service implementation | ||
+ | 58 | Active | 80 | 2.5 | Commons Lang | ||
+ | 69 | Active | 80 | 1.0.2 | Paho MQTT Client | ||
+ | </ | ||
+ | |||
+ | The feature will install with default bundle configuration. At this point you can stop karaf and manually configure the bundles by modifying property files under the karaf ' | ||
==== Bundles configuration ==== | ==== Bundles configuration ==== | ||
Line 42: | Line 82: | ||
Default messaging system configuration assumes that you have a MQTT broker listening on localhost on port 1883, without security enabled. | 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 '' | + | You can modify messaging system configuration by creating a configuration file in the '' |
- | <file properties sensorweaver.mqtt.cfg> | + | |
+ | Here is the default configuration: | ||
+ | <file properties | ||
+ | host=localhost | ||
+ | port=1883 | ||
truststorePassword= | truststorePassword= | ||
keystorePassword= | keystorePassword= | ||
truststorePath= | truststorePath= | ||
keystorePath= | keystorePath= | ||
- | secure=false | + | username= |
- | host=localhost | + | password= |
- | port=1883 | + | mode=anonymous |
</ | </ | ||
- | Middleware configuration includes scope names assigned to the middleware instance. Scopes identifies areas of visibility of data on the Middleware. | + | Messaging layer can follow one of these broker authentication mechanisms (mode field): |
- | 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 | + | * // |
- | Middleware instances can exchange messages only when configured for listening on | + | |
+ | Middleware configuration includes a scope name assigned to the middleware instance. A scope identify an area of visibility of data on the Middleware. | ||
+ | Each middleware instance is assigned a nodeId at startup. The nodeId can be set via configuration. If an ID is not provided, the hostname is used. | ||
+ | |||
+ | Here is the default configuration: | ||
+ | <file properties it.cnr.isti.sensorweaver.middleware.cfg> | ||
+ | scope=default | ||
+ | nodeId= | ||
+ | </ | ||
+ | The scope defines a domain under which messages are published on the broker and is the first level of each topic used for message publication. | ||
+ | The nodeId, if not provided, defaults to the client hostname. It can be set manually by configuration. | ||
sensorweaver/admin-guide.1419265968.txt.gz · Last modified: 2014-12-22 16:32 by luigi.fortunati