Edge Gateway Installation and Basic Configuration

From Datonis
Revision as of 12:49, 25 November 2020 by Yash (talk | contribs)
Jump to: navigation, search
Edge Gateway Home > Installation and Basic Configuration

Purpose

This document describes the procedure to employ the revised Datonis Edge Gateway in your environment.

System Requirements

Operating System

The Datonis Edge Gateway is certified to run on:

  • Windows 7 or above
  • Linux 3.x kernel or above

Memory Requirements

Recommended free memory requirement to run Edge Gateway is 512 MB+.  Available free memory can be checked on Linux using command 'free -m'.

Edge gateway can be started with minimum 64 MB available free memory in the constrained environments.

Datonis Cloud Connectivity Protocols

  • HTTP (80)
  • HTTPS (443)
  • MQTT (1883)
  • MQTTS (8883)

Internet Connectivity

Internet connectivity is required so that the gateway can do outbound connections to either of the ports (80 - HTTP, 443 - HTTPS, 1883 - MQTT, 8883 - MQTTS).

For HTTP/HTTPS, you can also configure a HTTP proxy if there is no direct internet connectivity available.

Java

Gateway needs Java 1.8 or higher to work. Please download Java from Oracle site.

Supported Data Sources

The Datonis Edge Gateway supports following data sources (via configurable adapters) to collect data and push it to the Altizon’s Datonis Platform.

Modbus Adapter

OPC UA Adapter

OPC DA Adapter

HTTP Adapter

MTConnect Adapter

CSV Adapter

XML Adapter

EtherNet/IP Adapter

MQTT Adapter

PROFINET Adapter

Script Adapter (Push)

Script Adapter (Pull)

Package Structure

Before Install

datonis-edge-x.x.x
  |--- bin
        |--- commons-daemon-1.0.15
        |--- scripts
  |--- config
  |--- plugins
        |--- altizon
        |--- common
        |--- equinox_3.8.1
        |--- kura
  • bin directory contains all the scripts required to install/run the Datonis Edge Gateway.  install_edge_service.bat will install gateway as a windows service.  uninstall_edge_service.bat will uninstall windows service, note that it does not delete copied files.
  • config directory contains initial configuration of the gateway, these config files will be copied and modified in various directories during installation. Gateway will refer to the copied files further. You may not need to update any configuration as configuration changes can be done via browser UI.  log4j.properties can be modified to control logging of the gateway.
  • plugins directory contain all the plugin jars required for gateway to run

After Install

datonis-edge-x.x.x
  |--- bin
  |--- config
  |--- plugins
  |--- data
        |--- db
        |--- keystore
        |--- paho-persistence
        |--- snapshots
  |--- tmp
  |--- log
  |--- packages
  • data directory contains the application database (db), saved configurations (snapshots), ssl configurations (keystore) and transport data (paho-persistence)
  • log directory contains gateway logs and service logs
  • tmp directory contains the modfiied config files that are specific to the current installation, this directory will be used by running gateway to refer to initial configuration
  • packages directory holds the runtime plugin packages installed via console ui

Installation

Windows

On windows, below scripts are present in the bin directory

  • install_edge_service.bat Runnning this batch file will install gateway as Windows service that will have automatic start-up and will run in the context of localsystem account. The name of the installed service is DatonisEdge (display name: Datonis Edge).
    • To change the service name (or to install different Edge services), add option --winservicename DatonisEdge-2 at the end of the command in the install_edge_service.bat and uninstall_edge_service.bat scripts.
    • To change the Java Heap Memory limit, modify the --jvmarg Xmx512m option in the script. E.g. change the xmx512m to xmx1024m
    • To change the Data Directory path, add option --datadirpath "C:\data"
  • uninstall_edge_service.bat Running this batch file will stop and uninstall DatonisEdge service.
  • start_edge_debug.bat This batch file will start gateway as a console OSGi application where debug commands can be sent to OSGi console to check which plugins are loaded.
  • stop_edge_debug.bat This batch file will kill gateway service and should be used in rare circumstances. Windows service can be stopped from Service Manager application (services.msc). Console application can be stopped by typing Ctrl+C in the application window or typing Close command.

After the windows service is installed, the following configuration can be done in Windows Services -> DatonisEdge -> Properties

  • Startup type - Automatic (Delayed Start)
  • Recovery - First Failure: Restart the Service

Linux

On linux, below bash scripts are present in bin directory

  • install_edge_service.sh This sh script will start gateway as a linux service. The service will run in context of root user. Java must be installed on that system in root context. The name of the installed service is datonis-edge.
  • uninstall_edge_service.sh Running this script will stop and uninstall datonis-edge service.
  • start_edge_service.sh This will start installed datonis-edge service.
  • stop_edge_service.sh This will stop datonis-edge background service
  • start_edge_debug.sh This script will start gateway as a console OSGI application, where user can interact with OSGI console for advanced activities.
  • stop_edge_debug.sh This script will send kill signal to running gateway application. User can stop OSGI console application by using CTRL+C in terminal. This script provide same mechanism for background tasks.

Docker

Datonis Edge can be installed in the form of Docker container from 5.2 release onward. The Docker image is based on minimal Debian with only necessary dependencies making it lightweight. Docker container supports easy upgrade too. In order to switch to newer release, one has stop old container and run new command line. Container installation inherently eliminates the need for installing dependencies such as particular version of JRE etc. Its also easy to change default ports of web console to different ports in case default ports are used by some other service.

  • docker command line to install (example build no. 5.2.585) docker run --name datonis-edge-5.2.585 --mount type=volume,source=edge-vol,target=/opt/datonis-edge-data --publish 8080:8080 --publish 8443:8443 --detach altizon/linux-edge:5.2.585

Gateway Configuration

After installation Gateway Configuration can be accessed via https://127.0.0.1:8443/edge or http://127.0.0.1:8080/edge

Changing Web Console Credentials

The default console username and password are admin/admin. This can be changed via Services → Web Console settings.

Web-console-edge-1.png

Changing Access Key and Secret Key

The gateway requires access key and secret key in order to connect to Datonis platform. These keys can be changed via Cloud Services → EdgeCloudService Service settings.

Cloud-service-edge.png

Changing Transport Mechanism and Data Service Settings

By default gateway will send data using secure Mqtt transport which is recommended. The transport can be changed to Http via turning on setting connect.use-http-transport found at Cloud Services → EdgeDataService.

Other EdgeDataService related settings are self documented and need to be changed in rare cases.

Data-service-edge.png

Using Http Proxy to connect to Datonis

If Http Transport is selected to communicate with Datonis then its possible to use Http Proxy for Datonis Platform connectivity. Setting use-proxy has to be enabled and other proxy.* settings need to have appropriate values.

These settings can be accessed via Cloud Services → HttpDataTransport.

Http-transport-edge.png

Device Tab

This tab shows information about Gateway Runtime and underlying device info

  • Profile  - lists Device information, Hardware information, Software information and Java details.
  • Bundles - lists OSGi bundles loaded by the gateway at that time
  • Threads - lists threads consumed by gateway
  • System Properties - lists configuration parameters of gateway jvm
  • Command - for future use

Device-edge.png

Settings Tab

This tab allows to set system wide settings

  • Snapshots - this page allows to download currently applied configuration to the system in a single xml file. This also provides the facility to rollback, upload and apply kind of functionality. The Upload and Apply is particularly useful in case of upgrade or moving installation to some other directory.
  • SSL Configuration - this page allows details out the certificate store path used by the gateway. The default keystore password is changeit. This can be changed if needed. This certificate store (keystore) will store Server SSL certificate and Device SSL certificate.
  • Server SSL Certificate - this is a public certificate that will be stored as the trusted certificate. This certificate details needs to be in rfc text format i.e. pem file format.
  • Device SSL Certificate - the device SSL certificate is private public key pair of the gateway certificate. In adapter communication where mutual authentication is needed the required certificate with private key can be installed from this page. The Private Key and Certificate text has to be in pem file format.

Setings-edge.png

Other Settings

  • The Status denotes whether Datonis Platform is accessible via selected transport i.e. Mqtt or Http. Note that at present, this does not check whether valid access and secret key has been entered or not.
  • The Packages tab allows to deploy custom bundles/plugins in the gateway e.g. any third party adapter.

Setting Alerts

Once the data is live and is sent to Datonis, Absence of Data Rules should be created on Datonis so as to get alerts if there is any issue.

Please refer to https://docs.datonis.io/wiki/Datonis:Creating_Rules#Absence_of_Data_Rule.

Adapter Configuration

Refer to Adapter Common Configuration Page for more details