Skip to content

VDKv2 OpenIoT Release 0.6.1 Virtual Box Setup Guide

premjayaraman edited this page Dec 10, 2014 · 28 revisions

Requirements

  • Oracle Virtual Box available from Oracle VM VirtualBox
  • OpenIoT Virtual Box Image available from TBA
  • Recommended Configuration for Virtual Box (tested with below configuration for stable working)
    • 2 GB Memory
    • 12 GB HDD (6 GB Linux, 3.5 GB Data expandable to 5.5GB using GParted tool for Ubuntu, 2 GB Swap)
    • Two core CPU

Deploying and Starting VM

  • Install the oracle virtual box
  • From the location where the VM is stored, double click the file OpenIoT-VDKv2.vbox. A window as show below will open with the OpenIoT-VM settings Virtual Box Screenshot
  • Click the Start icon to start the VM.

Running OpenIoT Services

Common Setup Configuration

  • The username and password for the VM and the security settings is located in a instruction to run Openiot VM-Release2 text file in the downloaded VM Image package.
  • The scripts required to run the OpenIoT services namely Scheduler, SDUM, Request Definition, Request Presentation, LSM Server/Client, Security Server/Client/Management, xGSN, Schema Editor and Virtuoso are located in the Desktop under scripts directory

OpenIoT Property File and secutiry-config.ini File

An openiot.propoerties and security-config.ini files are located in JBOSS configuration folder

/media/openiot/jboss-as-7.1.1.Final/standalone/configuration provides the configuration information to OpenIoT services.

The VDK v2 is configured to run a complete local instance of the OpenIoT release code v0.6.1

Local Deployment Property File

openiot.properties

/media/openiot/jboss-as-7.1.1.Final/standalone/configuration/openiot.properties

security-config.ini

/media/openiot/jboss-as-7.1.1.Final/standalone/configuration/security-config.ini

End User Manual

For an end-user who would like to use the platform as-is, perform the following steps

  1. Open a terminal and navigate to /home/openiot/Desktop/scripts
  2. Starting Virtuoso
  • Run the script ./virtuoso_start
  1. Starting JBOSS
  • Run the script ./jboss_start
  • You will notice JBOSS is starting. Please ensure JBOSS does not report any errors. If so check the following
    • Check there is sufficient space in the JBOSS directory
    • Restart VM and try starting JBOSS again
  • Note: If you start JBOSS without performing step 2, JBOSS will throw exceptions.
  1. Starting xGSN to push data into the OpenIoT system.
  • A virtual sensor is used to configure xGSN with appropriate data sources. Please refer to the wiki page for more details
    • Copy the files in from the directory that corresponds to your setup (Step 2) to the main virtual-sensors directory
    • Sample dummy virtual sensor configuration is available in the VDK to test the OpenIoT platform. The sample sensors (Drmo_Weatherstation) are in the location /media/openiot/openiot-code/modules/x-gsn/virtual-sensors
    • The sample virtual sensor configuration and the corresponding metadata that describe the sensor is a weather station sensor located in canberra, australia. The data for the sensor is read from a CSV file stored in xGSN folder under data

**Note 1: The xGSN configuration is in a application.conf file under the '/src/main/resources'


**Note 2: To push xGSN data to a DERI instance, update the configuration file in the '<xGSN Folder>/conf/lsm_config.properties' with following**


username=sofiane password=sofiane metaGraph=http://lsm.deri.ie/OpenIoT/guest/sensormeta# dataGraph=http://lsm.deri.ie/OpenIoT/guest/sensordata# lsm.server=http://lsm.deri.ie/lsm-light.server/

#DynamicControl functionalGraph=http://lsm.deri.ie/OpenIoT/guest/functionaldata# endPoint=http://lsm.deri.ie/sparql virtualSensorsDir = virtual-sensors availableSensorsDir = virtual-sensors/LSM dynamicControl=false #enter frequency of dynamic sensor control in minutes dynamicControlPeriod=5

  * Open a new terminal instance
  * Go to `/home/openiot/Desktop/scripts`
  * Run the script `./gsn_start.sh`
  * You will see the output as below
![xGSN Screenshot](Documentation/images/virtualbox/vm4.png)
  * Note: If you run step 6 without completing previous steps, you will see exceptions and errors. Please ensure the previous steps are completed without any errors.
7. Composing a service using OpenIoT

  * For documentation on composing a service using OpenIoT tools, please refer to the following link [Request Definition](https://github.com/OpenIotOrg/openiot/wiki/Request-Definition) and [Request Presentation](https://github.com/OpenIotOrg/openiot/wiki/Request-Presentation)

  * Request Definition
    * Open firefox browser
    * Enter the URL `http:\\localhost:8080\ui.requestDefinition
    * Create an account and sign-in with the same
    * For local setup, discover sensors in the location `canberra`
    * For DERI setup, discover sensors in the location `Lausanne`
    * See figure below for example
     ![Request Definition Screenshot Discovery](Documentation/images/virtualbox/vm5.png)
    * Use above documentation to compose and save an application. A sample screenshot of one such application is show below
     ![Request Definition Screenshot](Documentation/images/virtualbox/vm6.png)
    * In the above example, we compose a application that computes the average temperature in canberra and visualises the data in a meter gauge.

  * Request Presentation
    * Open firefox browser
    * Enter the URL `http:\\localhost:8080\ui.requestPresentation
    * Login with the same account details created in the previous step
    * Open the application (same name as one used before)
    * Click on force dashboard refresh
    * You will see the meter gauge with data as below
![Request Presentation Screenshot](Documentation/images/virtualbox/vm7.png)

8. Stop all services
  * To stop all the services, please run the corresponding stop scripts in the following order
    * `./gsn_stop.sh`
    * `./jboss_stop.sh`
    * `./virtuoso_stop.sh`

### Developer Manual
  * The VM provide developers, ready access to an Eclipse environment with pre-configured eclipse plugins to support OpenIoT development.
  * The user manual can be used to test the system out of the box
  * Please refer to the documentation link https://github.com/OpenIotOrg/openiot/wiki/Documentation for detailed manuals on extending/developing new application on OpenIoT platform.
  * The VM comes installed with git, maven, JBOSS, Virtuoso, JBOSS and maven plugins for eclipse allowing developer to update their code as and when new release of code is available
  * The eclipse environment can be started from the desktop or from `/media/openiot/OpenIoT-Dev-Environment/`
  * The entire OpenIoT dependencies including JBOSS and latest git code is available from `/media/openiot/OpenIoT-Dev-Environment/`

Clone this wiki locally