When it comes to IoT edge, EdgeX Foundry is a feature-rich platform for accelerated development. Not only is EdgeX Foundry open source, but it also puts a strong accent on interoperability. These factors combine to catalyse an ecosystem of components federating the IoT space. The platform thereby accelerates the development of IoT solutions across various industrial and enterprise use cases.
This blog showcases an entry-level stack for IoT edge hacking. Prerequisite for this tutorial is a Raspberry Pi 4, with Ubuntu installed. We will see how to make an IoT edge gateway with EdgeX Foundry.
Quick install of EdgeX Foundry with Snap
With Ubuntu 19.10 installed on the Raspberry Pi 4, the EdgeX Foundry snap can be installed in a single command:
$ sudo snap install edgexfoundry
This simple command, installs all services required to run EdgeX. The services are also launched in the background. Services that come bundled with the edgexfoundry snap can be listed by issuing the snap services command.
$ sudo snap services edgexfoundry
The snap services command also shows if existing services are enabled and active.
Upon installation, the following services are automatically enabled:
cassandra (persistent storage for Kong)
consul (aka ‘the registry’)
The following services are disabled by default:
Any disabled service can be enabled and started as follows:
$ sudo snap set edgexfoundry support-notifications=on
Installing the Management Client
EdgeX instances can be conveniently managed in a web browser from a desktop. Management tasks like pairing devices to a gateway, creating device profiles, or visualising data can be carried out through the web UI. The edgex-ui-go snap delivers this interface. To install, run the following:
The web UI for gateway and device management will become available in the browser at http://localhost:4000. The default user credentials are username: admin /password:admin.
Provisioning the Edge Gateway
After login, the user will be redirected to the gateway management page. To provision the Raspberry Pi 4 device as a gateway, a user will add it through the web UI. A name, a description and the network IP address of the board (obtained via command: hostname -I) will be required.