Difference between revisions of "EIS Docker Container Base"

From ESS-WIKI
Jump to: navigation, search
Line 75: Line 75:
 
'''You could refer [[WISE-Agent|WISE-Agent]] for WISEAgent detail information.'''
 
'''You could refer [[WISE-Agent|WISE-Agent]] for WISEAgent detail information.'''
  
=  =
+
 
  
 
= How to Guide =
 
= How to Guide =

Revision as of 03:25, 21 February 2017

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.


Docker Container

    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

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

api-gw

EIS REST API Architecture.jpg

 

    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 figure 7. 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.

You can refer EIS RESTfulAPI ProcWSNData for detail information.

dust-link

mqtt-bus

    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.

hdd-pmq

node-red

wsn nodes

  Wireless Sensor Network (WSN) is 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.

You can refer IoTGateway/Node-Red for EIS for detail information.

hdd-pmq node

Management

Webmin 

    EIS pre-installed the Webmin for system administration as figure 14. 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.

    Advantech also provides add-on modules in Webmin such as WSN Management, and WISEAgent manage modules. WSN Management: Show and manage the WSN connectivity and sensor hub device. WISEAgent manage: Configure the WISE-PaaS/RMM Server address, device name, and connection status.


Kitematic

Cloud Solution

WISE-PaaS / 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.

You could refer WISE-Agent for WISEAgent detail information.


How to Guide

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.

sudo dd if=./EIS_V2.0.2_Ubuntu-14.04_3.19_20170220.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 is ready to use.


Re-size EIS File System

#sudo fdisk /dev/sdb
 d -> 2      : delete partition 2
 n -> p -> 2 : 
 w           : write result
#reboot 
#resize2fs /dev/sdb2


Check and Upgrade the EIS Docker Service to latest version 

cd ~/Advantech/docker

./deploy.sh update


Development

WSN Simulator

Start and enter the WSN Simulator Docker Container bash 

$cd ~/Advantech /docker

$./deploy.sh wsn-sim.sh

You can design and edit your wsn type and senhub information. You can refer IoTGateway/Net HAL Simulator for detail information.

Start running the wsn-simulator. It will simulate WSN connectivity and senhub and send data to mqtt bus.

#./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