This repository contains packages that can be built into Greengrass components.
- java-mqtt-hello: Java package for publishing an MQTT message every second
- python-mqtt-hello: Python package for publishing an MQTT message every second
Java, Python, and Maven are required to build the packages in this repository. On Ubuntu, these can be installed using:
sudo apt install -y default-jre maven python3 python3-pip
All packages recommend building via the Greengrass Development Kit. It can be installed using:
pip3 install git+https://github.com/aws-greengrass/aws-greengrass-gdk-cli.git@v1.6.1
Finally, the AWS CLI must be installed and configured with valid credentials. See here for more details.
To build each package successfully, locate its gdk-config.json
and modify the author, version, publish bucket, and publish region. The publish bucket does not need to be a unique name, as the GDK will automatically append information to the bucket name unique to the account.
With dependencies installed, go into each package and execute:
gdk component build
The packages can be deployed locally on a machine already running Greengrass. This step is automated using the scripts/local_deploy.sh
located in each package. For example:
cd java-mqtt-hello
./scripts/local_deploy.sh
The MQTT Test Client in the AWS Console can then be used to check for incoming messages.
Each component can be published using gdk
:
gdk component publish