Difference between revisions of "EIS Docker Container Base"

From ESS-WIKI
Jump to: navigation, search
 
(64 intermediate revisions by the same user not shown)
Line 21: Line 21:
  
 
== Docker Container ==
 
== Docker Container ==
 +
 +
[[File:Architecture of docker container.jpg|center|400x280px|Architecture of docker container.jpg]]
  
 
    EIS software service runs as a Docker Container. Each service is independently. Customer can easily migrate application with Docker Container. For example, a customer’s application runs in CentOS. Customer can build a CentOS Container to service it and integrate with EIS system. It makes easily migrate your application into EIS system. The following describes the Docker Container technology and advantages.
 
    EIS software service runs as a Docker Container. Each service is independently. Customer can easily migrate application with Docker Container. For example, a customer’s application runs in CentOS. Customer can build a CentOS Container to service it and integrate with EIS system. It makes easily migrate your application into EIS system. The following describes the Docker Container technology and advantages.
 +
 +
    Containerization -- is an OS-level virtualization method for deploying and running distributed applications without launching an entire VM for each application. Instead, multiple isolated systems, called containers, are run on a single control host and access a single kernel.  As shown in above picture, containers share the same OS kernel as the host, containers can be more efficient than VMs, which require separate OS instances.
 +
 +
    Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in. Containers hold the components necessary to run the desired software, such as files, environment variables, and libraries. The host OS also constrains the container's access to physical resources -- such as CPU and memory -- so a single container cannot consume all of a host's physical resources.
  
  
Line 42: Line 48:
 
== Docker Container Services ==
 
== Docker Container Services ==
  
=== api-gw ===
+
=== [[EIS_RESTfulAPI_ProcWSNData|REST API GW]] ===
  
 
[[File:EIS REST API Architecture.jpg|center|700x400px|EIS REST API Architecture.jpg]]
 
[[File:EIS REST API Architecture.jpg|center|700x400px|EIS REST API Architecture.jpg]]
Line 48: Line 54:
 
 
 
 
  
    [[EIS_RESTfulAPI_ProcWSNData|EIS REST API]] is the entry point for all EIS software services. The REST API handles requests in one of two ways. Some requests are simply routed to the appropriate service. It handles other requests by fanning out to multiple services. REST API service gathers pre-process data and generate RETS APIs for EIS software services as about picture. The REST API is also responsible for tasks such as load balancing, caching, access control, API metering, and monitoring, and can be implemented effectively using NodeJS express. The customer can easily and quickly develop its application, data flow, and web application by REST API.
+
    REST API GW is the entry point for all EIS software services. The REST API handles requests in one of two ways. Some requests are simply routed to the appropriate service. It handles other requests by fanning out to multiple services. REST API service gathers pre-process data and generate RETS APIs for EIS software services as about picture. The REST API is also responsible for tasks such as load balancing, caching, access control, API metering, and monitoring, and can be implemented effectively using NodeJS express. The customer can easily and quickly develop its application, data flow, and web application by REST API.
 +
 
 +
=== [[IoTGateway/LinearDust|dust-link]] ===
 +
 
 +
    Dust-link docker container is the linear dust network manager service. This service control and collecte of dust link SenHub by "/dev/ttyUSB0" UART port. It also send dust link manager and senhub data to mqtt-bus EIS system with WISESnail. User can access the dust-link manage interface and SenHub by RESTful API.
  
=== dust-link ===
+
=== [http://mqtt.org/ mqtt-bus] ===
  
=== mqtt-bus ===
+
    EIS uses the MQTT broker as the asynchronous communication bus for Inter-service communication. Inter-service communication protocol base on MQTT standard and IETF (The Internet Engineering Task Force) defined media types for Sensor Makeup Language (SenML) in JSON format. User can follow EIS communication protocol or use [[EdgeSense_Southbound_Service_Development|Device ]] ( for device's sensor ) or [[WSN-Device_SDK|WSN-Device]] ( for Wireless Sensor Network ) SDK to integrate a new service with the EIS eco-system.
  
    EIS use the MQTT broker as the asynchronous communication bus for Inter-service communication. Inter-service communication protocol base on MQTT standard and IETF (The Internet Engineering Task Force) defined media types for Sensor Makeup Language (SenML) in JSON format. The user can follow EIS communication protocol or use the “WISE Sensor Network Abstract Layer” (WISESnail the lightweight WISEAgent) SDK to integrate a new service with the EIS eco-system.
+
=== [[PMQ_Architecture|hdd-pmq]] ===
  
=== hdd-pmq ===
+
    Industrial PCs often operate in the harsh environment with wide temperature range and high vibration, which will shorten the life of HDD and cause catastrophic failure. With WISE-PaaS/RMM solution and EIS PMQ module, S.M.A.R.T. code of Hard Disk can be real-time monitored, which can be used to predict the failure in the near future, providing related alerts or notification for customers to take actions accordingly. HDD PMQ module collects real-time hard disk S.M.A.R.T code from WISE-agent, fed into the PMQ library to make the failure prediction. HDD PMQ doesn’t send our real-time data to WISE-PaaS/RMM server. Instead, HDD PMQ send the alert message and corresponding notification if the failure has been predicted.
  
=== node-red ===
+
=== [https://nodered.org/ node-red] ===
  
==== wsn nodes ====
+
    Node-RED is available as open source and implemented by the IBM Emerging Technology organization. It provides a browser-based flow editor that easily wires together flows using the wide range nodes in the palette. Flows can be then deployed to the runtime in a single-click. The flows created in Node-RED are stored using JSON which can be easily imported and exported for sharing with others. With built in node.js, it can be run at the edge of the network or in the cloud. The node package manager (npm) ecosystem can be used to easily extend the palette of nodes available, enabling connections to new devices and services.
  
  [[IoTGateway/Node-Red_for_GW_EIS|Wireless Sensor Network (WSN) Nodes]] are supported on Advantech IoT Gateway and all provided features are basically described by REST API respectively. For users to quickly access the WSN features and build the prototype control flow of application before knowing the detailed REST API manipulation and programming, we provide the following Node-RED nodes to easily read the information and access functions of WSN on EIS.
+
====   [[IoTGateway/Node-Red_for_EIS|wsn nodes]] ====
  
==== hdd-pmq node ====
+
  Wireless Sensor Network (WSN) Nodes are supported on Advantech IoT Gateway and all provided features are basically described by REST API respectively. For users to quickly access the WSN features and build the prototype control flow of application before knowing the detailed REST API manipulation and programming, we provide the following Node-RED nodes to easily read the information and access functions of WSN on EIS.
  
 
== Management ==
 
== Management ==
Line 70: Line 80:
 
=== [http://www.webmin.com/ Webmin ] ===
 
=== [http://www.webmin.com/ Webmin ] ===
  
    EIS pre-installed the Webmin for system administration. It is a web-based interface open source project.Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely. See the standard modules page for a list of all the functions built into Webmin.
+
    EIS pre-installed Webmin for system administration. It is a web-based interface open source project.Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.
 +
 
 +
    Webmin is designed to allow the easy addition of new modules without changing any of the existing code. A module can be thought of as something like a Photoshop plugin or iPhone application - it can be written by someone other than the developers of Webmin and distributed under a license the developer chooses. You can refer the [http://doxfer.webmin.com/Webmin/Module_Development Module Development] for developing your module.
  
 
    EIS provides add-on modules in Webmin such as WISEAgent manage modules. WISEAgent manage: Configure the WISE-PaaS/RMM Server address, device name,device id, and connection status.
 
    EIS provides add-on modules in Webmin such as WISEAgent manage modules. WISEAgent manage: Configure the WISE-PaaS/RMM Server address, device name,device id, and connection status.
  
    EIS Webmin default account / password is "adv" and "adv".  
+
<span style="font-size:larger;">'''EIS Webmin default account / password is "<span style="color:#FF0000;">adv</span>" and "<span style="color:#FF0000;">adv</span>". &nbsp;'''</span>
  
==== To install webmin modules ====
+
==== Install webmin modules ====
  
 
[[File:Webmin webmin modules 1.831.jpg|center|1200x600px|Webmin webmin modules 1.831.jpg]]
 
[[File:Webmin webmin modules 1.831.jpg|center|1200x600px|Webmin webmin modules 1.831.jpg]]
<p style="text-align: center;">Page of webmin modules installation.</p>
+
<p style="text-align: center;">Webmin modules installation page</p><p style="text-align: center;"></p><p style="text-align: center;"></p>
[[File:Webmin webmin modules2 1.831.jpg|center|1200x600px|Webmin webmin modules2 1.831.jpg]]
+
<br/>[[File:Webmin webmin modules2 1.831.jpg|center|1200x600px|Webmin webmin modules2 1.831.jpg]]
<p style="text-align: center;">Choice Webmin module from local file.</p><p style="text-align: center;"></p>
+
<p style="text-align: center;">Choice Webmin module from local file.</p><p style="text-align: center;"></p><p style="text-align: center;"></p><p style="text-align: center;"></p>
 
==== WISE-Agent Setting / Status ====
 
==== WISE-Agent Setting / Status ====
  
[[File:Webmin wisecloud setting 1.831.jpg|center|1200x600px]]
+
&nbsp;Networking -> WISE Cloud Setting
<p style="text-align: center;">Page of WISEAgent setting</p>
 
  
[[File:Webmin wisecloud status connected 1.831.jpg|center|1200x600px]]
+
[[File:Webmin wisecloud setting 1.831.jpg|center|1200x600px|Webmin wisecloud setting 1.831.jpg]]
<p style="text-align: center;">WISEAgent connected to WISE-PaaS/RMM</p>
+
<p style="text-align: center;">Page of WISEAgent setting</p><p style="text-align: center;"></p>
 
+
&nbsp;Networking -> WISE Cloud Status
[[File:Webmin wisecloud status disconnect 1.831.jpg|center|1200x600px]]
 
<p style="text-align: center;">WISEAgent disconnect with WISE-PaaS/RMM</p>
 
  
 +
[[File:Webmin wisecloud status connected 1.831.jpg|center|1200x600px|Webmin wisecloud status connected 1.831.jpg]]
 +
<p style="text-align: center;">WISEAgent connected to WISE-PaaS/RMM</p><p style="text-align: center;"></p>
 +
<br/>[[File:Webmin wisecloud status disconnect 1.831.jpg|center|1200x600px|Webmin wisecloud status disconnect 1.831.jpg]]
 +
<p style="text-align: center;">WISEAgent disconnect with WISE-PaaS/RMM</p><p style="text-align: center;"></p>
 
=== [https://kitematic.com/ Kitematic] ===
 
=== [https://kitematic.com/ Kitematic] ===
  
 
&nbsp; &nbsp;&nbsp;EIS pre-installed the Kitematic for system administration.Kitematic is an open source project built to simplify and streamline using Docker on PC. Kitematic automates the Docker installation and setup process and provides an intuitive graphical user interface (GUI) for running Docker containers.&nbsp;
 
&nbsp; &nbsp;&nbsp;EIS pre-installed the Kitematic for system administration.Kitematic is an open source project built to simplify and streamline using Docker on PC. Kitematic automates the Docker installation and setup process and provides an intuitive graphical user interface (GUI) for running Docker containers.&nbsp;
  
User can easy to manage Docker container images and services by GUI.
+
== Cloud Solution ==
 +
 
 +
=== [[WISE-Agent|WISE-PaaS/RMM3.3 / WISE-Agent]] ===
 +
 
 +
&nbsp; &nbsp; EIS pre-installed the WISE-Agent&nbsp;connect to Advantech [[WISE-PaaS/RMM|WISE-PaaS/RMM]] Cloud Server. EIS services will publish to WISE-PaaS/RMM Cloud Server by WISE-Agent. Customer can access, control, and management these IoT devices and services with WISE-PaaS/RMM Cloud Server. EIS is responsible for acquisition of sensor data and forwarding meaningful data to Cloud for analysis and big data storage. Customer also develops its own handler integrate with WISE-Agent framework. You could refer &nbsp;[[WISE-Agent|WISE-Agent]]&nbsp;for detail information.
 +
 
 +
 
 +
=== WISE-PaaS/2.0 ===
 +
 
 +
==== WISE-PaaS/EnSaaS Management Portal ====
 +
 
 +
*WISE-PaaS/EdgeSense portal site
 +
 
 +
[[File:WISE-PaaS EnSaaS ManagPortal RMM.jpg|800x500px|WISE-PaaS EnSaaS ManagPortal RMM.jpg]]
 +
 
 +
==== How to install&nbsp;EI-Agent ====
 +
<pre>$mkdir ei-agent
 +
$git clone --branch release https://github.com/ADVANTECH-Corp/docker-edgesense-image-x86.git
 +
$cd docker
 +
$./deploy.sh converter EnSaaS</pre>
 +
 
 +
==== <span style="color:#FF0000;">Note: If you have installed ensaas-ei-agent. Please remove it and re-install the latest version.</span> ====
 +
 
 +
How to remove EI-Agent
 +
 
 +
$docker stop ensaas-ei-agent
 +
 
 +
$docker rm ensaas-ei-agent
 +
 
 +
$docker images&nbsp; &nbsp; -> to check&nbsp;version&nbsp;
 +
 
 +
$docker rmi advigw4x86/ensaas-ei-agent
 +
 
 +
[[File:Docker remove image.jpg|800x100px|Docker remove image.jpg]]
 +
 
 +
==== <span style="font-size:small;">Set up your WISE-PaaS2.0&nbsp;account and connect</span> ====
 +
 
 +
To get your "'''<span style="color:#FF0000;">IoTKey</span>'''" on WISE-PaaS/2.0 portal and Credential Server Site as below&nbsp;and fill into agent configuration
  
== Cloud Solution ==
+
System -> Agent Credential
 +
 
 +
[[File:WISE-PaaS IoTKey.jpg|800x300px|WISE-PaaS IoTKey.jpg]]
 +
 
 +
 
 +
<pre>$sudo vim ../EdgeSense/AgentService/config/agent_config.xml
 +
 
 +
/ ******    To fill your IoTKey and Credential URL ************************************************* /
 +
<CredentialURL>https://api-dccs.wise-paas.com/v1/serviceCredentials</CredentialURL>
 +
<IoTKey>2b7555b4-4313-4320-8b3b-1140350ec279</IoTKey>
 +
/ *************************************************************************************************** /
 +
$docker restart ensaas-ei-agent</pre>
 +
 
 +
==== Create a "Group" for device management ====
 +
 
 +
[[File:WISE-PaaS2.0 CreatGroup.jpg|800x300px|WISE-PaaS2.0 CreatGroup.jpg]]
  
=== WISE-PaaS / WISE-Agent ===
+
==== Add your device in this Group ( IoTGW device and WSN SenHub ) ====
  
&nbsp; &nbsp; EIS pre-installed the [[WISE-Agent|WISE-Agent]]&nbsp;connect to Advantech [[WISE-PaaS/RMM|WISE-PaaS/RMM]] Cloud Server. EIS services will publish to WISE-PaaS/RMM Cloud Server by WISE-Agent. Customer can access, control, and management these IoT devices and services with WISE-PaaS/RMM Cloud Server. EIS is responsible for acquisition of sensor data and forwarding meaningful data to Cloud for analysis and big data storage. Customer also develops its own handler integrate with WISE-Agent framework. You could refer &nbsp;[[WISE-Agent|WISE-Agent]]&nbsp;for detail information.
+
[[File:WISE-PaaS2.0 IoTGW SenHub Devices.jpg|800x300px|WISE-PaaS2.0 IoTGW SenHub Devices.jpg]]
  
= How to Guide =
+
= How To&nbsp; =
  
 
== Delopy EIS Image to USB or HDD Disk ==
 
== Delopy EIS Image to USB or HDD Disk ==
Line 115: Line 180:
  
 
'''Deploy the image to USB flash drive . Note: The deploy process takes about 15 minutes.'''
 
'''Deploy the image to USB flash drive . Note: The deploy process takes about 15 minutes.'''
<pre>gunzip EIS_V2.0.2_Ubuntu-14.04_x86_64_3.19_20170224.img.gz
+
<pre>gunzip EIS_V2.0.3_Ubuntu-14.04_x86_64_3.19_20170329.img.gz
sudo dd if=./EIS_V2.0.2_Ubuntu-14.04_x86_64_3.19_20170224.img of=/dev/sdx bs=4M; sync</pre>
+
sudo dd if=./EIS_V2.0.3_Ubuntu-14.04_x86_64_3.19_20170329.img of=/dev/sdx bs=4M; sync</pre>
  
  
Line 126: Line 191:
 
#Change the boot device to be the USB/HDD flash drive, then press F4 to save and exit
 
#Change the boot device to be the USB/HDD flash drive, then press F4 to save and exit
 
#System should boot up using the USB Flash Drive.
 
#System should boot up using the USB Flash Drive.
#Log in as user: '''adv'''&nbsp; password: '''adv'''
+
#Log in as user: <span style="color:#FF0000;">'''adv'''</span>&nbsp; password: <span style="color:#FF0000;">'''adv'''</span>
#The EIS Version 2&nbsp;is ready to use.
+
#The EIS Version 2.0&nbsp;is ready to use.
  
  
Line 134: Line 199:
 
<pre>#sudo fdisk /dev/sda
 
<pre>#sudo fdisk /dev/sda
 
  d -> 1    &nbsp;: delete partition 1
 
  d -> 1    &nbsp;: delete partition 1
  n -> p -> 2&nbsp;:  
+
d -> 2    &nbsp;: delete partition 2
 +
  n -> p -> 1&nbsp;: you can set how many size you want to set
 
  w          &nbsp;: write result
 
  w          &nbsp;: write result
 
#sudo reboot  
 
#sudo reboot  
Line 148: Line 214:
  
 
./deploy.sh update</pre>
 
./deploy.sh update</pre>
 +
 +
 +
 +
'''Run the Kitematic'''
 +
<pre>cd ~/Advantech/kitematic
 +
sudo ./run.sh</pre>
  
 
== Development ==
 
== Development ==
Line 154: Line 226:
  
 
Start and enter the&nbsp;WSN Simulator Docker Container bash&nbsp;
 
Start and enter the&nbsp;WSN Simulator Docker Container bash&nbsp;
<pre>$cd ~/Advantech /docker
+
<pre>$cd ~/Advantech/docker
  
 
$./deploy.sh wsn-sim.sh bash</pre>
 
$./deploy.sh wsn-sim.sh bash</pre>
Line 167: Line 239:
  
 
Start and enter the&nbsp;WSN Development Docker Container bash&nbsp;
 
Start and enter the&nbsp;WSN Development Docker Container bash&nbsp;
<pre>$cd ~/Advantech /docker
+
<pre>$cd ~/Advantech/docker
  
$./deploy.sh wsn-dev.sh</pre>
+
$./deploy.sh wsn-dev.sh bash</pre>
  
 
'''You can refer [[IoTGateway/WiseSnail|WISESnail]]&nbsp;for detail information.'''
 
'''You can refer [[IoTGateway/WiseSnail|WISESnail]]&nbsp;for detail information.'''
  
 
+
= EIS releases =
 
 
= '''EIS releases''' =
 
  
 
This is an overview that displays EIS versions and some stats and numbers for each release.
 
This is an overview that displays EIS versions and some stats and numbers for each release.
  
{| border="1" cellspacing="1" cellpadding="1" style="width:500px;"
+
{| border="1" cellspacing="1" cellpadding="1" style="width: 696px;"
 
|-
 
|-
 
| index
 
| index
 
| Version
 
| Version
 
| Date
 
| Date
| Release Note
+
| style="width: 88px;" | Platform
 +
| style="width: 154px;" | OS
 +
| style="width: 270px;" | Release Note
 
|-
 
|-
 
| 1
 
| 1
 +
| v2.0.1
 +
| 2016/12/06
 +
| style="width: 88px;" | x86_64 CPU
 +
| style="width: 154px;" | Not include OS
 +
| style="width: 270px;" | &nbsp;[[IoT_Gateway_with_Docker_Service|release-noet-EIS-v2.0.1]]&nbsp; &nbsp;
 +
|-
 +
| 2
 
| v2.0.2
 
| v2.0.2
 
| 2017/02/24
 
| 2017/02/24
| [[Media:Release-note_EIS-v2.0.2.pdf|release-note_EIS-v2.0.2]]
+
| style="width: 88px;" | ARK-2121L
 +
| style="width: 154px;" | Ubuntu 14.04 x86_64
 +
| style="width: 270px;" | &nbsp;[[Media:Release-note_EIS-v2.0.2.pdf|release-note_EIS-v2.0.2]]&nbsp; / [[Media:EIS_v2.0.2_SW_Spec.xlsx|Functional Specification]]
 
|-
 
|-
| <br/>
+
| 3
| <br/>
+
| v2.0.3
| <br/>
+
| 2017/03/29
| <br/>
+
| style="width: 88px;" | ARK-2121L
 +
| style="width: 154px;" | Ubuntu 14.04 x86_64<br/>
 +
| style="width: 270px;" | &nbsp;[[Media:release-note_EIS-v2.0.3.pdf|release-note_EIS-v2.0.3]]
 
|}
 
|}

Latest revision as of 02:59, 9 December 2019

Introduction

    This page introduces Advantech Edge Intelligence Server (EIS) for Internet of Things gateway solution.

    To develop an IoT product will cover various technical fields include: Sensor, Connectivity, Secure, Cloud, Storage, device maintenance, Edge/Cloud Analytics, System Integration, Device Hardware, and Application development, and so on. One the first challenges that many companies face is how to migrate to an IoT application while balancing design time, time to market, and risk. IoT data can be large in terms of volume and the applications typically have real-time requirements. Transmitting massive amounts of raw data over a network puts a tremendous load on network resources. In some cases, it is much more efficient to process data near its source and send only the data that has value over the network to a Cloud center. Edge computing is a distributed information technology (IT) architecture in which client data is processed at the periphery of the network, as close to the originating source as possible. Time-sensitive data in an edge computing may be processed at the point of origin by an intelligent device or sent to an intermediary server located in close geographical proximity to the client. Data that is less time sensitive is sent to the cloud for historical analysis, big data analytics, and long-term storage.

    Advantech EIS adopts the Edge computing Architecture for IoT gateway solution. EIS enables local IoT networks to perform edge intelligence to maximize energy efficiency, reduce privacy threats, easy implementation, modularization(containerized) and minimize latencies.


Microservice

    EIS adopted the Microservice Architecture pattern. Instead of building a single monstrous, monolithic application, the idea is to split your application into set of smaller, interconnected services. A service typically implements a set of distinct features or functionality, such as connectivity management, vertical application, etc. Each microservice is a mini-application that has its own hexagonal architecture consisting of business logic along with various adapters.

Benefits:

  • Consequently, individual services are much faster to develop, and much easier to understand and maintain
  • Enables each service to be developed independently by a team that is focused on that service
  • Enables each microservice to be deployed independently. It makes continuous deployment possible
  • Enables each service to be scaled independently

Docker Container

Architecture of docker container.jpg

    EIS software service runs as a Docker Container. Each service is independently. Customer can easily migrate application with Docker Container. For example, a customer’s application runs in CentOS. Customer can build a CentOS Container to service it and integrate with EIS system. It makes easily migrate your application into EIS system. The following describes the Docker Container technology and advantages.

    Containerization -- is an OS-level virtualization method for deploying and running distributed applications without launching an entire VM for each application. Instead, multiple isolated systems, called containers, are run on a single control host and access a single kernel.  As shown in above picture, containers share the same OS kernel as the host, containers can be more efficient than VMs, which require separate OS instances.

    Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in. Containers hold the components necessary to run the desired software, such as files, environment variables, and libraries. The host OS also constrains the container's access to physical resources -- such as CPU and memory -- so a single container cannot consume all of a host's physical resources.


EIS Software Service

EIS SW Architecture

   This picture describes the EIS design concept, not all services are ready for to be released. The EIS Software Architecture classified into 5 categories layers. Each service is now implemented by its own microservice. Services use MQTT broker as the communication bus. All microservices would expose an API that’s consumed by other microservices or clients. At runtime, each instance is a Docker container. This makes it easier to deploy distinct experiences for specific users, devices, or specialized use cases. The customer can easily develop and deploy its own service in EIS SW architecture.

  • The bottom layer of the architecture is the wired and wireless sensor network connectivity layer. Wire sensor supports various types (et. SCADA, Modbus, OPCUA…). Wireless Connectivity can be of various types (et. WiFi, Lora, 6LoPAN…). Network connectivity layer is charged for collecting, and management sensor hubs device. And transit protocol to MQTT protocol, and then pass to MQTT communication bus.
  • Second, SDK Layer provides various SW services like EIS REST API, HDD Fault Prediction Algorithm Service, and so on. The developer can call these services by REST API or MQTT protocol. The user can add its own service in this Layer (et. Machine Learning Platform, Data Base engine, and so on…).
  • Third, Flow-base Layer provides the Node-RED as the data flow design engine. The customer can easy to wire together flows using Advantech add-on nodes such as SUSI API, WSN, and HDD prediction nodes. It helps quickly design customer’s application logic by drag and drops easy way.
  • Fourth, Management and Presentation UI Interface Layer; EIS provides Webmin for system administration and IoT connection configuration. The Node-RED-UI for presenting IoT/sensor data.
  • Fifth, Cloud Layer. EIS is pre-installed the WISEAgent connect to WISE-PaaS/RMM Cloud Server. We also provide the 3rd party Cloud Service Agent (et. Microsoft Azure, IBM Bluemix, ARM mbed Cloud…).


Docker Container Services

REST API GW

EIS REST API Architecture.jpg

 

    REST API GW is the entry point for all EIS software services. The REST API handles requests in one of two ways. Some requests are simply routed to the appropriate service. It handles other requests by fanning out to multiple services. REST API service gathers pre-process data and generate RETS APIs for EIS software services as about picture. The REST API is also responsible for tasks such as load balancing, caching, access control, API metering, and monitoring, and can be implemented effectively using NodeJS express. The customer can easily and quickly develop its application, data flow, and web application by REST API.

dust-link

    Dust-link docker container is the linear dust network manager service. This service control and collecte of dust link SenHub by "/dev/ttyUSB0" UART port. It also send dust link manager and senhub data to mqtt-bus EIS system with WISESnail. User can access the dust-link manage interface and SenHub by RESTful API.

mqtt-bus

    EIS uses the MQTT broker as the asynchronous communication bus for Inter-service communication. Inter-service communication protocol base on MQTT standard and IETF (The Internet Engineering Task Force) defined media types for Sensor Makeup Language (SenML) in JSON format. User can follow EIS communication protocol or use Device  ( for device's sensor ) or WSN-Device ( for Wireless Sensor Network ) SDK to integrate a new service with the EIS eco-system.

hdd-pmq

    Industrial PCs often operate in the harsh environment with wide temperature range and high vibration, which will shorten the life of HDD and cause catastrophic failure. With WISE-PaaS/RMM solution and EIS PMQ module, S.M.A.R.T. code of Hard Disk can be real-time monitored, which can be used to predict the failure in the near future, providing related alerts or notification for customers to take actions accordingly. HDD PMQ module collects real-time hard disk S.M.A.R.T code from WISE-agent, fed into the PMQ library to make the failure prediction. HDD PMQ doesn’t send our real-time data to WISE-PaaS/RMM server. Instead, HDD PMQ send the alert message and corresponding notification if the failure has been predicted.

node-red

    Node-RED is available as open source and implemented by the IBM Emerging Technology organization. It provides a browser-based flow editor that easily wires together flows using the wide range nodes in the palette. Flows can be then deployed to the runtime in a single-click. The flows created in Node-RED are stored using JSON which can be easily imported and exported for sharing with others. With built in node.js, it can be run at the edge of the network or in the cloud. The node package manager (npm) ecosystem can be used to easily extend the palette of nodes available, enabling connections to new devices and services.

  wsn nodes

  Wireless Sensor Network (WSN) Nodes are supported on Advantech IoT Gateway and all provided features are basically described by REST API respectively. For users to quickly access the WSN features and build the prototype control flow of application before knowing the detailed REST API manipulation and programming, we provide the following Node-RED nodes to easily read the information and access functions of WSN on EIS.

Management

Webmin 

    EIS pre-installed Webmin for system administration. It is a web-based interface open source project.Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.

    Webmin is designed to allow the easy addition of new modules without changing any of the existing code. A module can be thought of as something like a Photoshop plugin or iPhone application - it can be written by someone other than the developers of Webmin and distributed under a license the developer chooses. You can refer the Module Development for developing your module.

    EIS provides add-on modules in Webmin such as WISEAgent manage modules. WISEAgent manage: Configure the WISE-PaaS/RMM Server address, device name,device id, and connection status.

EIS Webmin default account / password is "adv" and "adv".  

Install webmin modules

Webmin webmin modules 1.831.jpg

Webmin modules installation page


Webmin webmin modules2 1.831.jpg

Choice Webmin module from local file.

WISE-Agent Setting / Status

 Networking -> WISE Cloud Setting

Webmin wisecloud setting 1.831.jpg

Page of WISEAgent setting

 Networking -> WISE Cloud Status

Webmin wisecloud status connected 1.831.jpg

WISEAgent connected to WISE-PaaS/RMM


Webmin wisecloud status disconnect 1.831.jpg

WISEAgent disconnect with WISE-PaaS/RMM

Kitematic

    EIS pre-installed the Kitematic for system administration.Kitematic is an open source project built to simplify and streamline using Docker on PC. Kitematic automates the Docker installation and setup process and provides an intuitive graphical user interface (GUI) for running Docker containers. 

Cloud Solution

WISE-PaaS/RMM3.3 / WISE-Agent

    EIS pre-installed the WISE-Agent connect to Advantech WISE-PaaS/RMM Cloud Server. EIS services will publish to WISE-PaaS/RMM Cloud Server by WISE-Agent. Customer can access, control, and management these IoT devices and services with WISE-PaaS/RMM Cloud Server. EIS is responsible for acquisition of sensor data and forwarding meaningful data to Cloud for analysis and big data storage. Customer also develops its own handler integrate with WISE-Agent framework. You could refer  WISE-Agent for detail information.


WISE-PaaS/2.0

WISE-PaaS/EnSaaS Management Portal

  • WISE-PaaS/EdgeSense portal site

WISE-PaaS EnSaaS ManagPortal RMM.jpg

How to install EI-Agent

$mkdir ei-agent 
$git clone --branch release https://github.com/ADVANTECH-Corp/docker-edgesense-image-x86.git
$cd docker 
$./deploy.sh converter EnSaaS

Note: If you have installed ensaas-ei-agent. Please remove it and re-install the latest version.

How to remove EI-Agent

$docker stop ensaas-ei-agent

$docker rm ensaas-ei-agent

$docker images    -> to check version 

$docker rmi advigw4x86/ensaas-ei-agent

Docker remove image.jpg

Set up your WISE-PaaS2.0 account and connect

To get your "IoTKey" on WISE-PaaS/2.0 portal and Credential Server Site as below and fill into agent configuration

System -> Agent Credential

WISE-PaaS IoTKey.jpg


$sudo vim ../EdgeSense/AgentService/config/agent_config.xml

/ ******     To fill your IoTKey and Credential URL ************************************************* /
<CredentialURL>https://api-dccs.wise-paas.com/v1/serviceCredentials</CredentialURL>
<IoTKey>2b7555b4-4313-4320-8b3b-1140350ec279</IoTKey>
/ *************************************************************************************************** /
$docker restart ensaas-ei-agent

Create a "Group" for device management

WISE-PaaS2.0 CreatGroup.jpg

Add your device in this Group ( IoTGW device and WSN SenHub )

WISE-PaaS2.0 IoTGW SenHub Devices.jpg

How To 

Delopy EIS Image to USB or HDD Disk

To check USB or HDD Disk name

sudo fdisk -l 


Deploy the image to USB flash drive . Note: The deploy process takes about 15 minutes.

gunzip EIS_V2.0.3_Ubuntu-14.04_x86_64_3.19_20170329.img.gz
sudo dd if=./EIS_V2.0.3_Ubuntu-14.04_x86_64_3.19_20170329.img of=/dev/sdx bs=4M; sync


Boot for USB or HDD Disk

  1. Insert the USB Flash / HDD Drive into the ARK-2121L
  2. Boot up to the BIOS menu of your ARK-2121L by pressing ESC on the keyboard as it boots up.
  3. Change the boot device to be the USB/HDD flash drive, then press F4 to save and exit
  4. System should boot up using the USB Flash Drive.
  5. Log in as user: adv  password: adv
  6. The EIS Version 2.0 is ready to use.


Re-size EIS File System

#sudo fdisk /dev/sda
 d -> 1      : delete partition 1
 d -> 2      : delete partition 2
 n -> p -> 1 : you can set how many size you want to set
 w           : write result
#sudo reboot 
#sudo resize2fs /dev/sda1
// To check new partition size
#df -h 


Check and Upgrade the EIS Docker Service to latest version 

cd ~/Advantech/docker

./deploy.sh update


Run the Kitematic

cd ~/Advantech/kitematic
sudo ./run.sh

Development

WSN Simulator

Start and enter the WSN Simulator Docker Container bash 

$cd ~/Advantech/docker

$./deploy.sh wsn-sim.sh bash

Start running the wsn-simulator. It will simulate WSN connectivity and senhub and send data to mqtt bus. You can design and edit your wsn type and senhub information.

#./wisesim

Exit the container service

#exit

WSN Development Environment

Start and enter the WSN Development Docker Container bash 

$cd ~/Advantech/docker

$./deploy.sh wsn-dev.sh bash

You can refer WISESnail for detail information.

EIS releases

This is an overview that displays EIS versions and some stats and numbers for each release.

index Version Date Platform OS Release Note
1 v2.0.1 2016/12/06 x86_64 CPU Not include OS  release-noet-EIS-v2.0.1   
2 v2.0.2 2017/02/24 ARK-2121L Ubuntu 14.04 x86_64  release-note_EIS-v2.0.2  / Functional Specification
3 v2.0.3 2017/03/29 ARK-2121L Ubuntu 14.04 x86_64
 release-note_EIS-v2.0.3