-
Notifications
You must be signed in to change notification settings - Fork 189
Developer Setup Instructions Eclipse OpenIoT v0.6.1
|
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)
- 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
http://www.mkyong.com/maven/how-to-install-maven-in-windows/
This document aims to provide a step-by-step instruction to deploy the OpenIoT components form scratch.
- 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
- Scheduler
- Under utils
- utils.commons
- Install maven
- Set the path to the maven bin directory
- Ensure you can run the mvn –version command from terminal or command prompt
- 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.
- 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.
- Install JBOSS Maven Support and JBOSS Web and Java EE Development tools – http://download.jboss.org/jbosstools/updates/stable/juno
- 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
- JIBX Eclipse plugin 1.1.6a from
- Web Tools Platform 3.4.2
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.
- Download JBoss 7.1.
- Unzip JBOSS to a directory in your hard drive.
- In Eclipse, under Windows->Show View->Other, search for servers.
- In the server window, right click and select new.
- If you have all the above plugin and tools installed, you will see an option for JBOSS 7.1 under the server options
- Select the location of JBOSS (the location on your drive previously unzipped).
- 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 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
See https://github.com/OpenIotOrg/openiot/wiki/JBossWithSSL
Please follow the link below for detailed instructions for installing Virtuoso.
Note: for Linux installations, Virtuoso requires a 64 bit machine.
https://github.com/OpenIotOrg/openiot/wiki/InstallingVirtuosoOpensource7Ubuntu
- Start eclipse and create a new workspace.
- Import the following projects into eclipse using the file->import->maven project option.
- scheduler.core
- sdum.core
- security.server
- security.management
- security.client
- ui.requestCommons
- ui.requestDefinition
- ui.requestPresentation
- ui.schemaeditor
- utils.commons
- lsm.server
- lsm.client
- x-gsn
- Each project should import successfully, download all the POM dependencies.
- The above projects are dependent on the utils.commons, ui.requestCommons, lsm-client and security-client.
- Other project might pop up a missing dependency error. Don’t worry yet.
- Right click on the utils.commons project and choose run as-> maven build … (choose the one with three dots)
- In the new window, for goals enter the word “install”
- This will compile the project, generate the jar and install it in the maven repository.
- Repeat the same steps for the ui.requestCommons, security-client and lsm-client projects.
- Right Click on the other projects and run maven->update project
- Now all errors should be resolved and only x-gsn will indicate an error. Ignore this as the error is due to incompatibility to eclipse maven plugin with some x-gsn configurations.
- Copy the openiot.properties and the security.ini file from the utils.common/src/main/resources/properties to the jboss folder standalone/configuration
openiot.properties https://github.com/OpenIotOrg/openiot/blob/develop/utils/utils.commons/src/main/resources/properties/openiot.properties
security-config.ini https://github.com/OpenIotOrg/openiot/blob/develop/utils/utils.commons/src/main/resources/security-config.ini
More documentation on how to assign roles to users is available at https://github.com/OpenIotOrg/openiot/wiki/Security-Use-Console
- Assign the newly created user the above roles allowing this user to access all the services
- Logout
The schema editor interface can be access from http://localhost:8080/ui.schemaeditor
- Login with CAS
https://github.com/OpenIotOrg/openiot/wiki/Virtual-Sensor-RDF-Schema-Editor-Use
The first component setup was xGSN. This was to ensure that there was sensor data available to be used later on by the request application
Wiki reference
Update the X-GSN application.conf file under modules/x-gsn/src/main/resources as below
Note: The graph information in the application.conf must be identical to the graph information in the openiot.properties file.
To generate the metadata file, use the sensor schema editor which can be accessed from localhost:8080/ui.schemaeditor if the JBOSS is deployed to localhost. Please replace localhost with the public IP or host name if JBOSS depending on your installation.
Follow the instructions in the wiki below to generate sensor descriptions
https://github.com/OpenIotOrg/openiot/wiki/Virtual-Sensor-RDF-Schema-Editor-Use
The schema editor will register the sensor with LSM and provide the user with a metadata file which has to be place in the following directory along with the virtual sensor XML file /modules/x-gsn/virtual-sensors/
There are many sample XML files in the xGSN folder under the LSM directory. Below is a sample XML file that connects to a CSV wrapper to read data from a CSV file.
To run xGSN from command prompt (windows), and shell (linux) the following command is executed
gsn-start.bat
gsn-start.sh
The scheduler core is the core service that will be deployed on JBOSS. The scheduler service can be tested by opening the following URL
http://localhost:8080/scheduler.core/rest/services
The scheduler client is a java application with Swing UI to test the services of the scheduler.core service.
The SDUM core is the core service that will be deployed on JBOSS. The SDUM service can be tested by opening the following URL
http://localhost:8080/sdum.core/rest/services
The sdum client is a java application with Swing UI to test the services of the sdum.core service.
The request definition interface can be access from http://localhost:8080/ui.requestDefinition
- Login with CAS
- Compose a new service
- Validate the design
- Save the design
The request definition interface can be access from http://localhost:8080/ui.requestPresentation
- Login with CAS
- Load your application
- Click on current application-force dashboard refresh
- Data should become available in the selected output format