Skip to content

ishuverma/IoT_Demo_Gateway

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IoT Demo - Gateway

Purpose

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

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

Gateway

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"

Architecture

Running on dedicated hardware

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.

Installation instructions for a Smart Gateway can be found here and for "lazy" people here.

Running in an "all in one" setup

tbd

Configure and Run Smart Gateway

Building the Smart Gateway

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] ------------------------------------------------------------------------

Configure Environment

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

  1. GATEWAY_JMS_BROKER_URL is the fully qualified URL for the ActiveMQ Broker running on the Gateway this will usually be tcp://localhost:61616

  2. DATACENTER_JMS_BROKER_URL is the fully qualified URL for the ActiveMQ Broker running the Datacenter part of the demo setup.

  3. BROKER_ADMIN_UID the user-id of the user which authenticates at the Gateway. In the demo-setup this will usually be admin

  4. BROKER_ADMIN_PASSWD the password for the user. This will usually be change12_me in the default demo setup.

Once you changed these values, you are ready to go.

Start Environment

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 61.3%
  • Shell 38.7%