-
Notifications
You must be signed in to change notification settings - Fork 192
VDKv2 OpenIoT Release 0.6.1 Virtual Box Setup Guide
- 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
- 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
- Click the Start icon to start the VM.
- 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
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
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
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.
-
Open a terminal window.
-
cd /media/openiot/openiot-code
-
git stash
-
git pull
-
cp /media/openiot/openiot-code/utils/utils.commons/src/main/resources/security-config.ini /media/openiot/jboss-as-7.1.1.Final/standalone/configuration/
-
Open the openiot.properties file from /media/openiot/jboss-as-7.1.1.Final/standalone/configuration. Make the following changes to specific sections
-
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 -
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 -
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 -
Build the openiot code using the following command
open a terminal windows and enter the following commands cd /media/openiot/openiot-code mvn install -
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
For an end-user who would like to use the platform as-is, perform the following steps
- Open a terminal and navigate to
/home/openiot/Desktop/scripts - Starting Virtuoso
- Run the script
./virtuoso_start
- 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.
- 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.
- 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
- 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
- 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
- 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.
- 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
- 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/