IOT Device Tester for IoT Greengrass User Guide: host vs. DUT?

0

I'm trying to set up an IoT device for testing using the AWS IoT Device Tester for AWS IoT Greengrass User Guide ( https://docs.aws.amazon.com/greengrass/latest/developerguide/device-tester-for-greengrass-ug.html ). I'm getting lost as to what needs to be installed or configured on the host PC versus the device under test (DUT). For example:

  • AWS IoT Greengrass: Got it on the DUT. Confirmed that it works. Host also?
  • AWS IoT Device Tester for AWS IoT Greengrass: host or DUT?
  • Dependency checker: DUT. It ran fine.
  • AWS CLI: host or DUT?
  • Configuring the Greengrass service role: host or DUT?
  • Verifying Greengrass dependencies: Did this on the DUT.
  • AWS IoT Greengrass Core Software configuration (also download, I assume): DUT, right? or Host?
  • Create an SSH key: host.
    Add authorized SSH keys to DUT: DUT.
    SSH works fine, so I must have done that right.
  • Root access: DUT.
  • Configure AWS credentials: DUT? Or host? That is, do the config.json and device.json files belong on the host or the DUT?

The reason I'm asking is this: I assumed that as much as possible was supposed to go on the DUT, and that's how I did it. However, the DUT is running Linux on an ARM processor, and when I got down to "Running the Test Suite", the executable was in the DUT, under ~/devicetester_greengrass_linux/bin, and it was called devicetester_linux_x86_64. As expected from the filename, it didn't work.

Files I downloaded and used:

  • Greengrass: greengrass-linux-armv7l-1.7.1.tar.gz
  • Device Tester: devicetester_greengrass_linux_1.0.190219211616.zip
RayFW
asked 5 years ago330 views
2 Answers
0
Accepted Answer

Hey RayFW,
Thank you for reaching out with your questions. One of the goals of IoT Device Tester is to offload as much setup from the DUT as possible while at the same time automating test execution. Due to this, the majority of the required configuration will need to be done on the host rather than the DUT. Please let me address your questions individually so that everything is covered:

1. AWS IoT Greengrass: Got it on the DUT. Confirmed that it works. Host also?
Installing Greengrass on the DUT is actually an optional step in case you want to utilize your own custom installation. You could put AWS IoT Greengrass Core software under <device-tester-extract-location>/products/greengrass/ggc directory on host. IoT Device Tester for Greengrass ships with a version of Greengrass and can deploy it automatically during test execution. At this time, the latest auto-deployable version of Greengrass is 1.7.1 so your use-case is supported. All that is required from you are properly configured device.json and config.json files. If you choose to install AWS IoT Greengrass Core software on DUT, you will need to configure device.json file under <device_tester_extract_location>/configs directory. Please refer to "Download the AWS IoT Greengrass Core Software and Configure AWS IoT Device Tester to Use It" section on the documentation page for more details.

2. AWS IoT Device Tester for AWS IoT Greengrass: host or DUT?
IoT Device Tester should be installed (i.e. extracted) onto the host machine.

3. Dependency checker: DUT. It ran fine.
The dependency checker is automatically deployed to the DUT by the host machine during the testing process. The dependency checker is run before any other tests.

4. AWS CLI: host or DUT?
The AWS CLI should be installed on the host machine as IoT Device Tester requires AWS credentials to call APIs during testing. These credentials are also forwarded to the DUT.

5. Configuring the Greengrass service role: host or DUT?
The Greengrass service role is a logical attachment that happens in the cloud so you could do it from either the host or the DUT. Most commonly, this is done on the host since the AWS CLI isn't required.

6. Verifying Greengrass dependencies: Did this on the DUT.
Correct.

7. AWS IoT Greengrass Core Software configuration (also download, I assume): DUT, right? or Host?
IoT Device Tester automatically configures and deploys Greengrass groups along with any certificates that are required. No manual download of configuration files is required. I would like to assume that you are asking about "AWS IoT Device Tester configuration". Please refer to "Download the AWS IoT Greengrass Core Software and Configure AWS IoT Device Tester to Use It" section on documentation page for more details.

8. Create an SSH key: host.
This step can be done on either the host of the DUT. The important thing to keep in mind here is that the public key should be added to authorized_hosts file on the DUT, and the private key should be on the host.

9. Add authorized SSH keys to DUT: DUT.
Correct, the authorized_hosts file should be populated with the public key that you generated earlier. The authorized_hosts file should live on the DUT - usually under "~/.ssh/authorized_hosts".

10. Root access: DUT.
Correct, you need root access.

  1. Configure AWS credentials: DUT? Or host? That is, do the config.json and device.json files belong on the host or the DUT?
    The AWS credentials should be configured on the host. This means that the config.json and device.json files also stay on the host (under the "<device-tester-extract-location>/config" directory).

  2. The reason I'm asking is this: I assumed that as much as possible was supposed to go on the DUT, and that's how I did it. However, the DUT is running Linux on an ARM processor, and when I got down to "Running the Test Suite", the executable was in the DUT, under ~/devicetester_greengrass_linux/bin, and it was called devicetester_linux_x86_64. As expected from the filename, it didn't work.
    Please note that the "devicetester_linux_x86_64" binary should be running on Host. AWS IoT Device Tester for AWS IoT Greengrass should be downloaded to the host and only run from that location.

Best Regards,

Alex

answered 5 years ago
profile picture
EXPERT
reviewed 3 months ago
0

Alex,
Thank you for the complete and detailed response. The Device Tester works now.
Regards
RayFW

RayFW
answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions