-
Clone this repository:
https://github.com/canada4663/pi-gen-greengrass.git
-
Unzip downloaded image in repository base directory.
-
Download Greengrass Core certificate and config bundle. This can be found from AWS IoT Greengrass console -> Security -> Certificates -> Select Your Certificate -> Download from Action Menu
-
Unzip Greengrass Core cerficate and config bundle. Note the path to the directory produced.
-
Copy and edit WPA supplicant file to match your wifi configuration:
cp wpa_supplicant.conf.sample wpa_supplicant.conf
-
Plug-in SD card into local computer, inspect diskutil to identify the SD card path - external / physical disk:
diskutil list | grep external
DO NOT USE INTERNAL DISK
-
Run helper script to burn SD card and apply configuration to /boot volume:
source ./osx_burn_config.sh <image file.img> <SD card path> <Greengrass config path> <wpa-supplicant file>
-
(optional) Remount drive and inspect contents of boot volume to ensure everything in place.
-
Put SD Card in Pi, and boot it up. Check that Greengrass service is running:
ps -ef | grep green
- Grab a tool like etcher or any tool that burns images to SD cards
- Burn the image
- Eject and re-insert the card, go into the mounted drive partition (boot partition for Linux afficionados)
- Copy the certs/ and config/ folders from the .tar.gz you recieved when you created a greengrass core into the boot partition in the greengrass folder
- (optional) Add a file titled
ssh
with no extension if you want to ssh into your raspberry pi - (optional) Set up WiFi headlessly
- Eject sd and place it into raspberry pi and apply power to pi
- If you haven't set wifi up on the SD card, do so now with an attached keybeard and mouse. Otherwise, you can ssh in if you completed the ssh and headless wifi step.
- On the Pi, after boot, run
sudo systemctl status greengrass.service
to ensure greengrass service has booted and is running - If not,
sudo systemctl stop greengrass.service
andcd /greengrass/ggc/core/
, then./greengrassd
to see output from startup sequences for troubleshooting