Difference between revisions of "MISC-TN-005: Running AWS Greengrass Core on SBCSPG"

From DAVE Developer's Wiki
Jump to: navigation, search
(Setting up the edge device)
Line 50: Line 50:
  
 
Then, the root file system has to be configured according to the requirements described [https://docs.aws.amazon.com/en_us/greengrass/latest/developerguide/setup-filter.other.html here].
 
Then, the root file system has to be configured according to the requirements described [https://docs.aws.amazon.com/en_us/greengrass/latest/developerguide/setup-filter.other.html here].
 +
 +
 +
  
  
  
 
root@sbcspg:~# route add default gw 192.168.0.254 eth0
 
root@sbcspg:~# route add default gw 192.168.0.254 eth0
 
  
 
==Configuring AWS Greengrass Core on cloud side==
 
==Configuring AWS Greengrass Core on cloud side==

Revision as of 10:11, 6 August 2019

Info Box
SBCSPG-1.jpg Applies to SBCSPG
Warning-icon.png This technical note was validated against specific versions of hardware and software. It may not work with other versions. Warning-icon.png


History[edit | edit source]

Version Date Notes
1.0.0 August 2019 First public release

Introduction[edit | edit source]

In these days, we are witnessing the cloud war. Almost every week, the top three cloud providers⁠—Amazon, Microsoft, and Google⁠—add new services and new functionalities.

Technically speaking, it is hard to determine which platform is the best. Although basic services are similar, each platoform has different peculiarities that make it more or less suitable for a specific application.

In principle, DAVE Embedded Systems' products are designed to be cloud-agnostic in order to let the users the freedom to choose the cloud platform they think best fits their needs.

This Technical Note, for instance, shows how to interface the SBCSPG Industrial IoT gateway to Amazon Web Services (AWS). Specifically, this document shows how to configure and run the AWS Greengrass Core (GGC) on the device. According to AWS website, AWS IoT Greengrass is

software that lets you run local compute, messaging, data caching, sync, and ML inference capabilities on connected devices in a secure way. With AWS IoT Greengrass, connected devices can run AWS Lambda functions, execute predictions based on machine learning models, keep device data in sync, and communicate with other devices securely – even when not connected to the Internet.

AWS IoT Greengrass seamlessly extends AWS to devices so they can act locally on the data they generate, while still using the cloud for management, analytics, and durable storage. With AWS IoT Greengrass, you can use familiar languages and programming models to create your device software in the cloud, and then deploy it to your devices. AWS IoT Greengrass can be programmed to filter device data and only transmit necessary information back to the cloud.

In other words, GGC allows you to implement edge computing functionalities easily and quickly by deploying them on the edge device through the AWS platform.

Cloud and Edge computing in a typical IIoT scenario (image source: [1])

It is worth remembering that edge computing means a distributed computing paradigm which brings computation and data storage closer to the location where it is needed, to improve response times and save bandwidth, according to Wikipedia. Within the processing power limits of the edge device, moving such computations to the edge is an effective way to optimize costs. When the Internet connection is intermittent or poor, it can be even mandatory to meet system's requirements.

Please note that this Technical Note is not a step-by-step guide to set up the edge device and the cloud platform. AWS documentation is rich and detailed in this regard. Rather, this document aims to underline some specific SBCSPG-related steps required to run GGC on this device successfully. The procedure is based on the [https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-gs.html Getting Started with AWS IoT Greengrass guide.

The test was performed with:

  • Linux kernel 4.1.15-rialto-1.1.3
  • Debian Stretch distribution (for more details, please see this Technical Note)
  • AWS IoT Greengrass Core 1.9.2.

Setting up the edge device[edit | edit source]

The first thing to do is to rebuild the Linux kernel after adding the missing options⁠—if any⁠—required by GGC, which are detailed here.

Then, the root file system has to be configured according to the requirements described here.




root@sbcspg:~# route add default gw 192.168.0.254 eth0

Configuring AWS Greengrass Core on cloud side[edit | edit source]

Deploying the test Lambda function to the edge device[edit | edit source]

Testing the connection[edit | edit source]