Install and provision an Edge Intelligence gateway
This chapter explains the requirements for installing and provisioning a gateway, how to install a gateway, and how to connect the gateway to Edge Intelligence core.
The Edge Intelligence gateway is a small footprint software that provides data ingestion from automation and IoT devices over various protocols and automatically tiers the data from the gateway to the Edge Intelligence core software.
Process overview
Use the following process to install and provision a gateway.
- Install a gateway image on the gateway device.
- Add a gateway to the device inventory in Edge Manager.
- Use either the Edge Technician mobile app or a command line interface (CLI) to provision the gateway.
- Verify the status of Edge Intelligence gateway services in Edge Manager.
Prepare for Edge Intelligence gateway installation
Understand the requirements for installing a gateway and perform the necessary installation steps.
Gateway hardware requirements
For gateway devices, Edge Intelligence supports hardware similar to the following, which has been validated with the Edge Intelligence gateway software stack.
Hardware | Description |
NUC (i5) |
|
NUC (i7) |
|
POC-351VTC |
|
Gateway installation prerequisites
The following prerequisites apply before installing the Edge Intelligence gateway.
- Edge Intelligence gateway services require Red Hat Enterprise Linux 7.8 or 8.2.
- Docker support:
- For RHEL 8.2: Docker 19.03.
- For RHEL 7.8 and CentOS 7.8: This is done by Hitachi Vantara (ver Moby 18.09)
- For RHEL 8.2, note the following:
- You must install Docker before installing the Edge Intelligence gateway.
- To keep the connection open between gateway containers, you must set FirewallBackend to iptables in /etc/firewalld/firewalld.conf.
- The core and gateway host names must be unique.
- If the gateway log file becomes too big and occupy the Docker volume, change the log file size and the number of log files retained in
daemon.json
. For further information, refer to the Docker documentation. - The NetworkManager must be active (running).
Perform the following steps to run NetworkManager:
- Log in as root user on the gateway node.
- Verify that NetworkManager is active by running the command systemctl status NetworkManager.
- If NetworkManager is not active, run the command systemctl start NetworkManager.
- Verify that NetworkManager is now active by running the command systemctl status NetworkManager again.
NetworkManager shows as
active
.
Port configuration requirements (gateway)
The Edge Intelligence gateway services provide two ways to collect data (MQTT messaging and Modbus adapter), and two ways to send data to Edge Intelligence core (MQTT messaging and REST calls).
Check the following gateway message brokers and services to determine if your service requires the corresponding ports to be open.
Service | Description | Default port | Optional install | Default login | Links |
MQTT - Mosquitto | Enables messaging over MQTT | 30883 | No | admin | Documentation: https://mosquitto.org/ |
Service | Description | Default port | Optional install | Links |
Hiota Agent | Provisioning agent for the gateway | 8443 | No | N/A |
Install an Edge Intelligence gateway
Before you begin
- Always reboot the gateway device before you start the gateway installation process.
- To download the gateway software installation package, go to https://support.pentaho.com and log in.
Gateway installation package: lumada-edge-intelligence-4.2.0-gateway.tar.gz
Procedure
Log in as a root user on the gateway device.
Download the Edge Intelligence gateway installation package.
Open the software package by running the following command.
tar zxvf lumada-edge-intelligence-4.2.0-gateway.tar.gz
A new folder is created: release-4.2.0.Navigate to the new folder by running the following command:
cd release-4.2.0
Run the gateway installer:
./gateway-install.sh [<inventory id>]
NoteAs a best practice, you should pass an Inventory ID to the installer. The Inventory ID that you provide in the installer must be identical to the one you provide when creating the corresponding gateway device in the device inventory in Edge Manager (see Add a gateway to the device inventory) so make sure to record it. After running the gateway installer, the inventory ID will reside in the /etc/hiota/agent/configs/configuration.yaml file. If you use a different one in the device inventory, modify the configuration.yaml file and restart hiota-agent using this command:The gateway is successfully installed if no error messages are displayed.systemctl restart hiota
Add a gateway to the device inventory
You can add a gateway to the device inventory in Edge Manager, so that data routes can be configured to collect data from the gateway device.
Procedure
In Edge Manager, select the Device tab.
Click Add Device.
Enter the following information:
Field Description Name Enter a name for the device. Device Type Specify the type of device to be added. Gateway is currently the only option. Inventory ID Specify the unique identifier for the device. It must match the Inventory ID that is set during the gateway installation. Location (Optional) Specify the location of the device. Description (Optional) Specify a description for the device. Additional Properties (Optional) Click Add Property to create additional fields to describe the device if necessary, such as an RFID, a boolean status, or a URL. You can add properties individually or import a set of properties from a JSON file. Then click Apply. Enable Polling Select to enable polling on the management plane. It allows the gateway to periodically connect to the core server and pull tasks for controlling and monitoring the device at certain time intervals instead of keeping connections open. NoteToggling the polling parameters does not affect data collection.Polling Interval Set how frequently the gateway polls for new connect messages. Polling Retry Interval Specify the period of time between the end of the timeout period of the last retry and the next retry. Polling Max Retries Specify the maximum number of retries in one polling session. Endpoint Database Defragmentation Schedule Select a database defragmentation schedule to keep the database optimized: - Monthly
- Weekly
- Daily (Midnight)
- Hourly
Click Add to add the new device to the repository.
Results
Once the gateway device is created, you can configure it to receive data. By provisioning the gateway using the Edge Technician mobile app (see Edge Intelligence mobile apps), you can create data routes to specify where the data will flow to. See how to register and provision an Edge Intelligence gateway elsewhere in the documentation.
Register and provision a gateway using an iOS device
Register your devices and provision the Edge Intelligence gateway with your mobile device.
Set up an Edge Intelligence core profile
The Edge Technician app for iPhone®, iPad®, iPod touch®, and macOS Catalina® is required to provision a gateway. The app requires iOS 13 or later and is available for download from the App Store®.
Procedure
Download the Edge Technician app for iPhone, iPad, iPod touch, and macOS Catalina touch: https://apps.apple.com/us/app/edge-technician/id1491127818
Install the Edge Technician app on your mobile device.
Ensure that your device has a network connection to both Edge Intelligence core and the gateway that you want to provision.
Ensure that the gateway has an active communication channel to Edge Intelligence core in Edge Manager.
Open the Edge Technician app and swipe left to open the Navigation menu.
Swipe left again to open the Connections menu.
Select the plus sign to add a core connection.
Enter a friendly Name for Edge Intelligence core.
Enter the Hostname / IP for Edge Intelligence core.
Enter the User Name and Password for logging in to Edge Intelligence core.
Select Fetch CA Certificate.
Select Fetch Client ID and Secret to get token information.
Select Test Connection to connect to Edge Intelligence core.
Select Save on the upper right.
Results
Provision an Edge Intelligence gateway
You can provision a gateway using the Edge Technician app:
Procedure
Open the app and register the gateway:
Select the plus sign to start the provisioning process for a gateway device.
Use the Select Device link to select the device from the device inventory.
Establish a connection to the gateway device.
If you are within range of the device, you can use Connect with Bluetooth or Scan QR Code to load the device information. If not, enter the gateway IP address.Select Test Connection to connect to the gateway.
The Test Connection icon changes to a green connection symbol.Select Save.
The Provision Devices page displays the registered gateway device.
Select the folder icon in the upper left of the device box.
Select Connect to retrieve the state of the device.
Select Network to update or validate network settings.
Select Configure to update or validate time synchronization.
Select Configure to update or validate the software on the gateway.
Select Configure to commission the device to connect to Edge Intelligence core.
Verify the status of the gateway in the device inventory in Edge Manager.
View the status of the gateway device on the Device tab in Edge Manager. When the provisioning process is successfully completed, you see the following:
- Status: Online.
- Device State: Ready.
Results
- Status: Online.
- Device State: Ready.
Register and provision a gateway using CLI
The Lumada Intelligence Tool (LIT) is a command line interface (CLI) application that lets you create and enroll devices using the command line. This application is useful in cases where the Edge Intelligence iOS apps cannot be installed or connected (for example, by Android users), but you still need to enroll a gateway device with Edge Intelligence core.
Manage LIT installation on Linux or Mac
This section explains how to install, update, or uninstall the LIT application on Linux or Mac OS X.
LIT provides all the commands needed to successfully register and provision a gateway for Edge Intelligence.
Install LIT on Linux or Mac
You can install LIT on Linux or Mac OS X using this procedure.
Procedure
Download the LIT application package from support.pentaho.com.
- For Linux: lumada-edge-intelligence-cli-linux-4.2.0.tar.gz
- For Mac: lumada-edge-intelligence-cli-mac-4.2.0.tar.gz
Unarchive the tarball on the target device:
Linux:cd <install_dir>/ tar -zxf lumada-edge-intelligence-cli-linux-4.2.0.tar.gz
Mac:cd <install_dir>/ lumada-edge-intelligence-cli-mac-4.2.0.tar.gz
Windows:cd <install_dir>/ <your preferred unzip utility> lumada-edge-intelligence-cli-windows-4.2.0.zip
If your cluster FQDN cannot be resolved by DNS, set your target cluster FQDN to /etc/hosts on the machine where you are running this CLI.
Install LIT by running the installation script:
cd <install dir>/cli-pkg-<os>/ sh install.sh
Results
Update LIT on Linux or Mac
You can update the LIT application to the latest version on Linux or Mac OS X by running the LIT update script .
Procedure
Navigate to the directory where the update script resides:
cd <install dir>/cli-pkg-<os>/
where<os>
is your operating system, either mac or linux.Run the update script:
sh update.sh
Results
Verify the LIT installation on Linux and Mac
After installing or updating the LIT application, you should verify that the operation was successful.
Procedure
Verify that the application was installed to $HOME/.lit.
Example:```bash $ ls -l $HOME/.lit drwxr-xr-x 2 root root 17 Jan 15 03:31 bin drwxr-xr-x 2 root root 100 Jan 15 03:39 configs drwxr-xr-x 2 root root 21 Jan 15 03:34 logs
Verify that the configuration was moved to $HOME/.lit/configs.
Example:```bash $ ls -l $HOME/.lit/configs/ -rwxrwxr-- 1 root root 144 Mar 26 20:12 lit_app_current.json -rwxrwxr-- 1 root root 190 Mar 26 20:12 lit_app.json -rwxrwxr-- 1 root root 65 Mar 26 20:12 lit_gw_current.json -rwxrwxr-- 1 root root 93 Mar 26 20:12 lit_gw.json
Verify that the binaries were moved and have execute permissions:
```bash $ ls -l $HOME/.lit/bin -rwxrwxr-- 1 root root 7698887 Mar 26 20:14 lit ```
Check that LIT is properly installed by running this command:
lit version
Uninstall LIT on Linux or Mac
You can uninstall the LIT application on Linux or Mac OS X by running the LIT uninstall script:
Procedure
Navigate to the LIT application directory:
cd <install dir>/cli-pkg-<os>/
where<os>
is your operating system, either mac or linux.Run the LIT uninstall script:
sh uninstall.sh
Results
Manage LIT installation on Windows
This section explains how to install, update, or uninstall the LIT application on Windows.
LIT provides all the commands needed to successfully register and provision a gateway for Edge Intelligence.
Install LIT on Windows
These are the steps needed to install LIT on Windows.
Procedure
Download the LIT application package from support.pentaho.com:
lumada-edge-intelligence-cli-windows-4.2.0.zipUnarchive the zip file in the installation directory of the target device.
Install LIT by running the installation script or by double-clicking the file install.bat:
cd <install dir>/cli-pkg-windows/ install
If you are running install.bat as a non-admin user, adding the binary path to thePATH
environment value will fail. In this case, you can take one of the following actions:- Use the LIT application in %HOMEPATH%/.lit/bin.
- Manually add %HOMEPATH%/.lit/bin to the
PATH
environment value. - Retry the installation as an admin user.
Results
You can view available LIT commands by running this command:
lit -help
Update LIT on Windows
You can update the LIT application to the latest version on Windows by running the LIT update script.
Procedure
Navigate to the directory where the update script resides:
cd <install dir>/cli-pkg-windows/
Run the update script (update.bat):
update
Results
Verify the LIT installation on Windows
After installing or updating the LIT application, you should verify that the operation was successful.
Procedure
Verify that the application was installed to %HOMEPATH%/.lit.
Example:dir 04/20/2021 02:32 PM <DIR> bin 04/20/2021 02:32 PM <DIR> configs 04/23/2021 01:55 PM <DIR> logs
Verify that the configuration was moved to %HOMEPATH%/.lit/configs.
Example:cd %HOMEPATH%/.lit/configs dir 04/06/2021 03:25 PM 2 lit_app.json 04/06/2021 03:25 PM 2 lit_app_current.json 04/06/2021 03:25 PM 2 lit_gw.json 04/06/2021 03:25 PM 2 lit_gw_current.json
Verify that the binaries were moved and have execute permissions:
cd %HOMEPATH%/.lit/bin dir /Q 04/06/2021 03:25 PM 7,811,072 HDS\user_name lit.exe
Check that LIT is properly installed by running this command:
lit version
Uninstall LIT on Windows
You can uninstall the LIT application on Windows by running the LIT uninstall script:
Procedure
Navigate to the LIT application directory:
cd <install dir>/cli-pkg-windows/
Run the LIT uninstall script (uninstall.bat):
uninstall
Remove %HOMEPATH%.lit\bin from the
This removal is necessary because the uninstall script does not delete the CLI path from thePATH
environment value.PATH
environment variable.
Results
LIT command options
The following overview provides a list of all available CLI command options.
$ lit -help Lumada Intelligence Tool (lit) version 1.0.0 (2) lit version (-version, -v) - print version help (-help, -h) - print usage configuration (configuration, cfg, c) - Config options appliance (app, a) list (l) - list the configuration options select (s) - select a configuration option -name=<config_name> - Select the current configuration (req) current (c) - current configuration add (a) - add configuration -name=<config_name> - Name of the new configuration (req) -desc=<config_desc> - Description of the new configuration (req) -ip=<config_ip> - IP of the new configuration (req) -user=<config_user> - Username of the new configuration (req) -pwd=<config_pwd> - Password of the new configuration (req) -keycloak_pwd=<config_keycloak_pwd> - Keycloak Password of the new configuration (req) delete (d) - delete configuration -name=<config_name> - Name of the new configuration (req) gateway (gw, g) list (l) - list the configuration options select (s) - select a configuration option -name=<config_name> - Select the current configuration (req) current (c) - current configuration add (a) - add configuration -name=<config_name> - Name of the new configuration (req) -desc=<config_desc> - Description of the new configuration (req) -ip=<config_ip> - IP of the new configuration (req) delete (d) - delete configuration -name=<config_name> - Name of the new configuration (req) device (d) - Device commands list (l) - list all the devices get (g) - get a devices -id=<device_id> - Device ID to query (req) create (c) - create a devices -name=<device_name> - Device name (req) -inventory_id=<device_inventory_id> - Unique inventory Id (req) -device_type={appliance|gateway} - Device type (req) -desc=<description> - Device description -location=<location_description> - Device location description delete (d) - delete a devices -id=<device_id> - Device ID to delete (req) gateway (gw, g) - Gateway commands state (s) - Get the gateway state -id=<inventory_id> - Inventory id to log into the gateway enroll (e) - Enroll a devices -id=<device_id> - Device ID to enroll (req)
Configure and enroll a device using LIT
To enroll a gateway, you need to update the configuration, so LIT knows how to connect to core and gateway devices.
Add or update a core configuration using LIT
To set up the connection between LIT and Edge Intelligence core, first update the core configuration:
Procedure
Add your core configuration:
lit cfg app add -name=<core_name> -desc=<core_description> -domain=<cluster_fqdn> -ip=<core_ip/loadbalancer_ip> -user=<core_admin_username> -pwd=<core_admin_password> -keycloak_pwd=<core_keycloak_password>
The following table describes the LIT parameters:
Parameter Description name Unique name of Edge Intelligence core. desc Description of Edge Intelligence core. domain Core/load balancer Fully Qualified Domain Name (FQDN) of the cluster. ip Core/load balancer IP address. user Admin username created during installation of Edge Intelligence core. pwd Admin password created during installation of Edge Intelligence core. keycloak_pwd Keycloak password created during installation of Edge Intelligence core. NoteThe added core connection information is saved in .lit/configs/lit_app.json. Multiple sets of core connection information can be created.List the configurations available to LIT:
lit cfg app list
Sample command output:$ lit cfg app list Appliance Config Options: Name: <core_name> Desc: <description> IP Address: <cluster_ip_address> Cluster FQDN: <cluster_fqdn>
Select the core configuration you want to connect to:
lit cfg app select -name=<core_name>
NoteThe selected core connection information is saved in the following location: .lit/configs/lit_current_app.jsonTo verify that LIT is connecting to the correct core, run the following command:<core_name>
has to be identical to<core_name>
in the previous step.lit cfg app current
Test the connection.
Use thelit device list
command to verify that LIT can access and talk to the Edge Intelligence platform by listing all currently connected devices. The command output should show at least the auto-created core device.$ lit device list Device list: Device Info: AssetId: <asset_id> Name: <name> Hostname: <hostname> InventoryId: <inventory_id> Description: Auto-created Appliance Device LocationDescription: ImageMimeType: DeviceType: appliance DateCreated: 2020-04-16T23:48:41Z State: ready
Add or update a gateway configuration using LIT
To set up the connection between LIT and Edge Intelligence core, you need to update the gateway configuration.
Procedure
Add your gateway configuration:
lit cfg gw add -name=<gw_name> -desc=<gw_description> -ip=<gw_ip_addr>
NoteThe added gateway connection information is saved in the following location: .lit/configs/lit_gw.json. LIT can be used to enroll multiple gateways by adding multiple gateway configurations.Parameter Description name Unique name of the gateway device. desc Description of the gateway device. ip IP address of the gateway device. List and select the configuration to be used:
lit cfg gw list
Sample command output:$ lit cfg gw list Gateway Config Options: Name: p2rhgw16 Desc: p2rhgw16 URL: <gw_ip_addr>
Select the gateway configuration for the gateway you want to connect to:
lit cfg gw select -name=<gw_name>
The selected gateway connection information is saved in the following location: .lit/configs/lit_current_app.jsonTo verify that LIT is connecting to and enrolling the correct gateway, use the following command:lit cfg app current
Create and enroll gateway device using LIT
Before enrolling a gateway with Edge Intelligence core, you need to create a gateway.
There are two ways to create a gateway:
- From the Edge Manager user interface.
- Using the LIT command to create a gateway from the CLI.
Procedure
Check which core device the gateway will be created on to understand which one LIT will connect to:
lit c a c
Create the gateway:
lit d c -name=<gateway_name> -inventory_id=<gateway_inventory_id> -device_type=gateway
Forinventory_id
, make sure to use the same unique inventory ID that was set on the gateway device during installation.Example:$ lit d c -name=p2rhgw16 -inventory_id=p2rhgw16 -device_type=gateway SUCCESSFULLY Created Device Device Info: DeviceId: <device_id> Name: <device_name> Hostname: InventoryId: <inventory_id> Description: LocationDescription: ImageMimeType: DeviceType: gateway DateCreated: 2021-04-02T21:45:14Z State: inventory
Enroll the created device.
Once the device is created, LIT will show the newly createdDeviceId
. This will be passed on to the enrollment command.lit g e -id=<gateway_device_id>
If you do not know theDeviceId
, use the following command to get all gateway device information from Edge Intelligence core:lit d l
Results
Delete and unenroll a gateway using LIT
After the device is created, LIT displays the newly created DeviceID. This ID is passed on to the enrollment command. If you delete a device that has been enrolled, it automatically goes through the unenrollment process, first resetting the device, then deleting the asset metadata of the device.
Procedure
Log in to the gateway as a root user using SSH.
Delete the device with the relevant device ID.
lit delete device -id=<gateway_device_id>
Results
Verify gateway services in Edge Manager
Procedure
On the Device tab, select the name of the gateway device.
Select the Software tab.
On the namespace list, select Hiota Gateway.
Review the status for each software service. All services must be running.
Uninstall an Edge Intelligence gateway
Procedure
Connect to the gateway device via SSH.
Log in as a root user on the gateway.
Navigate to the product installation folder:
cd release-4.2.0
Run the uninstall script:
./gateway-uninstall.sh
Enter y when prompted to uninstall.
If no errors display when the process completes, the gateway has been successfully uninstalled.