Skip to main content

MF Lens

Enterprise Feature

This is an enterprise feature.

MF Lens is a mainframe code analysis and exploration solution within the EPAM AI/Run platform.

MF Lens System Requirements

MF Lens Container Resource Requirements

Component NameReplicasMemoryCPU (cores)
backend16Gi1.0
frontend1256Mi0.1
neo4j14Gi2.0

Core MF Lens Components Overview

Component NameImagesDescription
mf-analyzer-backendliubuss/epam-ai-mf-analyzer:backend-develop-
mf-analyzer-frontendliubuss/epam-ai-mf-analyzer:frontend-develop-

Third-Party MF Lens Components

Component NameImagesDescription
neo4jneo4j:5.26.16-

PostgreSQL Configuration

Configure the PostgreSQL instance with the necessary database and user.

warning

We strongly recommend using a dedicated PostgreSQL instance for MF Lens. Do not share the same instance used by AI/Run CodeMie, as this may cause resource contention and complicate maintenance.

Configuring PostgreSQL Running in Managed Cloud

  1. Navigate to the SQL section in Managed Cloud

  2. Connect to PostgreSQL database codemie depending on the cloud provider:

    • Some cloud providers have built-in query tools
    • Deploy pgadmin inside the cluster to access a private Postgres instance:
    # Create namespace and secret
    kubectl create ns pgadmin

    kubectl create secret generic pgadmin4-credentials \
    --namespace pgadmin \
    --from-literal=password="$(openssl rand -hex 16)" \
    --type=Opaque

    helm upgrade --install pgadmin pgadmin/. -n pgadmin --values pgadmin/values.yaml --wait --timeout 900s --dependency-update

    # port-forward to svc
    kubectl -n pgadmin port-forward svc/pgadmin-pgadmin4 8080:80

    # access via localhost:8080 with secret from pgadmin namespace, user - "pgadmin4@example.com"
  3. Open the SQL Editor tab

  4. Execute the following SQL commands:

    CREATE DATABASE postgres_mflens;
    CREATE USER mflens WITH PASSWORD '<strong-password>';
    GRANT ALL PRIVILEGES ON DATABASE postgres_mflens TO mflens;
  5. Switch to the postgres_mflens database

  6. Grant schema privileges:

    GRANT ALL ON SCHEMA public TO mflens;

Prerequisites

Create the Kubernetes namespace for all MF Lens components before proceeding:

kubectl create namespace mf-analyzer

Step 1: Deploy Neo4j

Create Neo4j Secret

Generate a password and create the Kubernetes secret:

kubectl create secret generic mf-analyzer-neo4j \
--namespace mf-analyzer \
--from-literal=NEO4J_AUTH="neo4j/$(openssl rand -hex 16)"
tip

The value format must be neo4j/<password>. Neo4j uses this value directly for authentication.

Configure Values

Update mflens/neo4j-values.yaml before deploying. Set storageClassName to the storage class available in the cluster:

neo4j:
# ... additional configuration fields
volumes:
data:
mode: "dynamic"
dynamic:
storageClassName: "storage-class" # e.g., "gp3", "standard", etc.
# ... additional configuration fields

Install Helm Chart

Install or upgrade Neo4j using Helm:

helm upgrade --install neo4j \
neo4j/neo4j \
--version 5.26.16 \
--namespace mf-analyzer \
-f ./mflens/neo4j-values.yaml \
--wait \
--timeout 600s

Step 2: Deploy MF Lens Backend

Create Secrets

LiteLLM API Key

Generate an API key in the LiteLLM proxy admin UI (or via the LiteLLM API), then create the secret:

kubectl create secret generic backend-litellm-api-key \
--namespace mf-analyzer \
--from-literal=litellm-api-key="<litellm-api-key>"

PostgreSQL Credentials

Use the database, user, and password created in the PostgreSQL Configuration step:

kubectl create secret generic mf-analyzer-postgresql \
--namespace mf-analyzer \
--from-literal=PG_USER="mflens" \
--from-literal=PG_PASS="<pg-password>" \
--from-literal=PG_HOST="<pg-host>" \
--from-literal=PG_DATABASE="postgres_mflens"

Neo4j Password

Use the password from the Neo4j secret created in Step 1:

kubectl create secret generic mf-analyzer-backend-neo4j \
--namespace mf-analyzer \
--from-literal=password="<neo4j-password>"

Configure Values

Update mflens/backend-values.yaml before deploying. Set storageClassName to the storage class available in the cluster:

volumeClaimTemplates:
- spec:
# ... additional configuration fields
accessModes:
- "ReadWriteOnce"
storageClassName: "storage-class" # e.g., "gp3", "standard", etc.
# ... additional configuration fields

Install Helm Chart

Install or upgrade MF Lens Backend using Helm:

helm upgrade --install mf-analyzer-backend \
oci://europe-west3-docker.pkg.dev/or2-msq-epmd-edp-anthos-t1iylu/helm-charts/mf-analyzer-backend \
--version x.y.z \
--namespace mf-analyzer \
-f ./mflens/backend-values.yaml \
--wait \
--timeout 600s

Backend Application Settings

These settings control the MF Analyzer Backend behavior and integrations. All values are configured via environment variables in mflens/backend-values.yaml.

Core Application Settings

ParameterTypeDefaultDescription
ENVstring""Deployment environment identifier affecting logging and feature flags
SPRING_PROFILES_ACTIVEstring""Active Spring profile controlling configuration loading
JVM_OPTSstring""JVM heap settings; adjust based on available node memory

Database Configuration

ParameterTypeDefaultDescription
SPRING_DATASOURCE_USERNAMEstring""Database username with read/write permissions on the MF Lens database
SPRING_DATASOURCE_PASSWORDstring""Database password (use a secrets manager in production)
POSTGRES_HOSTstring""PostgreSQL server hostname or IP address
POSTGRES_DBstring""Database name for MF Lens tables and data
SPRING_DATASOURCE_URLstring""Full JDBC connection URL constructed from POSTGRES_HOST and POSTGRES_DB

LLM Configuration

ParameterTypeDefaultDescription
LLM_API_KEYstring""API key for LiteLLM proxy authentication
LLM_APIURLstring""LiteLLM proxy server URL (e.g., http://litellm:4000)
LLM_DEPLOYMENTNAMEstring""Model deployment name to use for analysis requests

Neo4j Configuration

ParameterTypeDefaultDescription
SPRING_NEO4J_URIstring""Bolt connection URI for the Neo4j graph database (e.g., bolt://neo4j.mf-analyzer.svc.cluster.local:7687)
SPRING_NEO4J_AUTHENTICATION_USERNAMEstring""Neo4j database username for backend authentication
SPRING_NEO4J_AUTHENTICATION_PASSWORDstring""Neo4j database password (use a secrets manager in production)

Storage and Runtime

ParameterTypeDefaultDescription
APP_WORKING_STORAGEstring""Working directory for temporary analysis data
PORTFOLIO_COBOL_PREPROCESSOR_JARstring""Path to the COBOL preprocessor JAR file
JAVA_EXECUTABLE_PATHstring""Path to the Java executable used by the preprocessor

Step 3: Deploy MF Lens Frontend

Configure Values

Update mflens/frontend-values.yaml before deploying. Set the host values to the actual domain:

ingress:
# ... additional configuration fields
hosts:
- host: codemie.%%DOMAIN%%
paths:
- path: "/mflens"
pathType: Prefix

Install Helm Chart

Install or upgrade MF Lens Frontend using Helm:

helm upgrade --install mf-analyzer-frontend \
oci://europe-west3-docker.pkg.dev/or2-msq-epmd-edp-anthos-t1iylu/helm-charts/mf-analyzer-frontend \
--version x.y.z \
--namespace mf-analyzer \
-f ./mflens/frontend-values.yaml \
--wait \
--timeout 600s

Step 4: Verify MF Lens Deployment

Check that MF Lens components are running:

# Check pod status
kubectl get pods -n mf-analyzer

# Check deployments
kubectl get deployment -n mf-analyzer mf-analyzer-backend
kubectl get deployment -n mf-analyzer mf-analyzer-frontend

# Check logs
kubectl logs -n mf-analyzer deployment/mf-analyzer-backend --tail=50
kubectl logs -n mf-analyzer deployment/mf-analyzer-frontend --tail=50

Expected output:

  • Pods should be in Running state
  • Deployments should show ready replicas
  • Logs should indicate successful startup

Step 5: Access the Application

MF Lens UI is accessible at the following URL:

  • URL Pattern: https://codemie.%%DOMAIN%%/mflens
  • Example: https://codemie.airun.example.com/mflens

Step 6: Register MF Lens in the Applications Menu

To make MF Lens available in the Applications menu, add it to the integrated applications configuration.

See Integrated Applications for full configuration details.

Add the following entry to the configuration:

- id: "applications:mflens"
settings:
enabled: true
name: "MFLens"
url: "https://codemie.%%DOMAIN%%/mflens/?theme=codemie"
type: "iframe"
description: "Mainframe code analysis and exploration solution within the EPAM AI/Run platform."
created_by: "AIMF Team"
icon_url: "https://raw.githubusercontent.com/epam-gen-ai-run/ai-run-install/main/docs/assets/ai/ai-run-mflens-logo.png"

Next Steps