diff --git a/docs/images/demo/resolution_details1.png b/docs/images/demo/resolution_details1.png new file mode 100644 index 00000000..a2475ab9 Binary files /dev/null and b/docs/images/demo/resolution_details1.png differ diff --git a/docs/images/demo/resolution_details2.png b/docs/images/demo/resolution_details2.png new file mode 100644 index 00000000..39d7218b Binary files /dev/null and b/docs/images/demo/resolution_details2.png differ diff --git a/docs/images/demo/resolution_details3.png b/docs/images/demo/resolution_details3.png new file mode 100644 index 00000000..b8670915 Binary files /dev/null and b/docs/images/demo/resolution_details3.png differ diff --git a/docs/scenarios/demo.md b/docs/scenarios/demo.md index 2f1d1c32..ad15e1cf 100644 --- a/docs/scenarios/demo.md +++ b/docs/scenarios/demo.md @@ -42,9 +42,8 @@ Konveyor AI (Kai) can assist and expedite the modernization process. - [VSCode](https://code.visualstudio.com/download) - [Git](https://git-scm.com/downloads) - [Kubernetes cluster (minikube)](https://minikube.sigs.k8s.io/docs/start/) -- [GenAI credentials](../llm_selection.md#ibm-bam-service) +- AI credentials - [Maven](https://maven.apache.org/install.html) -- Quarkus 3.10 - Java 21 Additionally, you will need to have the Kai IDE plugin installed in VSCode. @@ -74,13 +73,12 @@ Follow the steps in the [installation guide](../installation.md) to install Kai. 2. Navigate to File > Open in VSCode and locate the folder we just cloned. Make sure you have GenAI credentials before you start configuring Kai. -### Configure Konveyor +### Configure Konveyor and Start the server Follow the steps in the [Configuration Guide](../configuration.md) to set up Kai and start the server. The guide provides in-depth details on customizing the configuration to suit your project’s specific needs. > [!NOTE] -> If you are following the guided demo for the Coolstore application, ensure you select the following targets during project configuration. - +> If you are following the guided demo for the Coolstore application, ensure you select the following targets during project configuration. We will analyze the Coolstore application using the following migration targets to identify potential areas for improvement: @@ -135,14 +133,17 @@ areas that require attention during the migration process. Open the "Konveyor Analysis View" and search for the `InventoryEntity.java file`. Click on the circled button to resolve all incidents or individual incidents as shown below. In the dropdown menu, different effort levels are available to resolve the incidents, with the default set to 'Low.' As we progress, we will try out different effort levels in the next example. ![request_fix](request_fix.png) - -The "Resolution Details" window will display the requested fix information as shown below. You can view the reasoning behind the suggested changes and additional information provided by Kai. -![resolution_details](resolution_details1.png) +The "Resolution Details" window will display the requested fix information as shown below. + +![resolution_details](../images/demo/resolution_details1.png) -Moreover, you can see the additional number of errors that requires your atttention and number of modified files. +You can view the reasoning behind the suggested changes and additional information provided by Kai. +![resolution_details](../images/demo/resolution_details2.png) -![resolution_details](resolution_details2.png) +Moreover, you can see the additional number of errors that requires your atttention and number of modified files. + +![resolution_details](../images/demo/resolution_details3.png) Click on the eye symbol to view the differences. ![change_import_namespaces.png](change_import_namespaces.png) @@ -156,24 +157,21 @@ Just like we fixed `InventoryEntity.java`, repeat the same steps for `ShoppingCa ### 2.2 Modify Scope from CDI bean requirements -In this step, we will use Kai to update the scope definitions in `CatalogService.java`, and `ShippingService.java` to align with Quarkus CDI bean requirements. Kai will automate this process, ensuring a smooth migration. +In this step, we will use Kai to update the scope definitions in `CatalogService.java`, and `ShippingService.java` to align with Quarkus CDI bean requirements. Kai will automate this process, ensuring a smooth migration. Let's review each file and fix all associated issues one by one. The effort level will remain low. Just like in Step 2.1, we will search for the file and request a resolution. ![cdi_bean_requirement](cdi_bean_requirement1.png) -Verify each solution, review the reasoning and additional steps, and ensure the requested changes are applied. In this case, Kai will rerun the analysis and reduce the number of incidents if the changes are compatible. +Verify each solution, review the reasoning and additional steps, and ensure the requested changes are applied. In this case, Kai will rerun the analysis and reduce the number of incidents if the changes are compatible. ![cdi_bean_requirement](cdi_bean_requirement2.png) In `CatalogService.java` Stateless EJB is converted to a CDI bean by replacing the @Stateless annotation with a scope @ApplicationScoped. - - -### 2.3 EJB Remote +### 2.3 EJB Remote Now lets request resolution for the `ShippingService.java` as we did in previous steps. Kai replaced EJBs with REST functionality and updated related imports and annotations. - ![shippingService - diff](shippingService.png) Due to the absence of support for Remote EJBs in Quarkus, you will notice that these functionalities are removed and replaced with REST functionality. @@ -195,24 +193,27 @@ This may take longer as Kai is working to resolve a complex problem. Let's review all the changes one by one. ![jsm-to-smallRye](jmstosmallrye2.png) -The migration replaces the JMS-based Message Driven Bean (MDB) with Quarkus SmallRye Reactive Messaging. It removes JMS dependencies, manual connection management, and session handling, replacing them with `@Incoming("orders")` for message processing. +The migration replaces the JMS-based Message Driven Bean (MDB) with Quarkus SmallRye Reactive Messaging. It removes JMS dependencies, manual connection management, and session handling, replacing them with `@Incoming("orders")` for message processing. ![jsm-to-smallRye](jmstosmallrye3.png) -Let's review `pom.xml` file. +Let's review `pom.xml` file. + > [!NOTE] > If Kai updates its dependencies and includes SmallRye Reactive Messaging 4.27.0 as an independent dependency, it may not be found in Maven. Since Quarkus already includes SmallRye internally, it is recommended to use `io.quarkus:quarkus-smallrye-reactive-messaging` instead of `io.smallrye.reactive` to ensure compatibility and avoid missing artifacts. ![jsm-to-smallRye](jmstosmallrye4.png) At the end of this step, the application should be able to compile successfully. Any additional incidents can be ignored. To update dependencies from the repository and compile the project, run the following command - ```bash - mvn clean install -U && mvn compile + +```bash + mvn clean install -U && mvn compile ``` -## Background +## Background ### Core Workflow + The Validator serves as the entry point, identifying issues in the repository and re-running the analysis after changes are accepted. It determines task types and generates tasks accordingly. The TaskManager prioritizes and queues tasks, delegating them to TaskRunners based on their type. @@ -222,6 +223,7 @@ TaskRunners interpret the nature of errors and orchestrate the Agentic Workflow, More information available [here](../presentations/2024-11-14-konveyor-community.md). ### Agentic Workflow + The Agentic Workflow enables multiple agents to work together to resolve migration issues. The key agents include: **AnalyzerAgent** @@ -242,7 +244,9 @@ Invoked after each task or group of tasks to review and validate the changes (Re If new tasks arise, such as AnalyzerDependencyRuleViolation, the AnalyzerAgent is called again for further resolution. ### Effort-Based Resolution + The Agentic Workflow operates within a configurable effort level, allowing Kai to adapt its resolution strategy based on user preferences: + - **Low Effort**: Attempts to fix only the detected issues. - **Medium Effort**: Fixes the detected issues and resolves any new issues caused by the initial fix. - **High Effort**: Continues resolving issues iteratively until no further problems remain. @@ -250,7 +254,6 @@ The Agentic Workflow operates within a configurable effort level, allowing Kai t Retries occur as part of the implementation process, though they are not currently user-configurable. ![workflow](agentic-flow.png) - ## Step 3: Deploy app to Kubernetes Although the app is deployable to any [Kubernetes](https://kubernetes.io/) @@ -305,6 +308,7 @@ this URL, run the following command: ```bash minikube service list ``` + Message Driven Bean (MDB) ![deploy app](deploy.gif) @@ -320,4 +324,3 @@ capabilities, organizations can expedite the modernization process. If you are interested to learn more about our ongoing efforts and future plans, please reach out to us in the [slack channel](https://kubernetes.slack.com/archives/CR85S82A2) -