Skip to content

VDKv2 OpenIoT Release 0.6.1 Virtual Box Setup Guide

Hylke van der Schaaf edited this page Nov 5, 2015 · 28 revisions

Requirements

  • Oracle Virtual Box available from Oracle VM VirtualBox
  • OpenIoT Virtual Box Image available from here
  • 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

Steps to Update and Redeploy OpenIoT with latest version in GitHub.

IMPORTANT: Steps to update the VDK to the latest source code version Please perform the following steps before proceeding further to ensure you have access to latest version of the code with BUG fixes.

  1. Open a terminal window.

  2. cd /media/openiot/openiot-code

  3. git stash

  4. git pull

  5. cp /media/openiot/openiot-code/utils/utils.commons/src/main/resources/security-config.ini /media/openiot/jboss-as-7.1.1.Final/standalone/configuration/

  6. Open the openiot.properties file from /media/openiot/jboss-as-7.1.1.Final/standalone/configuration. Make the following changes to specific sections

  7. Replace the Sensor Schema Editor Section with

    #Sensor Schema Editor
    ide.core.navigation.sensorSchemaEditor.title=Sensor Schema Editor
    ide.core.navigation.sensorSchemaEditor.url=http://localhost:8080/ui.schemaeditor
    ide.core.navigation.sensorSchemaEditor.monitoring=true
    
  8. Paste the following after security.initialize.management.key=openiot-security-manager-app

    security.initialize.reqDef.prefix=http://localhost:8080/ui.requestDefinition
    security.initialize.reqDef.secret=requestDefinitionUI-secret
    security.initialize.reqDef.key=requestDefinitionUI
    security.initialize.reqPres.prefix=http://localhost:8080/ui.requestPresentation
    security.initialize.reqPres.secret=requestPresentationUI-secret
    security.initialize.reqPres.key=requestPresentationUI
    security.initialize.schemaEditor.prefix=http://localhost:8080/ui.schemaeditor
    security.initialize.schemaEditor.key=schemaEditor
    security.initialize.schemaEditor.secret=schemaEditor-secret
    security.initialize.scheduler.key=scheduler
    security.initialize.scheduler.secret=scheduler.secret
    security.initialize.sdum.key=sdum
    security.initialize.sdum.secret=sdum.secret
    security.initialize.xgsn.key=xgsn
    security.initialize.xgsn.secret=xgsn.secret
    
  9. Delete the Following

    casOauthClient.key.lsm-server=lsm-server
    casOauthClient.secret.lsm-server=lsm-server.secret
    casOauthClient.key.scheduler=scheduler
    casOauthClient.secret.scheduler=scheduler.secret
    casOauthClient.key.sdum=sdum
    casOauthClient.secret.sdum=sdum.secret
    
  10. Build the openiot code using the following command

    open a terminal windows and enter the following commands
    cd /media/openiot/openiot-code
    mvn install
    
  11. Deploy the OpenIoT Code to JBOSS

    open a terminal windows and enter the following commands
    cd /home/openiot/Desktop/scripts/
    ./virtuoso_start.sh (wait for Virtuoso to start)
    ./jboss_start.sh (wait for JBOSS to Starts
    cd /media/openiot/jboss-as-7.1.1.Final/bin
    ./jboss_cli.sh
    connect
    deploy /media/openiot/openiot-code/modules/lsm-light/lsm-light.server/target/lsm-light.server.war --force
    deploy /media/openiot/openiot-code/modules/security/security-server/target/openiot-cas.war --force
    deploy /media/openiot/openiot-code/modules/security/security-management/target/security.management.war --force
    deploy /media/openiot/openiot-code/modules/scheduler/scheduler.core/target/scheduler.core.war --force
    deploy /media/openiot/openiot-code/modules/sdum/sdum.core/target/sdum.core.war --force
    deploy /media/openiot/openiot-code/modules/scheduler/scheduler.core/target/scheduler.core.war --force
    deploy /media/openiot/openiot-code/ui/ui.requestDefinition/target/ui.requestDefinition.war --force
    deploy /media/openiot/openiot-code/ui/ui.requestPresentation/target/ui.requestPresentation.war --force
    deploy /media/openiot/openiot-code/ui/ui.schemaeditor/target/ui.schemaeditor.war --force
    deploy /media/openiot/openiot-code/ui/ide/ide.core/target/ide.core.war --force
    exit
    

End User Manual - Steps to trial OpenIoT platform

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: The xGSN configuration is in a application.conf file under the '/src/main/resources

  • Open a new terminal instance
  • Go to /home/openiot/Desktop/scripts
  • Run the script ./gsn_start.sh
  • You will see xGSN starting up.
  • Note: If you run step 4 without completing previous steps, you will see exceptions and errors. Please ensure the previous steps are completed without any errors.
  1. Composing a service using OpenIoT
  • For documentation on composing a service using OpenIoT tools, please refer to the following link Request Definition and Request Presentation

  • Request Definition

    • Open firefox browser
    • Enter the URL `http:\localhost:8080\ui.requestDefinition
    • Login in using the security credentials in the instructions text file
    • For local setup, discover sensors in the location canberra
    • Use above documentation to compose and save an application. A sample screenshot of one such application is show below Request Definition Screenshot
    • In the above example, we compose a application that computes the average temperature in canberra and visualizes the data in a meter gauge.
  • Request Presentation

    • Open firefox browser
    • Enter the URL `http:\localhost:8080\ui.requestPresentation
    • Login with the security credentials
    • 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
  1. Sensor Schema Editor The Sensor Schema Editor allow users to seamlessly generate RDF descriptions for their sensors. The schema editor uses an intuitive web-based interface to capture user's sensor description such as sensor type, name, location etc. The schema editor will have the following features

Sensor Type Editor Sensor Instance Editor Sensor Type Editor: The sensor type editor allows users to define new Sensor Types e.g. a Weather Station sensor that observes temperature and humidity.

Sensor Instance Editor: The sensor instance editor allows users to create new sensor instance based on a sensor type. E.g. a weather station sensor type names OpenIoTWeatherStation that is installed at a given location (lat,lng) and has a owner etc.

More information on how to use the schema editor is available here

  1. Security Management The VDK comes pre-configured with default security configuration. The user name and password for the security configuration can be found in the instructions text file along with the VDK package.

More information on OpenIoT Centralised Authentication Service (CAS) is available here

Check each components wiki pages for default permissions required to access the respective services.

  1. 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/
  • The entire OpenIoT dependencies including JBOSS and latest git code is available from /media/openiot/

Clone this wiki locally