How to build a containerized IoT solution with OpenShift

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.

Everything you need to grow your career.

With your free Red Hat Developer program membership, unlock our library of cheat sheets and ebooks on next-generation application development.


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:

To learn more, visit our Linux containers or microservices pages.

Join Red Hat Developer and get access to handy cheat sheets, free books, and product downloads that can help you with your microservices and container application development.

Join Red Hat Developer and get access to handy cheat sheets, free books, and product downloads.

Take advantage of your Red Hat Developers membership and download Red Hat Enterprise Linux today at no cost.

Download and learn more about Red Hat Fuse, a modular, cloud-ready architecture. Fuse is Java EE 7 certified and features high-availability clustering, distributed caching, messaging, transactions, and a full web services stack.

For more information about Red Hat OpenShift and other related topics, visit: OpenShift, OpenShift Online.