Making the MING Stack Edge Deployment Easy with Barbara

The MING stack empowers edge computing by combining efficient data handling, automation, and visualization, enabling organizations to unlock the full potential of IoT and real-time applications in distributed environments. In this article we explore how organizations can deploy it at the Edge, easily using Barbara.

Technology
Written by:
Enrique Ramírez

About the MING Stack

The MING stack is a popular technology stack used in Edge solutions. It's an acronym that stands for:  

  • MQTT (Message Queuing Telemetry Transport): A lightweight messaging protocol for IoT devices with limited bandwidth or intermittent connections.  
  • InfluxDB: A time-series database designed to handle the high volume of data generated by IoT devices.  
  • Node-RED: A visual programming tool for wiring together hardware devices, APIs, and online services.  
  • Grafana: A data visualization and monitoring tool that can create dashboards to display data from InfluxDB.  

How the MING stack works at the Edge:

  1. Data Collection: Industrial connectors use MQTT to send data to a message broker.  
  2. Data Storage: InfluxDB stores the time-stamped data received from the MQTT broker.  
  3. Data Processing: Node-RED can be used to process and transform the data before it's stored in InfluxDB or visualized in Grafana.  
  4. Data Visualization: Grafana creates dashboards and visualizations to display the data, allowing users to monitor and analyze the information from their IoT devices.  

Architecture of the presented solution

This solution utilizes a distributed architecture designed for efficient edge data management. The architecture comprises the following key components:

  • Data Acquisition: An OPC UA connector is used to capture the data stream from the source system.
  • Message Brokering: An MQTT broker serves as the central communication hub, facilitating the exchange of data from the OPC UA connector.
  • Data Ingestion and Storage: An ingester component subscribes to the MQTT broker, receiving data and persisting it in a local InfluxDB time-series database.
  • Data Processing: Node-RED is employed to process and transform the ingested data. The processed results are then stored back into InfluxDB.
  • Data Visualization: A customized Grafana dashboard provides interactive visualizations of the stored data, enabling monitoring and analysis.

DiagramaDescripción generada automáticamente
Figure 1: Architecture of the presented solution

Deploying the solution at the Edge.

1. Deploying the MQTT Broker

To deploy our solution at the edge, we'll start by establishing a central communication hub: an MQTT Broker. This broker will facilitate the seamless sharing of the OPC-UA data among all involved applications.

The MQTT Broker can be easily deployed on an Edge Node with just a few clicks, requiring minimal configuration for connection, exposed ports, etc.

Figure 2: MQTT Broker’s card  already installed in the Edge Node

2. Data Acquisition: deploying the OPC-UA Connector

An OPC UA connector is a crucial component for bridging industrial equipment with the MING stack at the edge. This connector facilitates data exchange between OPC UA servers and the MQTT broker, which serves as the communication backbone for our solution.

Figure 1: Architecture of the presented solution

Deploying the OPC UA Connector involves a streamlined process facilitated by the Barbara Marketplace. 

The connector, available through the Marketplace, is installed directly onto the edge device. Crucially, proper configuration is required to establish communication between the OPC UA server and the MQTT broker. This includes configuring the connector's connection to the MQTT broker by specifying its address, port, and any necessary authentication.

Furthermore, the connector must be configured to connect to the OPC UA server itself, requiring the server's endpoint URL, security settings (if applicable), and specification of the data points (nodes) to be collected. Finally, the MQTT topic for publishing the collected OPC UA data must be configured, ensuring alignment with the Ingester's configuration for seamless data flow.

3. Data Ingestion & Storage: InfluxDb & Ingester deployment

Now we will set up the tools needed to ingest OPC UA data from the MQTT broker and store it in an InfluxDB database. These steps involve installing and configuring two key applications: InfluxDB and the Ingester, both readily available in the Barbara Marketplace.

INSTALLING INFLUXDB

InfluxDB is a high-performance time-series database designed for handling large volumes of time-stamped data, making it an ideal choice for IoT applications. To get started:

  • Access the Barbara Marketplace and locate the InfluxDB application.
  • Install it with just a few clicks, leveraging the Marketplace’s streamlined deployment process.
  • During the setup, configure the database to define its access credentials and specify the port where it will be accessible. This step ensures the database is securely integrated into your system and ready to store the incoming data.

SETTING UP THE INGESTER

The Ingester bridges the gap between the MQTT broker and InfluxDB by processing and storing the OPC UA data stream. And here’s how to set it up:

  1. Install the Ingester application from the Barbara Marketplace.
  2. Configure the Ingester to connect to the MQTT broker, specifying the topic or topics that correspond to the OPC UA data stream.
  3. Use the Ingester’s built-in filtering capabilities to select and process only the relevant data from the OPC UA gateway. This ensures efficient use of storage and avoids unnecessary data ingestion.
  4. Finally, define the connection to the InfluxDB database, ensuring that data is saved with the desired structure and format for future querying and analysis.
Figure 4: InfluxDb & Ingester cards already deployed in the Edge Node

With these applications in place, your system will seamlessly ingest, filter, and store OPC UA data, creating a robust foundation for real-time monitoring and analytics.

4. Data Processing: Deploying the NodeRED application

Deploying Node-RED at the edge is simplified through the Barbara Marketplace. This visual programming tool, ideal for creating data processing workflows, is readily available and installable on any Edge Node with just a few clicks using the Marketplace wizard. 

Node-RED’s browser-based flow editor allows users to easily connect pre-built nodes from a comprehensive palette, defining data pipelines without extensive coding. 

This visual approach, combined with the ability to create custom JavaScript functions, supports both rapid prototyping and complex data manipulation. The platform's lightweight Node.js runtime ensures efficient performance on edge devices.

Figure 5: NodeRED application in the Barbara Marketplace

5. Data Visualization: Deploying the Grafana Application

Finally we will deploy Grafana, a powerful visualization tool for creating and sharing interactive dashboards. 

Once we install it using the wizard, we can access its dashboard to visualize telemetry data in real-time. Simply access port 13000 (configured during installation) to view the predefined dashboard, which we imported using a JSON file during the app configuration.

Figure 6: Grafana Dashboard accessible in the port 13000

Finally, we have all the necessary applications to deploy the MING stack correctly installed in the Edge Node.

Figure 7: The MING Stack applications successfully installed in the Edge Node

6. Deploying the Solution to a Group of Edge Nodes

While this article has focused on deploying the solution to a single edge node, the true potential of the Barbara platform lies in its ability to scale across multiple edge nodes.

Barbara's batch command functionality enables the simultaneous installation of identical application sets on numerous edge nodes, each with tailored configurations to match specific use case requirements.  This powerful feature significantly streamlines both installation and configuration processes, saving considerable time and effort.

Figure 8: Installing the InfluxDB app simultaneously on four edge nodes

Benefits of Using Barbara for the MING Stack Edge Deployment

Barbara significantly simplifies and accelerates the deployment of the MING stack at the edge. By providing a centralized platform and a marketplace of pre-built applications, Barbara eliminates the complexities typically associated with configuring and managing individual components like MQTT, InfluxDB, Node-RED, and Grafana on edge devices. 

This streamlined approach reduces deployment time, minimizes manual configuration, and lowers the barrier to entry for edge computing projects. Furthermore, Barbara's management capabilities simplify ongoing maintenance and updates, ensuring the long-term stability and reliability of your edge deployments.

Using Barbara for MING stack edge deployments offers the following benefits:

  • Simplified Deployment: Barbara's marketplace and streamlined deployment process significantly reduce the complexity and time required to deploy the MING stack on edge devices.
  • Centralized Management: The platform provides a unified view and control over all deployed edge devices and applications, simplifying management, monitoring, and troubleshooting.
  • Scalability: Barbara's architecture enables easy scaling of edge deployments, eliminating the need for individual device management.
  • Reduced Costs: By simplifying deployment and management, Barbara lowers development and operational costs associated with edge computing projects.
  • Pre-built Applications: The availability of pre-built MING stack components in the Barbara Marketplace simplifies configuration and accelerates development.