How to build a containerized IoT solution with OpenShift
For businesses looking to build scalable Internet of Things (IoT) solutions using containers, here is a sample project built on the Red Hat OpenShift Container Platform. This project implements an intelligent IoT gateway on the OpenShift Container platform. The IoT Gateway is critical for enterprise IoT as it brings intelligence, and enables key services, at the edge. In this project, the gateway application is deployed as a set of microservices inside containers on OpenShift.
A software sensor sends a stream of temperature and vibration data to the IoT gateway. If the sensor data reaches the critical threshold, business rules are triggered to take appropriate action. The proximity of the IoT gateway to the data generation source allows near real-time decision making, a key requirement for safety-critical use cases. The gateway can also help reduce the network bandwidth and cloud resources by aggregating, summarizing and transforming the sensor data before it is sent to the cloud or datacenter. As the number of end devices or volume of sensor data increases over time, OpenShift can auto-scale the resources to keep the business functions running without human intervention.
The core components of the project are:
- Red Hat JBoss Fuse Integration Services (FIS): Integration, routing, and transformation of messages and protocols through Apache Camel
- Red Hat JBoss A-MQ: Apache ActiveMQ-based message broker for receiving messages from the Sensor over MQTT protocol
- Red Hat JBoss BRMS Decision Server: Real-time execution of business rules
- Apache Zeppelin: Tool for data visualization
- PostgreSQL: Persistent database for storing sensor data as containers are natively non-persistent
- Software Sensor: A simple Spring Boot application that simulates temperature, vibration, and GPS sensor data
This project comes with a script that downloads, builds and deploys various containers needed for our application. For our build process, we’re using a Source-to-Image (S2I) tool for building these container images. Each component of the demo will be running in a container and is using microservices. This IoT solution built with enterprise grade tools offers great scalability, manageability, and security.
Video: You can watch a short video (< 5 min) walk- through of how to setup this example project.
Code: You can download the example project here: https://github.com/sabre1041/iot-ocp
Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development. The developer program and software are both free!
Download and learn more about Red Hat JBoss Fuse, an innovative modular, cloud-ready architecture, powerful management and automation, and world class developer productivity. It is Java™ EE 7 certified and features powerful, enterprise-grade features such as high availability clustering, distributed caching, messaging, transactions, and a full web services stack.