Internet of Things (IoT) OpenShift Demo Project
Java Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
images
iot-ocp-businessrules-service
iot-ocp-routing-service
iot-ocp-software-sensor
rhel-zeppelin
summit2017-lab
support
.gitignore
LICENSE
README.adoc
init.sh

README.adoc

IoT OpenShift Example Project

This example showcases an Intelligent Internet-of-Things (IoT) Gateway on Red Hat’s OpenShift Container Platform. The Gateway enables real-time decision making at the edge, and demonstrates the ease with which you can deploy a secure and scalable microservices application on the enterprise-grade OpenShift application platform.

IoT OCP Containers

Components

The application is deployed as a set of microservices inside containers on OpenShift:

  • JBoss Fuse Integration Services (FIS): Tools that facilitate integration, routing, and transformation of messages and protocols, by leveraging Apache Camel technology.

  • JBoss A-MQ: Apache ActiveMQ-based message broker container image for receiving and storing telemetry from the Sensor via MQTT

  • JBoss BRMS Decision Server: Real-time execution of business rules for processing telemetry

  • Apache Zeppelin: Interactive data visualization and analytics

  • PostgreSQL: Provides persistence for sensor data

  • Simulated Software Sensor: A simple Spring Boot application that simulates temperature, vibration, and GPS sensor data

Prerequisites

Setup

Step 1: Login to your OpenShift environment using the command-line tools

Note: If you don’t have an environment handy, the Red Hat Container Development Kit provides a fully-functional preconfigured OpenShift environment, including Red Hat Enterprise Linux (RHEL) and JBoss, delivered as a Virtual Machine image. The VM should be enabled with minimum of 4 CPU and 6144MB memory (i.e. Vagrant file for CDK should be updated with this VM configuration)

Step 2: Download the iot-ocp project in the OpenShift instance:

$ git clone https://github.com/sabre1041/iot-ocp.git

Step 3: Execute the init script

$ cd iot-ocp
$ ./init.sh

The script automatically builds, deploys, and wires the necessary application components together. Once the process is complete, you can see a graphical visualization of the application architecture using the OpenShift Web Console.

Step 4: Login to the OpenShift web console using a web browser

Username: admin

Password: admin

Project: iot-ocp

OCP projects

Configure the Zeppelin visualization tool

The data visualization is stored in Notebooks. The interpreters allow Zeppelin to connect to PostgreSQL.

Step 5: Locate the Zeppelin service on the overview page and click on its url to launch the Zeppelin web console

Zeppelin service

Step 6: Under notebook, select Import note to import the pre-configured iot-ocp notebook

zeppelin importNote

Step 7: Execute all visualizations by hitting the "Play" button on the top lefthand corner of the page next to the name of the note

Zeppelin results

Step 8: Periodically refresh the note data through cron scheduler

zeppelin note chron

Starting the Gateway

To bring the project back up, the components should be started in the following order:

  1. PostgreSQL

  2. JBoss A-MQ

  3. JBoss BRMS Decision Sever

  4. JBoss Fuse Integration Services (FIS)

  5. Simulated Software Sensor

  6. Apache Zeppelin

Copyright 2017 by Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this package except in compliance with the License (see the LICENSE file included in this distribution). You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.