AI assistant for OMA Migration Planner, built on the Red Hat Lightspeed Core Stack.
This service provides an intelligent chatbot that helps users analyze migration sources, view assessments, and get recommendations for OpenShift migrations.
┌─────────────────┐ ┌─────────────────────┐ ┌─────────────────┐
│ OMA UI │────▶│ OMA Lightspeed │────▶│ OMA MCP Server │
│ │ │ (lightspeed-stack) │ │ (oma-service) │
└─────────────────┘ └─────────────────────┘ └─────────────────┘
│ │
▼ ▼
┌───────────────┐ ┌────────────────┐
│ Gemini API │ │ Migration │
│ (Vertex AI) │ │ Planner API │
└───────────────┘ └────────────────┘
Components:
- OMA Lightspeed: This repository - the AI orchestration layer
- OMA MCP Server: Separate service providing migration tools via Model Context Protocol
- Migration Planner API: Backend service providing migration data
- Gemini/Vertex AI: Google's LLM for natural language understanding
- Podman (v4.0+)
- podman-compose (
pip install podman-compose) - yq (for YAML processing)
- jq (for JSON processing)
- Gemini API key (get one at Google AI Studio)
# 1. Clone the repository
git clone https://github.com/kubev2v/oma-lightspeed.git
cd oma-lightspeed
# 2. Build the MCP server image (first time only)
git clone https://github.com/kubev2v/oma-service-mcp.git ../oma-service-mcp
make build-mcp
# 3. Generate configuration (interactive - will ask for API key)
make generate
# 4. Start the full stack (PostgreSQL + Planner + MCP + Lightspeed)
make run
# 5. Test the API
make querymake run starts the complete OMA AI stack:
PostgreSQL ──▶ Migration Planner API ──▶ OMA Service MCP ──▶ Lightspeed Stack
:5432 :3443 :8000 :8080
The Lightspeed API is exposed at http://localhost:8080.
| Command | Description |
|---|---|
make generate |
Interactive setup - creates .env and config files |
make run |
Start the full stack |
make stop |
Stop services (preserves data) |
make resume |
Resume stopped services |
make rm |
Remove services and volumes |
make logs |
Follow all logs (or make logs SERVICE=lightspeed-stack) |
make query |
Interactive query interface |
make build |
Build the OMA Lightspeed container image |
make build-mcp |
Build the MCP server image from ../oma-service-mcp |
make help |
Show all available commands |
| Variable | Description | Required |
|---|---|---|
GEMINI_API_KEY |
Google Gemini API key | Yes (or Vertex AI) |
LIGHTSPEED_STACK_IMAGE |
Override the lightspeed-stack image | No |
OMA_MCP_IMAGE |
Override the MCP server image | No (default: localhost/oma-service-mcp:latest) |
MIGRATION_PLANNER_IMAGE |
Override the migration planner image | No |
LIGHTSPEED_PORT |
Host port for the API | No (default: 8080) |
After running make generate, these files are created in config/:
lightspeed-stack.yaml: Main service configuration (auth, MCP, inference settings)llama_stack_client_config.yaml: LLM provider and agent configurationsystemprompt.txt: The AI assistant's persona and behavior rules
| Aspect | Local | Production |
|---|---|---|
| Database | SQLite | PostgreSQL |
| Auth | Disabled | Red Hat SSO (JWK) |
| LLM Credentials | .env file |
Kubernetes Secret (Vault) |
| MCP Server | Compose service | Separate Service |
| Migration Planner | Compose service | Separate Deployment |
The template.yaml is the source of truth for production deployment. It contains:
- ConfigMaps with embedded configurations
- Deployment with health checks
- Service and Route
- Database migration script
# Process the template with production parameters
oc process -f template.yaml \
-p IMAGE_TAG=v1.0.0 \
-p LIGHTSPEED_SERVICE_AUTH_ENABLED=true \
-p ROUTE_HOST=oma-lightspeed.apps.example.com \
| oc apply -f -
# Create required secrets (example)
oc create secret generic oma-lightspeed-db \
--from-literal=db.host=postgres.example.com \
--from-literal=db.port=5432 \
--from-literal=db.name=oma_lightspeed \
--from-literal=db.user=oma \
--from-literal=db.password=<password>
oc create secret generic oma-lightspeed-vertex-secret \
--from-file=service_account=/path/to/service-account.jsonApply the network policy for secure pod communication:
oc apply -f deploy/networkpolicy.yamlGET /liveness- Liveness probeGET /readiness- Readiness probe
curl -X POST http://localhost:8080/v1/query \
-H "Content-Type: application/json" \
-d '{"query": "List my migration sources"}'curl -X POST http://localhost:8080/v1/streaming_query \
-H "Content-Type: application/json" \
-d '{"query": "Analyze my assessment results"}'# Build locally
make build
# Build with custom tag
podman build -f Containerfile -t oma-lightspeed:dev .# Start the service
make run
# In another terminal, run queries
make query
# Or use curl directly
curl http://localhost:8080/livenessEdit the system prompt in template.yaml under the lightspeed-stack-config ConfigMap, then regenerate:
make generate
make rm
make runoma-lightspeed/
├── Containerfile # Container image definition
├── Makefile # Developer commands
├── compose.yaml # Local dev stack (podman-compose)
├── template.yaml # OpenShift template (source of truth)
├── template-params.dev.env # Development parameter overrides
├── .env.template # Environment variable template
├── config/ # Generated config files (gitignored)
├── scripts/
│ ├── generate.sh # Config generation script
│ ├── run.sh # Start services
│ ├── stop.sh # Stop services
│ ├── rm.sh # Remove services
│ ├── resume.sh # Resume services
│ ├── logs.sh # View logs
│ └── query.sh # Query interface
└── deploy/
└── networkpolicy.yaml # Production network policies
- Check if config files exist:
ls config/ - Run
make generateif they're missing - Check logs:
make logs
- Verify your API key at Google AI Studio
- Regenerate config:
rm .env && make generate
- Check the MCP server is healthy:
make logs SERVICE=oma-service-mcp - Check the MCP URL in
config/lightspeed-stack.yaml - Verify Migration Planner is reachable:
make logs SERVICE=migration-planner
Build the image from the sibling repository:
make build-mcp- Verify PostgreSQL secret exists:
oc get secret oma-lightspeed-db - Check migration logs in the container startup
- Ensure database is accessible from the pod
Apache License 2.0
- lightspeed-stack - The core AI orchestration framework
- oma-service-mcp - MCP server providing migration tools
- migration-planner - Core SaaS service for migration planning