Skip to content

Application Layer - Container Stack#

The Critical Manufacturing MES application tier is deployed in a containerized environment, providing solid gains in terms of configuration and usability by taking advantage of a mature containerization architecture such as the one supplied by the Kubernetes or Docker engines.

The application tier takes advantage of a container orchestrator in order to ensure almost boundless horizontal scalability. Additional worker nodes can be added to the cluster and additional instances of specific components can be launched to accommodate extra load on a particular installation.

Software Requirements#

Containerized deployments rely on container orchestrators. Critical Manufacturing MES supports the following configurations:

On-Premises#

Orchestrator Version
Canonical Kubernetes 1.35
Portainer Business + Talos 2.39 + 1.35
Red Hat OpenShift 4.21
Vanilla Kubernetes 1.35

Table: Supported On-Premises Kubernetes Orchestrators

Cloud#

Orchestrator Version
Amazon Elastic Kubernetes Service (EKS) 1.35
Azure Kubernetes Services (AKS) 1.35

Table: Supported Cloud Kubernetes Orchestrators

Restrictions#

When using these container orchestrators, keep in mind the following restrictions:

  • Operating System

    • Any Linux distribution compatible with the selected container orchestrator.
    • Recommended: Ubuntu Server 20.04 LTS or Red Hat Enterprise Linux 9.
    • Only x64 architecture is supported. (Container images for x86 or ARM architectures are not available).
  • Container Engine

    • CRI-O
    • or containerd
  • Additional Required Software

    • Powershell 7.1 (On-Premises installations only).

Container User IDs#

All containers run as a non-root user. Most Critical Manufacturing containers run with any non-root user ID (UID), as long as the user belongs to the root group (GID 0):

  • They default to UID 1001, so they work with no changes on orchestrators that do not assign a UID, such as Canonical Kubernetes, Portainer Business + Talos, Vanilla Kubernetes, Amazon EKS, and Azure AKS.
  • On Red Hat OpenShift, they run with the UID assigned to the project under the default restricted-v2 Security Context Constraint (SCC) ↗. OpenShift already runs these containers in the root group.

The following containers require a specific UID:

  • Critical Manufacturing containers use UID 1001 when they write to persistent storage.
  • Third-party containers use the UID required by their image.
Container Owner UID Volumes written
host Critical Manufacturing 1001 mes_logs_share, connect_iot_repo
envmanager Critical Manufacturing 1001 installation_data, mes_logs_share, connect_iot_repo
project-help Critical Manufacturing 1001 mes_logs_share
discoveryservices Critical Manufacturing 1001 mes_logs_share
messagebus Critical Manufacturing 1001 mes_logs_share
connectiot-manager Critical Manufacturing 1001 connect_iot_repository_share, connect_iot_persistency, connect_iot_logs
Upgrade jobs (Document Migration Tool, Kafka Topic Migration Tool, BinaryFormatter Migration Tool) Critical Manufacturing 1001 mes_host_documents (Document Migration Tool), installation_data (BinaryFormatter Migration Tool)
storage Third party 1001 storage-data
clickhouse Third party 101 clickhouse-data
clickhouse-ui Third party 1001 None
kafka1 Third party 1000 kafka-data
db (SQL Server) Third party 10001 mssqlserver_data
postgres, ferretdb Third party 999 postgres-storage, ferret-data
librechat Third party 1000 None

Table: Containers That Require a Specific User ID

Folders mapped to the volumes in the table, such as hostPath folders, must grant read and write permissions to the UID of the container. On Red Hat OpenShift, DevOps Center deployments always request the nonroot ↗ SCC (v1) as a base, which allows the UID that the container sets.

Workload characterization#

Due to the flexibility offered by container orchestrators, Critical Manufacturing does not recommend specific hardware configurations, but provides an adequate description of the expected workload generated by the MES system. With this information, system administrators can provision and adequately size a cluster to run the MES application tier, considering high-availability and scalability requirements.

This section offers a description of the MES workload in different example configurations.

Similarly to what happens in the more traditional approach, the exact hardware requirements depend ultimately on the specific customer environment. Please consult with Critical Manufacturing for more specific recommendations adapted to specific deployments.

Hardware requirements for computational resources#

The following table describes the approximate requirements for some sample configurations, depending on their purpose. All examples assume no workloads related with equipment integration.

  • Development: Development sandbox with no significant system load.
  • Training / Staging: System with a similar configuration to a productive deployment, with higher resource demands.
  • Production (MES only): Productive MES deployment with low to medium volume, without significant usage of Data Platform or Machine Learning capabilities. This configuration includes adequate overhead to support a new MES deployment during an upgrade process.
  • Production (MES with Data Platform and Machine Learning): Productive MES deployment with medium to high volume, considering usage of Data Platform and Machine Learning features. This configuration includes adequate overhead to support a new MES deployment during an upgrade process.
Workload vCPU Clock speed Memory
Development 10 2+ GHz 18 GB
Training / Staging 20 2+ GHz 32 GB
Production (MES Only) 30 2+ GHz 64 GB
Production (MES + Data Platform + Machine Learning) 50 2+ GHz 128 GB

Table: Hardware requirements for computational resources

Note

The workloads defined above may be combined in the same cluster by simply adding the characteristics of the intended environments to host on the same cluster.

For example, if you want to host two Development Systems (one Staging and one MES-only production system) in the same cluster, the resource requirements will add up, as shown below:

Workload vCPU Memory
Development 1 10 18 GB
Development 2 10 18 GB
Staging 20 32 GB
Production (MES only) 30 64 GB
Total 70 132 GB

Table: Hardware requirements example for cluster

If several environments are deployed to the same cluster, Critical Manufacturing recommends resource quotas to be defined for each environment in order to prevent resource starvation on other environments or applications hosted on the same cluster. Usually, this is only possible on Kubernetes clusters.

Persistent Storage#

The application layer requires access to persistent storage volumes to hold object attachments, documents, installation packages, and other application files. The storage requirements depend heavily on the expected usage of the system.

Persistent volumes can be provisioned in different ways, depending on the deployment target platform. At the time of release of this version, Critical Manufacturing MES supports the following volumes types:

Volume type Usage
Local Refers to local path on the node file system.
SMB/CIFS Refers to a shared folder accessible through the SMB protocol.
NFS Refers to a shared folder accessible through the NFS protocol.
Azure File Refers to an Azure File Share available in an Azure Storage Account (for AKS and OpenShift deployments only).
Storage Class Refers to a Kubernetes API for dynamic PV provisioning based on defined storage profiles (provisioners).
Persistent Volume Refers to a cluster-level, provisioned storage resource with an independent lifecycle, accessed via PVCs; can be static or dynamically provisioned.

Table: Support for persistent volume types

Note

Support for additional volume types may be added in the future.

The table below lists all the required volumes along with the component that requires it. Please note that, especially for Kubernetes deployments, there are different requirements for access modes. Some volumes require Read-Write-Many (RWX) access mode.

Info

Note that due to the specific requirements of some technologies, high-performance block storage is required (identified in the table above). The volumes can be statically provisioned using existing Persistent Volumes (previously created by the customer) or dynamically provisioned using Storage Classes in Kubernetes deployments. For high-performance block storage, we recommend a storage solution with at least 10000 IOPS (Input/Output Operations Per Second)

Volume Component Access Mode Storage Type Minimum Size
⚠
installation-data
envmanager and the BinaryFormatter migration job that runs once during an upgrade RWX Any 10 GB
connect-iot-repo host, envmanager, connectiot-manager (Connect IoT license) RWX Any 2 GB
connect-iot-persistency connectiot-manager, one per Automation Manager (Connect IoT license) RWO Any Deployment default
connect-iot-logs connectiot-manager, one per Automation Manager (Connect IoT license) RWO Any Deployment default
cube cube, cube-playground (IoT Data Platform Standard license) RWO Any 5 GB
postgres-storage postgres (Grafana database) RWO Any Deployment default

Table: Volumes required for persistent storage.

Note

The installation-data volume is used by the Environment Manager to store installation artifacts. SQL Server doesn't access this volume: SQL Server 2022 backs up and restores the databases directly in the S3-compatible storage.

Optional Volume configuration#

Volume Component Access Mode Storage Type Minimum Size
mssqlserver-data mssql RWO Block Storage ℹ 200 GB
kafka-data kafka RWO Block Storage ℹ 100 GB (per broker)
clickhouse-data clickhouse RWO Block Storage ℹ 100 GB
rabbit-data rabbit RWO Block Storage ℹ 1 GB
rabbit-log rabbit RWO Block Storage ℹ 1 GB
storage-data storage RWO Block Storage ℹ 25 GB
ferret-data ferretdb (GenAI) RWO Any Deployment default
postgres-data postgres (GenAI) RWO Any Deployment default
⚠ mes_logs_share envmanager, host, help, discoveryservices, messagebus RWX Any 20 GB

Table: Volumes of optional components or optional volumes.

Info

The amount of storage required by the Critical Manufacturing components greatly depend on how the system is modelled and used. The size indications present in this document are a recommendation for low/medium volume sites, based on our experience. During the configuration of the system these values should be adjusted according to the defined parameterization.

Warning

While the mes_logs_share volume does not require Block Storage, it is crucial to consider that the overall system performance will be significantly impacted by the write speed to this volume. For example, a high-latency network share must be avoided in production environments to maintain optimal performance. When installing MES in containerized environments on a Linux-based environment in Ext4 (or a Unix file system family), a lost+found folder will be created (typically through fsck) for the volumes. Kafka containers are deployed together with the application and will not start due to inconsistent naming format. This folder must be either removed before starting the relevant Kafka containers or a different file system must be used that doesn't create this folder.

Scalable Components#

The table below lists the components that can run with more than one replica, along with their images.

Component Image
host criticalmanufacturing/host, criticalmanufacturing/core-host
ui criticalmanufacturing/mes-ui, criticalmanufacturing/core-ui
help criticalmanufacturing/help
reference criticalmanufacturing/reference
securityportal criticalmanufacturing/securityportal
traefik traefik
traefik-forwardauth criticalmanufacturing/traefik-forwardauth
messagebus criticalmanufacturing/messagebus
data-manager dataplatform/datamanager
housekeeper dataplatform/housekeeper
housekeeper-cdm-builder, housekeeper-cdm-builder-light dataplatform/housekeeper
housekeeper-edp, housekeeper-edp-cdm-builder dataplatform/housekeeper
edpconnector dataplatform/edpconnector
cube dataplatform/cube
core-rag criticalmanufacturing/core-rag
core-ollama criticalmanufacturing/core-ollama
librechat criticalmanufacturing/librechat
mcp-mes criticalmanufacturing/mcpservers/mes
mcp-analytics criticalmanufacturing/mcpservers/analytics
mcp-grafana mcp-grafana
grafana criticalmanufacturing/grafana

Table: Components that can be scaled.

The following components run as a single replica: envmanager, discoveryservices, lbogenerator, mes-scheduler, mcad, automationmanagercontroller, connectiot-manager, ioteventprocessor, ioteventrules, uns-connector, aggregation-engine, cube-playground, cubestore, mlplatform-agent, mlplatform-training, and the in-cluster infrastructure services (SQL Server, ClickHouse, Kafka, RabbitMQ, storage, FerretDB, and PostgreSQL).

Container Inventory#

The table below lists every container of the MES v12 stack, the package that deploys it, and the condition under which it is deployed. Components marked as optional infrastructure run inside the cluster for development and testing only; staging and production environments must use external services. See Customer Environment MES Stack for the purpose and configuration of each container.

Container Image Package Deployed when
traefik traefik Core Always
traefik-forwardauth criticalmanufacturing/traefik-forwardauth Core Always
envmanager criticalmanufacturing/envmanager Core Always
securityportal criticalmanufacturing/securityportal Core Always
host criticalmanufacturing/host Core Always
ui criticalmanufacturing/mes-ui Core Always
help, reference criticalmanufacturing/help, criticalmanufacturing/reference Core Always
messagebus criticalmanufacturing/messagebus Core Always
discoveryservices criticalmanufacturing/discoveryservices Core Always
lbogenerator criticalmanufacturing/lbogenerator Core Always
grafana criticalmanufacturing/grafana Core Always
postgres postgres Core Always, as the Grafana database
mes-scheduler criticalmanufacturing/mes-scheduler Core Basic Scheduling license
mcad criticalmanufacturing/mcad Core New Product Introduction license
ecad (Traefik routes only) traefik Core New Product Introduction license, routes to external ECAD service endpoints
mssql mssql-server Optional infrastructure Development and test environments without an external SQL Server
connectiot-manager criticalmanufacturing/connectiot Connect IoT Connect IoT license, one per Automation Manager
automationmanagercontroller criticalmanufacturing/automationmanagercontroller Connect IoT Connect IoT license (Kubernetes only)
ioteventprocessor criticalmanufacturing/ioteventprocessor Connect IoT Always
ioteventrules criticalmanufacturing/ioteventprocessor Data Platform IoT Data Platform Standard license
uns-connector criticalmanufacturing/ioteventprocessor Data Platform IoT Data Platform Standard license
data-manager dataplatform/datamanager Data Platform IoT Data Platform Standard license
housekeeper, housekeeper-cdm-builder, housekeeper-cdm-builder-light dataplatform/housekeeper Data Platform IoT Data Platform Standard license, or MES analytics through Data Platform
housekeeper-edp, housekeeper-edp-cdm-builder dataplatform/housekeeper Data Platform Enterprise Data Platform
edpconnector dataplatform/edpconnector Data Platform Enterprise Data Platform
aggregation-engine dataplatform/aggregationengine Data Platform IoT Data Platform Standard license
cube, cubestore dataplatform/cube, dataplatform/cubestore Data Platform IoT Data Platform Standard license
cube-playground dataplatform/cube Data Platform Development environments
mlplatform-agent, mlplatform-training dataplatform/mlplatformagent, dataplatform/mlplatformtraining Data Platform IoT Data Platform Standard license
kafka, kafka-ui cp-kafka, kafka-ui Optional infrastructure Development and test environments without an external Kafka
clickhouse, ch-ui clickhouse-server, ch-ui Optional infrastructure Development and test environments without an external ClickHouse
rabbit rabbitmq Optional infrastructure Enabled by default
storage criticalmanufacturing/storage Optional infrastructure Development and test environments without an external S3-compatible storage
core-rag criticalmanufacturing/core-rag GenAI GenAI package
core-ollama criticalmanufacturing/core-ollama GenAI GenAI package
librechat criticalmanufacturing/librechat GenAI GenAI package
mcp-mes criticalmanufacturing/mcpservers/mes GenAI GenAI package
mcp-analytics criticalmanufacturing/mcpservers/analytics GenAI GenAI package
mcp-grafana mcp-grafana GenAI GenAI package
ferretdb ferretdb GenAI GenAI package

Table: MES v12 container inventory.