Setting up other devices - AWS IoT Greengrass

Setting up other devices

Follow the steps in this topic to set up a device (other than a Raspberry Pi) to use as your AWS IoT Greengrass core.

Tip

Or, to use a script that sets up your environment and installs the AWS IoT Greengrass Core software for you, see Quick start: Greengrass device setup.

If you're new to AWS IoT Greengrass, we recommend that you use a Raspberry Pi or an Amazon EC2 instance as your core device, and follow the setup steps appropriate for your device. To use a different device or supported platform, follow the steps in this topic.

 

  1. If your core device is an NVIDIA Jetson device, you must first flash the firmware with the JetPack 4.3 installer. If you're configuring a different device, skip to step 2.

    Note

    The JetPack installer version that you use is based on your target CUDA Toolkit version. The following instructions use JetPack 4.3 and CUDA Toolkit 10.0. For information about using the versions appropriate for your device, see How to Install Jetpack in the NVIDIA documentation.

    1. On a physical desktop that is running Ubuntu 16.04 or later, flash the firmware with the JetPack 4.3 installer, as described in Download and Install JetPack (4.3) in the NVIDIA documentation.

      Follow the instructions in the installer to install all the packages and dependencies on the Jetson board, which must be connected to the desktop with a Micro-B cable.

    2. Reboot your board in normal mode, and connect a display to the board.

      Note

      When you use SSH to connect to the Jetson board, use the default user name (nvidia) and the default password (nvidia).

  2. Run the following commands to create user ggc_user and group ggc_group. The commands you run differ, depending on the distribution installed on your core device.

    • If your core device is running OpenWrt, run the following commands:

      opkg install shadow-useradd opkg install shadow-groupadd useradd --system ggc_user groupadd --system ggc_group
    • Otherwise, run the following commands:

      sudo adduser --system ggc_user sudo addgroup --system ggc_group
      Note

      If the addgroup command isn't available on your system, use the following command.

      sudo groupadd --system ggc_group
  3. Optional. Install the Java 8 runtime, which is required by stream manager. This tutorial doesn't use stream manager, but it does use the Default Group creation workflow that enables stream manager by default. Use the following commands to install the Java 8 runtime on the core device, or disable stream manager before you deploy your group. Instructions for disabling stream manager are provided in Module 3.

    • For Debian-based or Ubuntu-based distributions:

      sudo apt install openjdk-8-jdk
    • For Red Hat-based distributions:

      sudo yum install java-1.8.0-openjdk
  4. To make sure that you have all required dependencies, download and run the Greengrass dependency checker from the AWS IoT Greengrass Samples repository on GitHub. These commands unzip and run the dependency checker script.

    mkdir greengrass-dependency-checker-GGCv1.10.x cd greengrass-dependency-checker-GGCv1.10.x wget https://github.com/aws-samples/aws-greengrass-samples/raw/master/greengrass-dependency-checker-GGCv1.10.x.zip unzip greengrass-dependency-checker-GGCv1.10.x.zip cd greengrass-dependency-checker-GGCv1.10.x sudo ./check_ggc_dependencies | more
    Note

    The check_ggc_dependencies script runs on AWS IoT Greengrass supported platforms and requires specific Linux system commands. For more information, see the dependency checker's Readme.

  5. Install all required dependencies on your device, as indicated by the dependency checker output. For missing kernel-level dependencies, you might have to recompile your kernel. For mounting Linux control groups (cgroups), you can run the cgroupfs-mount script. This allows AWS IoT Greengrass to set the memory limit for Lambda functions. Cgroups are also required to run AWS IoT Greengrass in the default containerization mode.

    If no errors appear in the output, AWS IoT Greengrass should be able to run successfully on your device.

    Important

    This tutorial requires the Python 3.7 runtime to run local Lambda functions. When stream manager is enabled, it also requires the Java 8 runtime. If the check_ggc_dependencies script produces warnings about these missing runtime prerequisites, make sure to install them before you continue. You can ignore warnings about other missing optional runtime prerequisites.

    For the list of AWS IoT Greengrass requirements and dependencies, see Supported platforms and requirements.