Skip to content

Commit d37fbf8

Browse files
authored
✨ Add proposal for Kai integration (#200)
1 parent ac74201 commit d37fbf8

File tree

1 file changed

+112
-0
lines changed

1 file changed

+112
-0
lines changed

enhancements/kai/README.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: kai-integration-into-konveyor
3+
authors:
4+
- "@fabianvf"
5+
reviewers:
6+
- TBD
7+
approvers:
8+
- TBD
9+
creation-date: 2024-08-14
10+
last-updated: 2024-08-15
11+
status: implementable
12+
13+
---
14+
15+
# Kai Integration into Konveyor
16+
17+
## Release Signoff Checklist
18+
19+
- [x] Enhancement is `implementable`
20+
- [x] Design details are documented
21+
- [ ] Test plan is defined
22+
- [ ] User-facing docs are created
23+
24+
## Open Questions
25+
26+
1. What are the performance implications, and what changes are needed to the documented CPU/memory requirements.
27+
28+
## Summary
29+
30+
This enhancement integrates the AI component Kai into Konveyor. The goal is to boost Konveyor's capabilities by tracking incident resolutions and using them to automate code migrations. The integration is phased, starting with a proof of concept (now completed) and moving towards a fully polished release.
31+
32+
## Motivation
33+
34+
Integrating Kai with Konveyor improves application migrations. Kai’s AI-driven analysis and diff generation help manage and track incident resolutions, providing a valuable history for future analyses.
35+
36+
### Goals
37+
38+
- Integrate Kai as an API service with Konveyor.
39+
- Ensure smooth deployment with minimal extra steps for system administrators.
40+
- Enable konveyor authentication on the Kai API routes.
41+
42+
### Non-Goals
43+
44+
- No UI components for Kai are included.
45+
- No major changes to Konveyor beyond API interactions.
46+
47+
## Proposal
48+
49+
### User Stories
50+
51+
#### Story 1
52+
As a developer, I want to track and store changes in application analyses so I can easily reference resolved incidents from the IDE plugin and automate code migrations.
53+
54+
#### Story 2
55+
As a system admin, I want to deploy Kai with Konveyor with minimal setup to streamline the process.
56+
57+
### Implementation Details
58+
59+
- **Completed**: Phase 1 - Prototype/POC
60+
- Kai runs alongside Konveyor in a development setup.
61+
- Developed a Konveyor importer that polls the API.
62+
- Added commit information to analysis reports.
63+
- Implemented filtering and polling mechanisms in the API.
64+
- Ensured historical analyses are correctly ingested.
65+
66+
- **Phase 2**: Prototype Integration
67+
- Finalize and release all Konveyor APIs developed in Phase 1.
68+
- Implement a manual archiving mechanism for analysis reports after Kai’s ingestion.
69+
- Improve the Konveyor importer to work with Konveyor's authentication flow, setting environment variables with access tokens.
70+
- Build a releasable image that includes the Kai project.
71+
- Update the Konveyor operator with a flag to deploy Kai alongside the Hub.
72+
- Automatically set archive variables and generate relevant keys during deployment.
73+
- Proxy Service: A proxy service for authentication is implemented. This service authorizes requests and proxies them to a Kubernetes service, ensuring that Kai’s endpoints are secured by Konveyor’s existing authentication mechanisms.
74+
75+
- **Phase 3**: Final Integration
76+
- Add the authentication flow into the IDE plugin.
77+
- Verify and test all Kai use cases in a production environment.
78+
- Finalize documentation and user-facing materials.
79+
- Ensure the integration is polished and ready for full production deployment.
80+
81+
82+
### Security, Risks, and Mitigations
83+
84+
- Authentication is managed through the proxy service, integrating with Konveyor’s existing setup.
85+
86+
## Design Details
87+
88+
### Test Plan
89+
90+
- Unit tests for each API endpoint.
91+
- End-to-end tests to ensure the integration works smoothly.
92+
- Integration tests to verify interaction between Kai and Konveyor’s API.
93+
- Eventual integration into the global-ci flow
94+
95+
### Upgrade / Downgrade Strategy
96+
97+
- Upgrades maintain compatibility with existing Konveyor setups.
98+
- Downgrades disable Kai and revert to the standard Konveyor setup.
99+
100+
## Implementation History
101+
102+
- **Phase 1**: Prototype/POC - Completed; Kai runs in a dev environment.
103+
- **Phase 2**: Prototype Integration - In Progress; Build a usable release.
104+
- **Phase 3**: Final Integration - Finalize and polish for production.
105+
106+
## Drawbacks
107+
108+
- The integration adds complexity, which may require more resources for ongoing support.
109+
110+
## Infrastructure Needed
111+
112+
- CI/CD pipelines for testing and deploying Kai and Konveyor.

0 commit comments

Comments
 (0)