This guide provides a complete walkthrough for installing the Migration Toolkit for Applications (MTA) with Konveyor AI (KAI) on OpenShift and configuring the VS Code extension for AI-powered code analysis and migration assistance.
- Overview
- Architecture
- Prerequisites
- Installation
- VS Code Configuration
- Verification
- Troubleshooting
- Contributing
- License
This setup connects three components:
- MTA Hub - Runs on OpenShift, provides the migration analysis platform
- KAI Solution Server - AI component that processes code analysis requests
- LLM Provider - Large Language Model (via OpenShift AI MaaS, OpenAI, Azure, etc.)
The VS Code extension communicates with both the LLM model and the KAI Solution Server, which in turn uses itself the configured LLM (can be a different one with respect to the one used by the VSCode MTA extension) to provide intelligent code migration suggestions for future use. The Solution Server augments previous patterns of how source code changed to resolve issues (also called solved examples) that were similar to those in the current file, and suggests a resolution that has a higher confidence level derived from previous solutions. After accepting a suggested code fix, the Solution Server works with the large language model (LLM) in its configuration to improve the hints about the issue that becomes part of the context.
┌─────────────────────┐
│ VS Code │
│ MTA Extension │
└──────┬──────────┬───┘
│ │
(Path 1) │ │ (Path 2)
Solution Server ───┘ └─── Direct LLM Access
HTTPS HTTPS
│ │
▼ │
┌──────────────────────────┐ │
│ OpenShift Cluster │ │
│ │ │
│ ┌──────────────────┐ │ │
│ │ MTA Hub │ │ │
│ │ Route: /hub/ │ │ │
│ │ services/kai/api│ │ │
│ └────────┬─────────┘ │ │
│ │ │ │
│ ▼ │ │
│ ┌──────────────────┐ │ │
│ │ KAI Solution │ │ │
│ │ Server │ │ │
│ │ - kai-api │ │ │
│ │ - kai-db │ │ │
│ │ - kai-importer │ │ │
│ └────────┬─────────┘ │ │
│ │ │ │
└──────────┼─────────────-─┘ │
│ │
│ HTTPS │
│ (kai-api-keys) │
▼ ▼
┌─────────────────────────────────────┐
│ LLM Provider │
│ - OpenShift AI MaaS │
│ - OpenAI │
│ - Azure OpenAI │
│ - AWS Bedrock │
│ - Other OpenAI-compatible APIs │
└─────────────────────────────────────┘
Authentication Flow:
-
VSCode - MTA - Solution server - LLM
- VS Code extension → KAI Solution Server (via MTA Hub route)
- KAI Solution Server → LLM Provider (using credentials from
kai-api-keyssecret)
-
VSCode - LLM
- VS Code extension → LLM (using credentials from
provider-settings.yaml)
- VS Code extension → LLM (using credentials from
- OpenShift Cluster: Version 4.12 or higher
- Cluster Admin Access: Required to install operators
- Internet Access: For pulling operator images and accessing LLM APIs
- VS Code: Version 1.85.0 or higher
- Java Extensions: Version 1.45.0 or below (if analyzing Java applications)
- MTA Extension: MTA 8.0.x VS Code Extension
- Access to one of the following:
- OpenShift AI MaaS (used for this guide)
- OpenAI API
- Azure OpenAI
- AWS Bedrock
- Any OpenAI-compatible API endpoint
Create the dedicated namespace for MTA:
oc apply -f 00-mta-namespace.yamlVerify:
oc get namespace openshift-mtaInstall the OperatorGroup and Subscription:
oc apply -f 01-mta-operatorgroup.yaml
oc apply -f 02-mta-operator-subscription.yamlVerify the operator is running:
oc get csv -n openshift-mta | grep mta-operatorExpected output:
mta-operator.v8.0.1 Migration Toolkit for Applications Operator 8.0.1 Succeeded
For OpenShift AI MaaS:
- Log into your OpenShift AI cluster
- Navigate to Model-as-a-Service (MaaS)
- Select and subscribe to a model (e.g.,
granite-3-2-8b-instruct) - Go to API Keys page and create a new API key
- Copy the API URL and API Key
For other providers:
- OpenAI: Get your API key from https://platform.openai.com/api-keys
- Azure OpenAI: Use your Azure endpoint and API key
- AWS Bedrock: Configure AWS credentials
Option B: Using oc command directly
oc create secret generic kai-api-keys -n openshift-mta \
--from-literal=OPENAI_API_BASE='<YOUR_LLM_API_URL>' \
--from-literal=OPENAI_API_KEY='<YOUR_API_KEY>'Verify the secret:
oc get secret kai-api-keys -n openshift-mtaDeploy the Tackle custom resource to create the MTA Hub and KAI Solution Server:
oc apply -f 03-tackle.yamlThis will deploy:
- MTA Hub UI and API
- KAI Solution Server components (kai-api, kai-db, kai-importer)
- Keycloak for authentication
- PostgreSQL databases
Monitor the deployment:
# Watch all deployments
oc get pods -n openshift-mta -w
# Check KAI components specifically
oc get deploy,svc -n openshift-mta | grep -E 'kai-(api|db|importer)'Wait for all pods to be Running/Ready:
oc get pods -n openshift-mtaGet the MTA Hub URL:
oc get route mta -n openshift-mta -o jsonpath='{.spec.host}'Save this route URL - you'll need it for VS Code configuration.
-
Get your MTA Hub route:
MTA_ROUTE=$(oc get route mta -n openshift-mta -o jsonpath='{.spec.host}') echo "https://${MTA_ROUTE}/hub/services/kai/api"
-
Edit
.vscode/settings.jsonand replace<YOUR_MTA_ROUTE>with your actual route, for example:{ "mta-vscode-extension.genai.agentMode": false, "mta-vscode-extension.solutionServer": { "enabled": true, "url": "https://mta-openshift-mta.apps.cluster-xyz.opentlc.com/hub/services/kai/api", "auth": { "enabled": false } } }
-
Copy the provider settings template:
cp provider-settings.yaml.template provider-settings.yaml
-
Edit
provider-settings.yamland update:- Replace
<YOUR_MAAS_MODEL_API_URL>with your model API url - Replace
<YOUR_API_KEY>with your LLM API key - Verify the model name matches your deployment
openshift-ai-granite-model: &active environment: OPENAI_API_KEY: "<YOUR_API_KEY>" provider: "ChatOpenAI" args: model: "granite-3-2-8b-instruct" configuration: baseURL: "<YOUR_MAAS_MODEL_API_URL>" active: *active
- Replace
-
Configure the extension:
- Open VS Code
- Go to Settings → Extensions → MTA
- Under Provider Settings File, browse and select your
provider-settings.yaml - Restart the MTA extension or reload VS Code
-
Check all MTA pods are running:
oc get pods -n openshift-mta
-
Verify KAI components:
oc get deploy -n openshift-mta | grep kaiExpected output:
tackle-kai-api 1/1 1 1 tackle-kai-importer 1/1 1 1 -
Check KAI API logs:
oc logs -n openshift-mta deployment/tackle-kai-api --tail=50
-
Test the route:
MTA_ROUTE=$(oc get route mta -n openshift-mta -o jsonpath='{.spec.host}') curl -k https://${MTA_ROUTE}/hub/services/kai/api/health || echo "Health check endpoint may not be available - this is normal"
- Open a Java/Spring project in VS Code
- Open the MTA view (left sidebar)
- Run an analysis:
- Right-click on your project
- Select MTA: Analyze
- Choose a transformation target (e.g., "Quarkus")
- Check for AI suggestions:
- After analysis completes, you should see AI-powered suggestions
- Look for code snippets and migration recommendations
Check pod status:
oc get pods -n openshift-mta | grep kaiCheck pod logs:
# Check API logs
oc logs -n openshift-mta deployment/tackle-kai-api
# Check importer logs
oc logs -n openshift-mta deployment/tackle-kai-importerCommon issues:
- Missing secret: Ensure
kai-api-keyssecret exists - Wrong model name: Verify
kai_llm_modelin05-tackle.yamlmatches your LLM - LLM provider unreachable: Check network connectivity from OpenShift to your LLM provider
- Verify file path: Check that
provider-settings.yamlis in the correct location - Check YAML syntax: Validate the YAML is properly formatted
- Restart VS Code: Reload the window or restart VS Code
- Check extension logs:
- View → Output → Select "MTA" from dropdown
- Look for errors related to provider configuration
Ensure consistency across all configurations:
| Location | Field | Example Value |
|---|---|---|
05-tackle.yaml |
kai_llm_model |
granite-3-2-8b-instruct |
provider-settings.yaml |
args.model |
granite-3-2-8b-instruct |
| LLM Provider | Model subscription | granite-3-2-8b-instruct |
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.