Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Intelligent Workloads at the Edge

You're reading from   Intelligent Workloads at the Edge Deliver cyber-physical outcomes with data and machine learning using AWS IoT Greengrass

Arrow left icon
Product type Paperback
Published in Jan 2022
Publisher Packt
ISBN-13 9781801811781
Length 374 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Ryan Burke Ryan Burke
Author Profile Icon Ryan Burke
Ryan Burke
Indraneel (Neel) Mitra Indraneel (Neel) Mitra
Author Profile Icon Indraneel (Neel) Mitra
Indraneel (Neel) Mitra
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Section 1: Introduction and Prerequisites
2. Chapter 1: Introduction to the Data-Driven Edge with Machine Learning FREE CHAPTER 3. Section 2: Building Blocks
4. Chapter 2: Foundations of Edge Workloads 5. Chapter 3: Building the Edge 6. Chapter 4: Extending the Cloud to the Edge 7. Chapter 5: Ingesting and Streaming Data from the Edge 8. Chapter 6: Processing and Consuming Data on the Cloud 9. Chapter 7: Machine Learning Workloads at the Edge 10. Section 3: Scaling It Up
11. Chapter 8: DevOps and MLOps for the Edge 12. Chapter 9: Fleet Management at Scale 13. Section 4: Bring It All Together
14. Chapter 10: Reviewing the Solution with AWS Well-Architected Framework 15. Other Books You May Enjoy Appendix 1 – Answer Key

Hands-on prerequisites

In order to follow along with the hands-on portions of this book, you will need access to two computer systems.

Note

At the time of authoring, AWS IoT Greengrass v2 did not support Windows installation. The hands-on portions related to the edge solution are specific to Linux and do not run on Windows

System 1: The edge device

The first system will be your edge device, also known as a gateway, since it will act as the proxy for one or more devices and the cloud component of the solution. In IoT Greengrass terminology, this is called a Greengrass core. This system must be a computer running a Linux operating system, or a virtual machine (VM) of a Linux system. The runtime software for AWS IoT Greengrass version 2 (v2) has a dependency on Linux at the time of this writing. The recommendation for this book is to use a Raspberry Pi (hardware version 3B or later) running the latest version of Raspberry Pi OS. Suitable alternatives include a Linux laptop/desktop, a virtualization product such as VirtualBox running a Linux image, or a cloud-hosted Linux instance such as Amazon Elastic Compute Cloud (EC2), Azure Virtual Machines, or DigitalOcean Droplets.

The Raspberry Pi is preferred because it provides the easiest way to interoperate with physical sensors and actuators. After all, we are building an IoT project! That being said, we will provide code samples to emulate the functionality of sensors and actuators for our readers who are using virtual environments to complete the hands-on sections. The recommended expansion kit to cover use cases for sensors and actuators is the Raspberry Pi Sense HAT. There are many kits out there of expansion boards and modules compatible with the Raspberry Pi. The use cases in this book could be accomplished or modified as necessary to fit what you have, though we will not cover alternatives beyond the software samples provided.

You can see a visual representation of the Raspberry Pi 3B with a Sense HAT expansion board here:

Figure 1.10 – Raspberry Pi 3B with Sense HAT expansion board

Figure 1.10 – Raspberry Pi 3B with Sense HAT expansion board

In order to keep the bill of materials (BOM) low for the solution, we are setting the border of edge communications at the gateway device itself. This means that there are no devices wirelessly communicating with the gateway in this book's solution, although a real-world implementation for the smart home product would likely use some kind of wireless communication.

If you are using the recommended components outlined in this section, you will have access to an array of sensors, buttons, and feedback mechanisms that emulate interoperation between the smart home gateway device and the connected devices installed around the home. In that sense, the communication between devices and the smart home hub becomes an implementation detail that is orthogonal to the software design patterns showcased here.

System 2: Command and control (C2)

The second system will be your C2 environment. This system can be a Windows-, Mac-, or Unix-based operating system from which you will install and use the AWS Command Line Interface (AWS CLI) to configure, update, and manage your fleet of edge solutions. IoT Greengrass supports a local development life cycle, so we will use the edge device directly (or via Secure Shell (SSH) from the second system) to get started, and then in later chapters move exclusively to the C2 system for remote operation.

Here is a simple list of requirements:

  • An AWS account
  • A user in the AWS account with administrator permissions
  • First system (edge device):
    • Linux-based operating system such as Raspberry Pi OS or Ubuntu 18.x
      • Recommended: Raspberry Pi (hardware revision 3B or later)
      • Must be of architecture Armv7l, Armv8 (AArch64), or x86_64
    • 1 gigahertz (GHz) central processing unit (CPU)
    • 512 megabytes (MB) disk space
    • 128 MB random-access memory (RAM)
    • Keyboard and display (or SSH access to this system)
    • A network connection that can reach the public internet on Transmission Control Protocol (TCP) ports 80, 443, and 8883
    • sudo access for installing and upgrading packages via package manager
    • (optional) Raspberry Pi Sense HAT or equivalent expansion modules for sensors and actuators
  • Second system (C2 system):
    • Windows-, Mac-, or Unix-based operating system
    • Keyboard and display
    • Python 3.7+ installed
    • AWS CLI v2.2+ installed
    • A network connection that can reach the public internet on TCP ports 80 and 443

      Note

      If you are creating a new AWS account for this project, you will also need a credit card to complete the signup process. It is recommended to use a new developer account or sandbox account if provisioned by your company's AWS administrator. It is not recommended to experiment with new projects in any account running production services.

All of this is an exhaustive way of saying: if you have a laptop and a Raspberry Pi, you are likely ready to proceed! If you just have a laptop, you can still complete all of the hands-on exercises with a local VM at no additional cost.

Note

Installation instructions for Python and the AWS CLI vary per operating system. Setup for these tools is not covered in this book. See https://www.python.org and https://aws.amazon.com/cli/ for installation and configuration.

You have been reading a chapter from
Intelligent Workloads at the Edge
Published in: Jan 2022
Publisher: Packt
ISBN-13: 9781801811781
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime