Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

SensiNact/gateway-remote

Description

Sensinact Remote allow two different instances of sensiNact to become visible to each other by using a distribution mechanism. This mechanism is based on the Remote Service Admin, which is an OSGi Compendium standard. The specification is detailed on Section 122 in the version 6.0.0 of the OSGi Compendium specification[0].

Installing SensiNact

Linux installer

In order to install sensiNact on your system, you will need to have APT (Advanced Package Tool) available on it. It will be in charge of downloading the software solving and installing the required dependencies for running sensiNact. The instruction presented in this wiki were tested under Ubuntu 14.04 and 18.04, in any other distribution the steps below may be slightely different.

For the first time installation you will need to add the APT repository into your system, include the server public cryptographic key of the SensiNact APT repository.

If the APT repository was already configured previously, you dont need to do it again, just update your local catalog and install the sensiNact, as explained below.

APT Repository inclusion

Include the APT repository http://sensinact-cea.ddns.net into your linuxbox.

SensiNact APT Repository key authorization

To guarantee that the software is coming from our official server, you have the add our public key into your local keystore. This procedure can be done using apt-key application with the follow instruction:

wget -O- http://sensinact-cea.ddns.net/sensinact.key | apt-get add -

Update the APT catalog

Once the previous steps are executed you should be allowed to download the catalog of applications available in the sensiNact server, this can be done by executing the command apt-get update

Install sensiNact

Installing sensiNact is simple as snapping your fingers, just execute the command bellow and sensinact will be installed.

apt-get install sensinact=20190507.0

If you already have a sensiNact installed using APT, the newest version will be installed, all the profiles activated on the previous installation will be kept, the profiles (folders into $SENSINACT/load/) postfixed with '-project' will be kept as well, all others will be removed and the latest set of profiles will installed.

If you felix configuration $SENSINACT/conf/config.properties file was changed and the pristine version of this very same file was modified as well this two modifications will be merged, in case of conflict you will have to chose among the options of keeping your version, using the maintainer version (the one present in the installer) or merge the files manually, those options will be presented to you via APT; just follow the instructions.

From the source

Download the code source from eclipse repository. In order to compile the codesource you are going to need:

  • Maven (minimum version 3.5.2)
  • Java (minimum version 1.8)

Go to the root of the sourcecode downloaded and execute mvn clean install -DskipTests, the integration tests are going through an update thus they are not passing, for that reason the tests are skip.

Using distributed version

Softwares required for testing the sensinact distributed are:

  • SensiNact installed (at least version 20190507.0)
  • Zookeeper server instance
  • MQTT broker instance
  • 2 x Computers in the same network

The distributed sensinact version requires a MQTT Broker and a Zookeeper server available for the sensiNact instances; If your objective is to test the distribution that is not a problem, we have an instance of both systems running and publicly available for testing, the installer is already pre-configured to use those instances. Although, if you are considering in putting the distribution in production you MUST create exclusive instances of Zookeeper and MQTT for your deployment.

SensiNact profiles that must be enable in order to test the distributed version are:

  • rest
  • sensinact-remote
  • android-imu (optional)
  • application (optional)
  • simulation (optional)

In order to enable those profiles use the command sensinact -c script.

Instance Configuration

There are 3 main configuration files that are used directly or indirectly by the remote access:

  • $SENSINACT/cfgs/sensinact.config
  • $SENSINACT/cfgs/org.apache.aries.rsa.discovery.zookeeper.config
  • $SENSINACT/cfgs/org.apache.aries.rsa.provider.fastbin.config

The fundamental information to update is the field namespace in the file sensinact.config, there cannot exist two instances with the same namespace into the network, the policy followed is first come first served, meaning that the first instance to acquire the name and enter into the network will keep the name, if a second instance tries to connect to the network with the same name, its access will be denied, and it will not be able to see the other machines into the network other then itself.

Distribution use case

The distribution of sensiNact instances consist in enable individual instances to see and interact with devices that are actually in another sensinact instance located in a remote computer.

Next objectives for the sensinact distributed

TBD

Reference

[0] OSGi Compendium 6.0.0

Back to the top