Title
Create new category
Edit page index title
Edit category
Edit link
Deploy Application with Helm Charts
Prerequisites
Before installing MOCM, ensure the following infrastructure components are already provisioned and accessible:
Helm >= 3.0.0 installed
kubectl configured and connected to EKS cluster
MongoDB cluster deployed and accessible
ALB configured and ready
MOCM Helm Chart
A comprehensive Helm chart for deploying MOCM (My OPSWAT Central Management) services in on-premise Kubernetes environments.
Required Infrastructure
Component | Version | Description |
|---|---|---|
Kubernetes | v1.34+ | Cluster with sufficient resources |
MongoDB | 8.0+ | Database (standalone or replica set) |
RabbitMQ | Latest | Message broker (AmazonMQ or compatible) |
Redis | Latest | Cache service (Amazon ElastiCache) |
S3 Storage | Object storage (AWS S3 or compatible) | |
Container Registry | Repositories (AWS ECR or other registry) |
CLI Tools
Tools | Version | Description | Install |
|---|---|---|---|
Helm | v3.x+ | Package manager for Kubernetes | |
Kubectl | v1.34+ | The Kubernetes command-line tool | |
Helmfile | v1.4.x | Helmfile is a declarative spec for deploying helm charts. | |
AWS CLI | v2.x+ | Required for ECR authentication | https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html |
OpenSSL | 3.6.1+ | Required for generating the product agent RSA key pair | |
Docker | v20.x+ | Required for loading and pushing images to ECR |
S3 Bucket Requirements
The following S3 buckets must be created (replace {name_prefix} with your environment prefix):
Example with name_prefix mocm:
Repository Requirements
The ECR must be created before running this step (replace <id> with your id account aws and <region> for your region)
If using another registry, repository must create
ALB Requirements
Note — ALB required: Single ALB with path-based routing: REST via Traefik, gRPC direct to connector service:
ALB 1: Domain = "host", Protocol = HTTPS (443), Purpose = Main web traffic — UI, REST APIs, all HTTP-based services.
Prepare
Download MOCM Kubernetes from My OPSWAT Portal and extract the MOCM on-premise package and verify the directory structure:
Tag and Push Images to Registry
Inside folder images:
Prerequisites: AWS CLI installed and configured with valid credentials. Docker must also be running.
Run the script:
The script will:
Authenticate Docker to ECR automatically (
aws ecr get-login-password)Load every image tar file in the
images/directory into DockerFor each image listed in
images.txt, create the ECR repository if it does not exist, then tag and push the image
Generate RSA Key Pair for Product Agent
fusion-auth and fusion-connector require an RSA key pair exposed as PRODUCT_AGENT_RSA_PRIVATE_KEY / PRODUCT_AGENT_RSA_PUBLIC_KEY.
Contents of scripts/:
└── gen-cert.sh
Prerequisites: OpenSSL installed.
Run the script:
The script will:
Create
./certs/if it does not existGenerate an OpenSSL config (
ssl.cnf) and a self-signed certificate + RSA private key (tls.crt,tls.key, default 10 years)Extract the public key into
public.key
Output files in ./certs/:
File | Purpose |
|---|---|
tls.key | RSA private key → |
public.key | RSA public key → |
Keep these files safe — they are used to populate global.productKey in values.yaml
Quick Start
Back to MOCM package folder
Configure Values
Edit values.yaml with your environment details.
1. Configuration
Update image, host, ingressclass and replicas in values.yaml
Host: domain name for MOCM
If you need update replicas of one service, you can get svc and update replicas:
Example:
NOTE If you use Terraform (in the terraform folder) to install infrastructure, you can access AWS Secrets Manager in the AWS Console to retrieve the username and password for RabbitMQ and MongoDB.
For Redis OSS cache configuration:
REDIS_PRIMARY_HOSTis the primary endpoint.REDIS_REPLICA_HOSTSis the reader endpoint.
For the admin-user secret, these values are used to initialize the admin account login to the web console for managing MOCM.
2. Configure credentials via values.yaml
Edit the values.yaml file to provide connection details and credentials. The file contains placeholders that need to be replaced with your actual values:
Note: Replace all placeholder values with your actual configuration values before deployment.
Example:
We are generating passwords for MongoDB and RabbitMQ using AWS Secrets Manager.
For Redis:
REDIS_PRIMARY_HOST= the primary endpointREDIS_REPLICA_HOSTS= the reader endpointREDIS_USERNAME = Valkey/Redis RBAC username (required from v10.6.2605+)REDIS_PASSWORD = Valkey/Redis RBAC password (required from v10.6.2605+)
For admin-user : these values initialize the admin account for managing MOCM.
Option: Create secrets manually with kubectl (Optional)
Instead of putting credentials in values.yaml, you can create secrets directly with kubectl before deploying.
Important: If you create secrets manually, you must remove global.secrets from values.yaml. If global.secrets is present, the Helm pre-install/pre-upgrade hook will overwrite your manually created secrets on every deploy.
3. Product RSA Key Pair
Paste the contents of tls.key and public.key into global.productKey. Use a | block scalar to preserve line breaks.
Note: Do not include the
-----BEGIN ...-----and-----END ...-----markers — paste only the body of the key
4. S3 Storage
5. Component Replicas (Optional)
Override the default replicaCount for specific services:
Install
1. Deploy
From the mocm/ directory. Choose one of the two options below.
Option A — Helmfile (recommended)
Helmfile reads helmfile.yaml and deploys all 3 releases in the correct order automatically, with wait, waitForJobs, and needs handling the sequencing.
Option B — Helm (manual, release by release)
If you do not have Helmfile installed, deploy each release manually in this exact order:
Important: The order bootstrap-1 → bootstrap-2 → mocm-service is mandatory. Do not run Release 2 until Release 1 is fully ready, and do not run Release 3 until Release 2 is fully ready.
The process takes 15–30 minutes depending on your environment.
2. Verify Deployment
All releases should show status deployed.
All pods should reach Running state. If a pod is stuck in Pending:
Upgrade & Uninstall
Before upgrading, always back up your current values.yaml file. The new chart version may ship with an updated values.yaml containing new keys or changed defaults. You should compare the new values.yaml with your existing one and merge your custom values (credentials, host, image registry, replicas, etc.) into the new file. Losing your previous values.yaml may result in missing configurations or service disruption after upgrade
Upgrade
Check changes before upgrading (optional):
Option A — Helmfile:
Helmfile sync is idempotent — it applies only the diff.
Option B — Helm (same order as install):
Uninstall
Or uninstall individual releases with Helm (in reverse order):
Testing (Static / Pre-deploy)
Validate charts before deploying to a cluster.
Phase 1: Lint
Phase 2: Template Render
To inspect rendered output:
Phase 3: Helmfile Validation
Troubleshooting
Pod stuck in Pending
Common causes: insufficient CPU/memory, missing PVC, node not ready.
Secrets not created
Secrets are managed as Helm hooks (pre-install, pre-upgrade) in mocm-bootstrap-1. If secrets are missing, check:
Release failed
View logs
Point Domain to Ingress
After deploying MOCM and obtaining the external address of your Kubernetes ingress controller, you need to configure your DNS so that your chosen domain name points to the ingress.
host(e.g. mocm.example.com) → ALB address — Main web traffic (HTTPS)
Access MOCM Console
After completing the deployment and DNS configuration, you can access the My OPSWAT Central Management console:
Open your browser and navigate to https://<your-domain> (the host value configured in values.yaml)
Enter the administrator credentials configured in values.yaml (admin-user secret):
Email: the value of
ADMIN_EMAILPassword: the value of
ADMIN_PASSWORD
You should now have access to the My OPSWAT Central Management console.