This repository is part of a series of three, which in combination resemble an Internet of Things ( IoT ) demo-environment, based on the 3-Layered architecture of
-
Edge / Sensors ( this ): as created of data
-
Smart Gateway / Controller: first level of data processing
-
Datacenter: well, the datacenter …
These layers can - and in this demo will - be made out of a set of Red Hat JBoss products, each taking over an important part in the IoT landscape
In your classical IoT architecture the Gateway can provide various capabilities, like
-
local access point for sensors
-
first aggregation point for sensor data
-
"normalization" of sensor data
-
forwarding sensor data to datacenter
With this much logic in the Gateway, it is more then fair to call it a "Smart Gateway"
The Smart Gateway is build based on the following technologies
-
Raspberry Pi V2 ( or any other similar hardware )
-
Raspbian as the operating system for RPi
-
Hypriot as Docker-Host products
-
JBoss Fuse for the required messaging and integration capabilities.
If you followed the entries with the Ansible description, then you are good to go to start the Gateway.
If you prefered to go the manual steps as described in this blog, then you will still have to build the deployables.
As for now, this is a fairly easy step
pi@gateway:~ $ cd
pi@gateway:~ $ cd IoT_Demo_Gateway/Smart_Gateway/
pi@gateway:~/IoT_Demo_Gateway/Smart_Gateway $ mvn clean install
...
INFO] Writing OBR metadata
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 24 seconds
[INFO] Finished at: Wed Feb 17 16:37:25 UTC 2016
[INFO] Final Memory: 44M/109M
[INFO] ------------------------------------------------------------------------
Before you can start the Smart Gateway, you will have to do a small configuration task. This is required, as the Smart Gateway is designed to be flexible about the surrounding environment.
Please do open the file 'docker-compose.yml' in your favorite editor and change the two entries which define the environment variables for the messaging broker IP addresses and ports
-
GATEWAY_JMS_BROKER_URL
is the fully qualified URL for the ActiveMQ Broker running on the Gateway this will usually betcp://localhost:61616
-
DATACENTER_JMS_BROKER_URL
is the fully qualified URL for the ActiveMQ Broker running the Datacenter part of the demo setup. -
BROKER_ADMIN_UID
the user-id of the user which authenticates at the Gateway. In the demo-setup this will usually beadmin
-
BROKER_ADMIN_PASSWD
the password for the user. This will usually bechange12_me
in the default demo setup.
Once you changed these values, you are ready to go.
Starting the Smart Gateway is, at the current time, a manual step. I will extend the demo to start the Smart Gateway container automatically at boot-time of the Raspberry.
Until then, please start the Smart Gateway with
pi@gateway:~ $ cd IoT_Demo_Gateway/
pi@gateway:~/IoT_Demo_Gateway $ docker-compose up -d
To "monitor" the startup or runtime of the Smart Gateway you can use the command
pi@gateway:~/IoT_Demo_Gateway $ docker-compose logs
Attaching to iotdemogateway_smartgateway_1
smartgateway_1 | Please wait while JBoss Fuse is loading...
100% [========================================================================]
Once you see the 100%
you are good to go!