FITMAN – Future Internet Technologies for MANufacturing
Project ID 604674
Shopfloor Data Collection (FITMAN T&T & FITMAN SN) ___ Installation and Administration Guide
Author(s): Copyright: Release Date: Revision:
Jesús Benedicto ATOS, Sudeep Ghimire UNINOVA, Said Rahma ATOS © 2015 ATOS and UNINOVA 15-09-2015 1.0
FITMAN – Future Internet Technologies for MANufacturing
Project ID 604674
Table of Contents INTRODUCTION ................................................................................................................................................. 3 1.
SOFTWARE LICENSE .............................................................................................................................. 4
2.
INSTALLING THE SOFTWARE FITMANT&T.................................................................................... 4 2.1. 2.2. 2.3. 2.4.
System Requirements ....................................................................................................................... 4 Download ........................................................................................................................................ 4 Installation and Configuration ........................................................................................................ 4 Sanity Check .................................................................................................................................... 7
3.
ADMINISTRATION PROCEDURES ..................................................................................................... 18
4.
INSTALLING THE SOFTWARE FITMANSN ..................................................................................... 19 4.1. 4.2. 4.3. 4.4.
System Requirements ..................................................................................................................... 19 Download ...................................................................................................................................... 19 Installation and Configuration ...................................................................................................... 19 Sanity Check .................................................................................................................................. 20
2/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
Introduction
This document provides step-by-step instructions to get FITMAN T&T, which is part of the Shoopflor Data Collection (SFDC) SE, installed and running on a virtual machine, as well as the process for a clean installation taking into account list of prerequisites, requirements and possible troubleshooting that may occur during the installation. In the same way also provides identical instructions for the FITMAN SN, which is also part of the SFDC SE. The FITMAN T&T is built on the top of Fosstrak (Free and Open Source Software for Track and Trace), which is an open source RFID prototyping platform that implements the EPC Network specifications; and which is intended to foster the rapid prototyping of RFID applications. Therefore, allows collect information from RFID devices. The Fosstrak platform is composed by four separate modules: EPCIS Repository: Fosstrak EPCIS provides an EPCglobal-certified EPCIS Repository as well as Query and Capture clients. In addition to these standards-compliant modules, it also offers a "Webadapter" for easy EPCIS access via web protocols (e.g., REST). The main idea of the functionality is that there is a Capture Interface implemented by HTTP that allows generating and capturing EPCIS events and sends them to the Repository, what keep it into the database. Ones the event is registered inside the database the user have the data at ones disposal by the Query Interface, through SOAP environment. Tag Data Translation (TDT) Engine: The Fosstrak TDT Engine offers and easy way to convert between different EPC representations. Filtering & Collection Middleware with ALE and LLRP Support: The Fosstrak ALE Middleware allows you to filter and collect data from RFID readers. LLRP Commander: The LLRP Commander helps you configure and manage LLRP-compliant RFID readers. In the context of this component, only the EPCIS Repository and the module Filtering & Collection Middleware with ALE and LLRP Support will be used. Moreover, the Shopfloor Data Collection SE is integrated with the Secure Event Management (SEM) [1] in order to deliver in a secure way the different events produced by the RFID readers and sensors. The FITMAN SN is built on the top of Global Sensor Networks (Free and Open Source Software for sensor networks), which is a Java environment that runs on one or more computers composing the backbone of the acquisition network. A set of wrappers allow to feed live data into the system. Then, the data streams are processed according to XML specification files. The system is built upon a concept of sensors (real sensors or virtual sensors, that is a new data source created from live data) that are connected together in order to build the required processing path.
1
Secure Event Management (SEM) provides asynchronous and fire-and-forget communication functions to collect event’s related data, typically from the shop floor, and dispatch them in a controlled way to interested applications and services. http://www.fitmanovationlab.eu
3/22
FITMAN – Future Internet Technologies for MANufacturing
Project ID 604674
More technical information about the component can be accessed through the document: “FITMAN SFDC user guide”
1. Software License
The Shopfloor Data Collection Specific Enabler (FITMAN T&T) is licensed under the GNU Lesser General Public License v2.1. All Fosstrak components are licensed under the GNU Lesser General Public License v2.1 (February 1999), except Fosstrak LLRP Commander that is licensed under the GNU General Public License v3 (June 2007).
2. Installing the Software FitmanT&T
2.1. System Requirements The installation of the FITMAN T&T requires the following system requirements:
Java Development Kit (JDK) (version 1.5 or higher) Apache Tomcat servlet container (version 5.5 or higher) MySQL server (version 5.0 or higher)
2.2. Download You can find links to download the FITMAN T&T at the FML Lab portal under the menu entry SFDC in the LAB section. http://www.fitmanovationlab.eu/ 2.3. Installation and Configuration You have two options, the first, use the Virtual Machine (VM) with the deployed component in it, or perform a clean installation on a computer. Here are presented the actions carried out in each of the cases: 1. Use a Virtual Machine (VM) with a deployed instance of the FITMANT&T. The VM has the following characteristics:
VM name: FitmanTT Type: Linux Version: Debian HDD: 6 GB Memory: 1GB (1024 MB) Network: NAT Enable network: yes Type of adapter: Intel PRO/1000 MT Desktop (82540EM) Cable connected: yes
The OS installed is a Debian 7.3 ("wheezy") server (without graphical interface nor desktop), with network capabilities. The Debian image downloaded from the official Debian web site “debian-7.3.0-i386-netinst.iso” has been used for the OS Debian installation. During installation has been specified and defined the following information: 4/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
Host name: fitmantt Domain name: fitmantt.com User root: root Password: tt_namtif Full name of the specific user: fitmantt Username: fitmantt Password: namtif Partition: All disk + swap
After the correct installation of the OS Debian the necessary software needed to deploy and operate the Shop Floor Data Collection (FITMAN T&T) have been installed, and consisted to install and configure the following software:
openjdk-6-jdk (default-jdk) Version 6b27-1.12.6-1~deb7u1 Recommended java package installed: o liblog4j1.2-java Version 1.2.16-3, o libcommons-logging-java Version 1.1.1-9 mysql-server, Version: 5.5.35+dfsg-0+wheezy1 Recomended mysql package installed: o mysql-utilities Version 1.0.5-1, o libmysql-java Version 5.1.16-2 tomcat6, Version: 6.0.35-6+deb7u1 Recomended tomcat package installed: o authbind Version 2.1.1, o tomcat6-docs Version 6.0.35-6+deb7u1, o tomcat6-admin Version 6.0.35-6+deb7u1, o tomcat6-examples Version 6.0.35-6+deb7u1 apache2,Version: 2.2.22-13. Apache2 has been installed but it is not used at this moment (only reserved for future used)
All of these packages have been downloaded and installed using the Debian command and utility called “aptitude”, where:
The command “aptitude install
” download and install the corresponding package. The command “aptitude show ” allows to show more information related to the package before the installation. The command “aptitude search | grep -e "^i"” allows to check if the package is installed.
In the VM all applications parameters are configured, therefore you don’t need to configure anything. You can download the VMs from here: ftp://repo.nimbus-ware.com/fitman_sfdc_tt_1.01.00_vbox.zip
5/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
2. Installation form scratch in a Server (windows or Linux): As previously noted, Shopfloor Data Collection (FITMAN T&T) requires from three main modules in order to work properly:
Fosstrak EPCIS Repository Fosstrak ALE Server EventManager
The Fosstrak EPCIS Project comprises three separate modules: an EPCIS Repository implementation an interactive EPCIS Capture Application an interactive EPCIS Query Application In order to set up your own EPCIS repository and both EPCIS applications, is needed to follow the step-by-step tutorial located here: http://fosstrak.github.io/epcis/docs/user-guide.html#Getting Started Once the EPCIS repository has been installed, next steps are to install the Fosstrak ALE Server, the Event Manager modules, and additionally the EPCIS web adapter. For this purpose you need a copy of the following files:
fc-server-1.2.0.war or higher - This is the ALE implementation. fc-webclient-1.2.0.war: This is a front-end for testing purpose to test the ALE through a web application. epcis-webadapter-0.1.0.war: This is a web adapter that provide REST interfaces which map EPCIS SOAP interface and adding a front-end for testing purpose. Eventmgr.war: The event manager module is responsible to manage and interface Fosstrak with the SEM SE.
A copy of these files can be downloaded from here: https://goo.gl/FGFRGW All files need to be deployed in Tomcat; therefore, you need to install Apache Tomcat if you have not installed it yet.
Copy the two WAR files (fc-server-VERSION.war, fc-webclient-VERSION.war and eventmanager.war) into the Tomcat's webapps directory and start Tomcat. The warfiles will be deployed automatically into new folders. The ALE server is now ready to be configured at your needs.
EventManager is distributed in a .zip file containing: eventmanager.war fitman folder Document explaining the API Readme file Once deployed, is needed to follow the next steps: 1. Place fitman folder under /home/ (linux) or /users/user/ (windows) or allocate this folder under the user home folder. This folder contains the event.properties file. Furthermore, this folder also contains the xml file needed to request authorization to SEM SE. This xml is generated when we define the patterns on SEM. 6/22
FITMAN – Future Internet Technologies for MANufacturing
Project ID 604674
2. Edit this file and change the IP value using the IP of the Virtual Machine of SEM Test or the IP where is located SEM. i.e. ip.sem=172.24.78.102 3. Into the classpath of the project, in com.atos.rsc.EventManager.properties it's indicated the path of the fitman folder with the label filePath
i.e. filePath= /home/fitmantt/
2.4. Sanity Check The sanity check consists to apply some instructions, command or test procedure in order to verify and validate that the environment and the components of Shopfloor Data Collection are correctly setup and running. This is therefore a preliminary set of tests to ensure that obvious or basic malfunctioning is fixed before proceeding to unit tests, integration tests and user validation 2..4.1.
Check java
Type the command “java –version”, the expected results must be: java version "1.6.0_27" OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1~deb7u1) OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)
2..4.2.
Check MySQL
Type the command “service mysql status”, the expected results must be: [info] /usr/bin/mysqladmin Ver 8.42 Distrib 5.5.35, for debian-linux-gnu on i686 Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Server version Protocol version Connection UNIX socket Uptime:
5.5.35-0+wheezy1 10 Localhost via UNIX socket /var/run/mysqld/mysqld.sock 1 min 26 sec
Threads: 2 Questions: 127 Slow queries: 0 Queries per second avg: 1.476.
Opens: 303
Flush tables: 1
Open tables: 74
Notice that maybe the threads section can be different. The important information is to see the previous sections (version, protocol, connection,…). Also take into account that this result is based on a linux machine, for windows could be not exactly. If mysql is not started the output will be: [info] MySQL is stopped..
2..4.3.
Check Tomcat
Type the command “service tomcat6 status”, the expected results must be: [ ok ] Tomcat servlet engine is running with pid 4027.
7/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
Notice that maybe the pid value can be different. The important information is to see that Tomcat servlet engine is running. If tomcat is not started the output will be: [ ok ] Tomcat servlet engine is not running..
If Tomcat has been correctly installed and configured, we can check the access to Tomcat from a client browser. This procedure consisted to open an internet browser in a personal computer as a client side and access the Tomcat resources based on the URL links http://localhost:8080/” and “http://localhost:8080/manager/html”. The client browser used for this test was the browser FireFox version 27.01 and Chrome version 45.0. Below, the list of results shows the screens expected that demonstrates the correct operations.
Figure 1 Tomcat “It works !”
8/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
Figure 2 Tomcat Web Application Manager (top page)
Figure 3 Tomcat Web Application Manager (scroll page 1)
9/22
FITMAN – Future Internet Technologies for MANufacturing
Project ID 604674
Figure 4 Tomcat Web Application Manager (scroll page 2)
Figure 5 Tomcat Web Application Manager (bottom page)
2..4.4.
Check FITMAN T&T
The sanity and check procedure of the FITMAN T&T consisted to open an internet browser in a personal computer as a client side and access the resources based on a set of URL links. The client browser used for this test was the browser FireFox version 27.01 and Chrome version 45.0. Below, the list of results shows the screens expected that demonstrates the correct operations. 10/22
FITMAN – Future Internet Technologies for MANufacturing
Project ID 604674
2..4.4.1
EPCIS (EPC Information Services) Services and web application:
Fosstrak EPCIS Capture and Query Services: http://localhost:8080/epcis-repository-0.5.0/
Figure 6 Fosstrak EPCIS Capture and Query Services
Fosstrak EPCIS Capture Service: http://localhost:8080/epcis-repository-0.5.0/capture
Figure 7 Fosstrak EPCIS Capture Service
Fosstrak EPCIS Capture Service (show capture form): http://localhost:8080/epcis-repository-0.5.0/capture?showCaptureForm=true
11/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
Figure 8 Fosstrak EPCIS Capture Service (show capture form)
Fosstrak EPCIS Query interface: http://localhost:8080/epcis-repository-0.5.0/query/services
Figure 9 Fosstrak EPCIS Query interface
Fosstrak EPCIS Query WSDL: http://localhost:8080/epcis-repository-0.5.0/query/?wsdl
12/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
Figure 10 Fosstrak EPCIS Query WSDL
EPCIS Webadapter (Electronic Product Code Information Services): http://localhost:8080/epcis-webadapter-0.1.0/
Figure 11 EPCIS Webadapter (Electronic Product Code Information Services)
EPCIS Tag & Trace Browser: http://localhost:8080/epcis-webadapter-0.1.0/rest/1/
13/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
Figure 12 EPCIS Tag & Trace Browser
EPCIS Tag & Trace - Capture Simulator: http://localhost:8080/epcis-webadapter-0.1.0/rest/1/capture/simulator
Figure 13 EPCIS Tag & Trace - Capture Simulator (top page)
14/22
FITMAN – Future Internet Technologies for MANufacturing
Project ID 604674
Figure 14 EPCIS Tag & Trace - Capture Simulator (bottom page)
List of Feeds: http://localhost:8080/epcis-webadapter-0.1.0/rest/feed/
Figure 15 List of Feeds
2..4.4.2
ALE (Application Level Event) Services and web application:
ALE Web client: http://localhost:8080/fc-webclient-1.2.0/services/ALEWebClient.jsp
15/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
Figure 16 ALE Web client
ALE Service: http://localhost:8080/fc-server-1.2.0/services/ALEService
Figure 17 ALE Service
Notice that the returned result is a normal error because no service has been called; only the base url of the set of service was the accessed resource.
ALE LR (Logical Reader) service: http://localhost:8080/fc-server-1.2.0/services/ALELRService
16/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
Figure 18 ALE LR (Logical Reader) service
Notice that the returned result is a normal error because no service has been called, only the base url of the set of service was the accessed resource.
ALE Capturing Application: http://localhost:8080/capturingapp-0.1.1/services
Figure 19 ALE Capturing Application
17/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
ALE Capturing Application WSDL: http://localhost:8080/capturingapp-0.1.1/services/CapturingAppService?wsdl
Figure 20 ALE Capturing Application WSDL
3. Administration Procedures
Depending on the properties used to configure the EPCIS repository during the installation, this section can differ. In any case basically there are three configuration files relevant to the user of the application: application.properties, file located in the application's class path at TOMCAT_HOME/webapps/epcis-repository-/WEB-INF/classes. It contains the basic configuration directives that control the repository's behaviour when processing queries and events. context.xml, file that includes the configuration parameters for the database connection log4j.properties, this file is also located in the application's class path at TOMCAT_HOME/webapps/epcis-repository-/WEB-INF/classes. The properties defined here affect the logging behaviour of the application. The log file is written to TOMCAT_HOME/logs/epcis-repository.log. By default, it only includes log statements of level INFO and higher. You can get more information from here: Documentation EPCIS Services: EPCIS User Guide http://fosstrak.github.io/epcis/docs/user-guide.html Documentation ALE Services and web application: ALE User Guide: Quick Start http://fosstrak.github.io/fc/docs/user-index.html
ALE Capturing Application http://fosstrak.github.io/capturingapp/docs/user-quickstart.html 18/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
4. Installing the Software FitmanSN
4.1. System Requirements The installation of the FITMAN SN requires the following system requirements:
Java Development Kit (JDK) (version 1.6 or higher) Apache ant
4.2. Download You can find links to download the source code and binary distribution of the FITMAN SN in the FML Lab portal under the menu entry SFDC in the LAB section. http://demos.txt.it:8095/?portfolio=shopfloor-data-collection-sfdc 4.3. Installation and Configuration You have two options, first, use the Virtual Machine (VM) with the deployed component in it, or perform a clean installation on a computer. Here are presented the actions carried out in each of the cases: 1. Use a Virtual Machine (VM) with a deployed instance of the FITMAN SN. The VM has the following characteristics:
VM name: FitmanSN Type: Linux Version: Debian HDD: 6 GB Memory: 1GB (1024 MB) Network: NAT Enable network: yes Type of adapter: Intel PRO/1000 MT Desktop (82540EM) Cable connected: yes
The OS installed is a Debian 7.3 ("wheezy") server (without graphical interface nor desktop), with network capabilities. In the VM all applications parameters are configured, therefore you don’t need to configure anything. You can download the VMs from here: ftp://repo.nimbus-ware.com/fitman_sfdc_sn_1.01.00_vbox.zip
2. Installation form scratch in a Server (windows or Linux): Install Sun's JDK 1.6 or higher Install the ant tool o Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other. Now Fitman SN can be controlled through the ant tool through tasks defined in the file 'build.xml'. The main ant tasks available are : build Compiles the GSN source code. 19/22
FITMAN – Future Internet Technologies for MANufacturing
Project ID 604674
gsn Starts the GSN server. stop Stops the currently runing GSN server. clean Removes the current built files and forces a rebuild. (for other tasks, refer to build.xml) o To run any of the aforementioned ant tasks simply write: ant [task name] For example, to start gsn, run the following: ant gsn In order to stop gsn, run the following command: ant stop 4.4. Sanity Check The sanity check consists to apply some instructions, command or test procedure in order to verify and validate that the environment and the components of Shopfloor Data Collection are correctly setup and running. This is therefore a preliminary set of tests to ensure that obvious or basic malfunctioning is fixed before proceeding to unit tests, integration tests and user validation 4..4.1.
Check java
Type the command “java –version”, the expected results must be: java version "1.8.0_65" Java(TM) SE Runtime Environment (build 1.8.0_65-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
4..4.2.
Check ANT
This is necessary only when bulding from source code. Before you can run Ant perform the following additional set ups:
Add the bin directory to your path. Set the ANT_HOME environment variable to the directory where you installed Ant. On some operating systems, Ant's startup scripts can guess ANT_HOME (Unix dialects and Windows NT/2000), but it is better to not rely on this behavior. Optionally, set the JAVA_HOME environment variable (see the Advanced section below). This should be set to the directory where your JDK is installed.
Check Installation of ANT You can check the basic installation with opening a new shell and typing ant. You should get a message like this Buildfile: build.xml does not exist! Build failed So Ant works. This message is there because you need to write an individual buildfile for your project. Now change to the directory when you have the source of Fitman SN and start SN by typing : ant gsn You will get some logs, for GSN being started which will be as shown below: 20/22
Project ID 604674
FITMAN – Future Internet Technologies for MANufacturing
….. gsn: [java] GSN is trying to start. [java] All GSN logs are available at: logs/gsn.log [java] GSN is starting at port:22001 [java] All GSN logs are available at: logs/gsn.log [java] Global Sensor Networks (GSN) is Starting on port 22001... [java] The logs of GSN server are available in logs/gsn.log file. [java] To Stop GSN execute the gsn-stop script. [java] WARN [2015-11-15 12:15:01,178] [main] (DataSources.java:29) - C reated a DataSource to: jdbc:h2:file:MyFile [java] WARN [2015-11-15 12:15:03,346] [main] (DataSources.java:29) - C reated a DataSource to: jdbc:h2:mem:validator [java] WARN [2015-11-15 12:15:11,211] [VSensorLoader-Thread0] (VSensorLoad er.java:217) - adding : temperaturehandler virtual sensor[D:\FITMAN\FitmanSN -master\FitmanSN-master\virtual-sensors\TemperatureHandler.xml]
If you get this then Fitman SN is correctly built and running.
21/22
FITMAN – Future Internet Technologies for MANufacturing
Project ID 604674
4..4.3.
Check FITMAN SN
The sanity and check procedure of the FITMAN SN consisted to open an internet browser in a personal computer as a client side and access the resources. By default Fitman SN runs at port 22001. In case that port is not available for whatever reason, change the port in the build.xml file at \FitmanSN-master\conf. Change port number for the attribute 22001 to available port. 4..4.3.1
Fitman SN web application:
All services for SN are available at: http://localhost:22001/
Figure 21 Fitman SN web application
For further details of Fitman SN follow the documentation available at http://demos.txt.it:8095/?portfolio=shopfloor-data-collection-sfdc
22/22