Skip to content

Developer Setup Instructions Eclipse OpenIoT v0.6.1

Hylke van der Schaaf edited this page Feb 12, 2015 · 12 revisions

Table of Contents

INTERGRATION ENVIORMENT SETUP

Source code location

Documentation

Development Platform

Eclipse Integrated Development Environment (IDE) – Latest Version

Java SDK 1.7+ - Latest Version

JBOSS AS 7.1.1 (Please use only this version)

Maven 3.1 (Or Latest)

Environmental Path

  • The following variables needs to be set for successful running of maven, JBOSS and java
    • JAVA_HOME
    • MAVEN_HOME
  • The following path needs to be set
    • Java bin directory
    • Maven bin directory
The following is a useful link on how to setup maven.

http://www.mkyong.com/maven/how-to-install-maven-in-windows/

ECLIPSE Install Guide FOR openiot code

This document aims to provide a step-by-step instruction to deploy the OpenIoT components form scratch.

OpenIoT Modules in GitHub

  • UI Folder
    • ui.requestCommons
    • ui.requestDefinition
    • ui.requestPresentation
    • ide/ide.core
    • ui.schemaeditor
    • modules
      • Scheduler
        • scheduler.core
        • scheduler.client
      • SDUM
        • sdum.core
        • sdum.client
      • LSM-Lite
        • lsm-server
        • lsm-client
      • x-gsn
      • security
        • security-management
        • security-client
        • security-server
      • CUPUS
    • Under utils
      • utils.commons

Pre-requisites

  1. Install maven
Download maven from http://maven.apache.org/
  1. Set the path to the maven bin directory
  2. Ensure you can run the mvn –version command from terminal or command prompt
  1. Install Eclipse Juno (or latest version). The following eclipse plugins needs to be installed to get a working environment without any errors. If you use a different version of eclipse, please update the following tools with corresponding version.
  1. Maven 2 Eclipse plugin – This is required to run maven commands from Eclipse and also import POM files into Eclipse as a eclipse-maven project.
http://download.eclipse.org/technology/m2e/releases
  1. Install JBOSS Maven Support and JBOSS Web and Java EE Development tools – http://download.jboss.org/jbosstools/updates/stable/juno
For JBOSS Web and Java EE Development Tools, only install
  • Context and Dependency Injection Tools
  • Forge Tools
  • JBOSS JAX-RS Rools
  • JBOSS Tools Java Standard Tools
  • JBoss Tools JSF
  • JBoss Tools RichFaces
  • JBoss Tools Visual Page Editor
  • JBoss WebService Tools
  • JBossAS Tools
    1. JIBX Eclipse plugin 1.1.6a from
http://jibx.sourceforge.net/eclipse/
  1. Web Tools Platform 3.4.2
http://download.eclipse.org/webtools/repository/juno/

All these plugins can be installed from eclipse “install new software” option from under Help menu.

Note: If you use a more recent version of eclipse, please replace the URl with corresponding version specific plugins.

Note: When using Eclipse Kepler, as much as possible, install the above plugins from the Eclipse Marketplace by searching for plugins by name.

  1. Download JBoss 7.1.
    1. Unzip JBOSS to a directory in your hard drive.
  2. In Eclipse, under Windows->Show View->Other, search for servers.
    1. In the server window, right click and select new.
    2. If you have all the above plugin and tools installed, you will see an option for JBOSS 7.1 under the server options
    3. Select the location of JBOSS (the location on your drive previously unzipped).
    4. Start the JBOSS server from eclipse (a small play icon in the server window) to test and ensure JBOSS is starting and running successfully.

Download OpenIoT source code

Download the OpenIoT sources from github using your favorite git client (https://github.com/OpenIotOrg/openiot) or if using bash using the command

git clone https://github.com/OpenIotOrg/openiot.git

Configuring JBoss

Here we assume that JBoss AS7 is used in standalone mode. By $jboss-home we refer to JBoss AS7 directory.

Enabling SSL in JBoss

Assume that you store the required SSL files in a path YOUR_SSL_DIR_PATH (e.g., $jboss-home/standalone/configuration/ssl).

  1. If the directory structure does not exist, run ´mkdir -p YOUR_SSL_DIR_PATH´
  2. Run ´cd YOUR_SSL_DIR_PATH´
  3. Run,´keytool -genkey -alias jbosskey -keypass <password> -keyalg RSA -keystore server.keystore´ Use "localhost" as Common Name [as answer to "What is your first and last name?"]. If you are deploying on a server, use the DNS name of the server instead of "localhost". If you are deploying on a server with public IP (no DNS), use ip address as Common Name [as answer to "What is your first and last name?"]. Also add the following command to the keytool: ´-genkey -ext san=ip:10.0.0.1´
  4. Run ´keytool -export -alias jbosskey -keypass <password></password> -file server.crt -keystore server.keystore´
  5. Run ´keytool -import -alias jbosscert -keypass <password></password> -file server.crt -keystore server.keystore´ Ignore the warning!
  6. In ´$jboss-home/standalone/configuration/standalone.xml´ add the following connector in <subsystem xmlns="urn:jboss:domain:web:1.1"></subsystem>
´´´ <connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true"></connector>
    &lt;ssl name=&quot;https&quot; key&#45;alias=&quot;jbosskey&quot; password=&quot;&amp;amp;lt;password&amp;amp;gt; certificate&amp;amp;#45;key&amp;amp;#45;file=&amp;amp;quot;YOUR_SSL_DIR_PATH/server.keystore&amp;amp;quot; &amp;amp;gt;&amp;#10;&amp;#10;&amp;amp;amp;lt;/connector&amp;amp;amp;gt;&amp;amp;lt;/password&amp;amp;gt;&amp;#10;´´´&amp;#10;&amp;#10;&amp;#10;#&quot;&gt;&lt;/ssl&gt;id’s

Request Definition

The request definition interface can be access from http://localhost:8080/ui.requestDefinition

  1. Login with CAS
  2. Compose a new service
  3. Validate the design
  4. Save the design
Please refer to the OpenIoT Wiki for more detailed procedures. Please explore both user and develop sections.

Request Presentation

The request definition interface can be access from http://localhost:8080/ui.requestPresentation

  1. Login with CAS
  2. Load your application
  3. Click on current application-force dashboard refresh
  4. Data should become available in the selected output format
Please refer to the OpenIoT Wiki for more detailed procedures. Please explore both user and develop sections.

Clone this wiki locally