EIS Docker Container Base

From ESS-WIKI
Revision as of 04:14, 21 February 2017 by Eric.liang (talk | contribs)
Jump to: navigation, search

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.


EIS Software Service

   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.

EIS SW Architecture

Docker Container Services

api-gw

EIS REST API Architecture.jpg

  The 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 Solutions

WISE-PaaS / WISE-Agent

EIS is pre-installed the WISEAgent connect to WISE-PaaS/RMM Cloud Server. You could refer WISE-Agent for detail information.

Specification

Release Note

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