Skip to content

Commit

Permalink
Update screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
hhpatel14 committed Mar 6, 2025
1 parent 8711ee5 commit 9bcd8e6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 23 deletions.
Binary file added docs/images/demo/resolution_details1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/demo/resolution_details2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/demo/resolution_details3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 26 additions & 23 deletions docs/scenarios/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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)
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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**
Expand All @@ -242,15 +244,16 @@ 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.

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/)
Expand Down Expand Up @@ -305,6 +308,7 @@ this URL, run the following command:
```bash
minikube service list
```

Message Driven Bean (MDB)
![deploy app](deploy.gif)

Expand All @@ -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)

0 comments on commit 9bcd8e6

Please sign in to comment.