๐ง Run Konveyor AI in OpenShift Dev Spaces with VS Code Extension¶
This guide walks you through running Konveyor AI using OpenShift Dev Spaces with VS Code as an IDE.
You'll analyze and modernize a real Java application using the Kai VS Code extension in a Red Hat Dev Spaces workspace.
๐งฐ Prerequisites¶
- Access to an OpenShift cluster with Dev Spaces enabled
podman
installed locally- A Quay.io container registry account
- Kai
.vsix
file from Konveyor AI Releases - OpenAI credentials to use GPT-4o or a similar LLM
๐๏ธ Step 1: Build the Custom Dev Spaces Image¶
Create a Containerfile
(based on Red Hat UBI for Dev Spaces):
# Use official Dev Spaces base
#FROM registry.redhat.io/devspaces/udi-rhel9:3.18-2.1741779985
FROM quay.io/devfile/universal-developer-image:ubi9-latest
USER root
# Avoid flaky mirrors, timeouts, or zchunk checksum mismatches
RUN echo "fastestmirror=True" >> /etc/dnf/dnf.conf && \
echo "skip_if_unavailable=True" >> /etc/dnf/dnf.conf && \
echo "zchunk=False" >> /etc/dnf/dnf.conf
# Install dependencies required by Konveyor AI + typical tools
RUN dnf clean all && \
dnf install -y --nobest --allowerasing \
python3.12 python3.12-devel \
java-17-openjdk-devel \
nodejs maven \
unzip git curl zsh \
gcc make glibc-devel libffi-devel openssl-devel \
&& dnf clean all
# Add Kai extension from GitHub release
RUN curl -L -o /konveyor.vsix https://github.com/konveyor/editor-extensions/releases/download/v0.0.13/konveyor-v0.0.13.vsix
ENV DEFAULT_EXTENSIONS=/konveyor.vsix
ENV DEFAULT_EXTENSIONS=/konveyor-v0.0.13.vsix
USER user
๐ ๏ธ Build & Push¶
podman build -t quay.io/<your-username>/kai-devspaces:latest .
podman push quay.io/<your-username>/kai-devspaces:latest
๐ฆ Step 2: Create devfile.yaml
¶
schemaVersion: 2.2.0
metadata:
name: kai-devspaces
components:
- name: kai-dev-container
container:
image: quay.io/<your-username>/kai-devspaces:latest
memoryLimit: 8Gi
Launch a new Dev Spaces workspace using this devfile.yaml
.
๐ Step 3: Clone the Example Codebase¶
In your Dev Spaces terminal:
git clone https://github.com/rrbanda/coolstore.git
cd coolstore
โ๏ธ Step 4: Configure the Extension specific details¶
Ensure .vscode/settings.json
includes:¶
{
"konveyor.analysis.useDefaultRulesets": true,
"konveyor.analysis.labelSelector": "(konveyor.io/target=jakarta-ee || konveyor.io/target=openjdk11 || konveyor.io/target=openjdk17) || (discovery)"
}
Confgure the LLM¶
Configure source and target dependencies¶
https://github.com/user-attachments/assets/3e498252-f620-4985-bac7-e22b17819ec6
๐ Step 5: Run the Analysis¶
- Open the Command Palette (
Cmd+Shift+P
orCtrl+Shift+P
) - Run: Konveyor: Run Analysis
- Once the RPC server is initialized, navigate to the Konveyor Analysis View and run the analysis
๐งพ View and Filter Issues¶
The Konveyor Analysis View will list issues by file. Use the issue panel to filter and navigate easily:
Lost the panel? Use the Command Palette and reopen the view:
๐ ๏ธ Apply Fixes¶
Change Import Namespaces¶
Search for a file like InventoryEntity.java
, click the fix icon, and choose the effort level (Low/Medium/High):
Review the generated suggestion:
Use the Diff view to inspect and accept:
๐ Apply Advanced Fixes¶
Modify Scope (CDI Beans)¶
Fix files like CatalogService.java
:
EJB Replacements¶
For ShippingService.java
:
JMS to SmallRye¶
Resolve JMS issues by selecting Medium effort:
๐ก Agentic Workflow¶
Understand how Kai orchestrates fixes behind the scenes:
graph LR
A[Validator] -->
B[TaskManager] -->
C{TaskRunners}
C -->D[Analyzer Agent]-->G
C -->E[MavenCompiler Agent]-->G
C -->F[Maven Dependency Agent]-->G
G[Reflection Agent]-- Feedback Loop -->A
- Validator Generate tasks on detected issues. Re-evaluated after each change to the codebase
- Task Manager Queued by priority and passed to Task runners
- Task Runners Understand how to handle specific types and errors and orchestrates agents.
- Analyzer Agent Analyze migration issues and generate an LLM fix
- MavenCompiler Agent Check compilation after fix
- MavenDependency Agent Check dependencies after fix
- Reflection Agent callibrate the source in conjunction to other agents.
โ Expected Behavior¶
- Incident suggestions appear
- You can select effort level and apply changes
- Logs are saved in
.vscode/konveyor-logs/
- You can validate using:
mvn clean install && mvn compile
๐ Example Project Structure¶
coolstore/
โโโ .vscode/
โ โโโ settings.json
โโโ pom.xml
โโโ src/
โโโ ...
๐ References¶
- ๐ Konveyor AI Editor Extension
- ๐งช Coolstore Demo App
- ๐งญ Full Kai Migration Demo (JavaEE โ Quarkus)
- ๐ฌ Join Konveyor on Slack
```
Let me know if you want this pushed into your GitHub repo or saved as a file.