You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Workshop: migrate this project to Azure](#workshop-migrate-this-project-to-azure)
4
-
-[About this Project](#about-this-project)
1
+
# Tech Summit FY26 Lab: GitHub Copilot App Modernization for Java - Migrate to Azure
2
+
A short lab that walks through assessing and migrating the sample Java application "asset-manager" from AWS/RabbitMQ/Postgres to Azure Blob Storage, Azure Service Bus, and Azure Database for PostgreSQL using GitHub Copilot App Modernization for Java.
3
+
4
+
-[Tech Summit FY26 Lab: GitHub Copilot App Modernization for Java - Migrate to Azure](#tech-summit-fy26-lab-github-copilot-app-modernization-for-java---migrate-to-azure)
5
+
-[Overview](#overview)
6
+
-[Audience \& Objectives](#audience--objectives)
7
+
-[Estimated time \& difficulty](#estimated-time--difficulty)
-[Install GitHub Copilot App Modernization for Java (Preview)](#install-github-copilot-app-modernization-for-java-preview)
11
-
-[Migrate the Sample Java Application](#migrate-the-sample-java-application)
14
+
-[Lab: Migrate the Sample Java Application](#lab-migrate-the-sample-java-application)
12
15
-[Assess Your Java Application](#assess-your-java-application)
13
-
-[Migrate to Azure Database for PostgreSQL Flexible Server using Predefined Formula](#migrate-to-azure-database-for-postgresql-flexible-server-using-predefined-formula)
14
-
-[Migrate to Azure Blob Storage and Azure Service Bus using Custom Formula](#migrate-to-azure-blob-storage-and-azure-service-bus-using-custom-formula)
15
-
-[Deploy to Azure](#deploy-to-azure)
16
-
-[Clean up](#clean-up)
16
+
-[Migrate to Azure Database for PostgreSQL Flexible Server](#migrate-to-azure-database-for-postgresql-flexible-server)
17
+
-[Migrate from AWS S3 to Azure Blob Storage](#migrate-from-aws-s3-to-azure-blob-storage)
18
+
-[Migrate from AMQP RabbitMQ to Azure Service Bus](#migrate-from-amqp-rabbitmq-to-azure-service-bus)
> `GitHub Copilot App Modernization for Java` is in preview and is subject to change before becoming generally available.
20
25
21
-
GitHub Copilot App Modernization for Java (Preview), also referred to as `App Modernization for Java`, assists with app assessment, planning and code remediation. It automates repetitive tasks, boosting developer confidence and speeding up the Azure migration and ongoing optimization.
26
+
## Overview
27
+
This hands-on lab demonstrates assessing and migrating a Java web + worker application to Azure using GitHub Copilot App Modernization for Java. The lab is organized as small focused tasks with verification points after each major step.
22
28
23
-
In this workshop, you learn how to use GitHub Copilot App Modernization for Java (Preview) to assess and migrate a sample Java application `asset-manager` to Azure.
29
+
GitHub Copilot App Modernization for Java, also referred to as `App Modernization for Java` or `AppMod`, assists with app assessment, planning and code remediation using a Visual Studio Code Extension and GitHub Copilot.
30
+
It automates repetitive tasks, boosting developer confidence and speeding up the Azure migration and ongoing optimization.
24
31
25
-
## About this Project
26
32
27
-
This application consists of two sub-modules, **Web** and **Worker**. Both of them contain functions of using storage service and message queue. To demonstrate the migration process, this GitHub repository is mainly composed of 3 different branches:
- Run an automated assessment for cloud readiness.
37
+
- Apply Copilot-generated migrations for DB, storage, and messaging.
38
+
- Verify migrated code locally.
39
+
40
+
## Estimated time & difficulty
41
+
- Estimated time: 60–90 minutes
42
+
- Difficulty: Intermediate (familiarity with Java, Maven, VS Code, and Azure CLI recommended)
28
43
29
-
-[`source`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/source/asset-manager) branch: The original project before being migrated to Azure service.
30
-
-[`main`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/main/asset-manager) branch: Only the `web` module is migrated to use Azure service. This branch will be used for the workshop.
31
-
-[`expected`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/expected/asset-manager) branch: The is the final migrated state, and both `web` and `worker` modules are migrated to Azure.
44
+
## About the Project
32
45
33
-
### Original Infrastructure
46
+
This application consists of two sub-modules, **Web** and **Worker**. Both of them contain functions of using storage service and message queue.
34
47
35
-
The project uses the following infrastructure, in [`source`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/source/asset-manager) branch:
48
+
### Original Infrastructure
36
49
50
+
The project uses the following original infrastructure:
37
51
* AWS S3 for image storage, using password-based authentication (access key/secret key)
38
52
* RabbitMQ for message queuing, using password-based authentication
39
53
* PostgreSQL database for metadata storage, using password-based authentication
@@ -193,27 +207,14 @@ To successfully complete this workshop, you need the following:
193
207
-[VSCode](https://code.visualstudio.com/): The latest version is recommended.
194
208
-[A Github account with Github Copilot enabled](https://github.com/features/copilot): All plans are supported, including the Free plan.
195
209
-[GitHub Copilot extension in VSCode](https://code.visualstudio.com/docs/copilot/overview): The latest version is recommended.
210
+
-[GitHub Copilot app modernization for Java Extension](https://marketplace.visualstudio.com/items?itemName=vscjava.migrate-java-to-azure): The extension needed for migration
196
211
-[AppCAT](https://aka.ms/appcat-install): Required for the app assessment feature.
197
212
-[JDK 21](https://learn.microsoft.com/en-us/java/openjdk/download#openjdk-21): Required for the code remediation feature and running the initial application locally.
198
213
-[Maven 3.9.9](https://maven.apache.org/install.html): Required for the assessment and code remediation feature.
199
-
-[Azure subscription](https://azure.microsoft.com/free/): Required to deploy the migrated application to Azure.
200
-
-[Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli): Required if you deploy the migrated application to Azure locally. The latest version is recommended.
201
-
- Fork the [GitHub repository](https://github.com/Azure-Samples/java-migration-copilot-samples) that contains the sample Java application. Please ensure to **uncheck** the default selection "Copy the `main` branch only". Clone it to your local machine. Open the `asset-manager` folder in VSCode and checkout the `main` branch.
202
-
203
-
## Install GitHub Copilot App Modernization for Java (Preview)
204
-
205
-
In VSCode, open the Extensions view from Activity Bar, search `GitHub Copilot App Modernization for Java` extension in marketplace. Select the Install button on the extension. After installation completes, you should see a notification in the bottom-right corner of VSCode confirming success.
206
-
207
-
In VSCode, configure runtime arguments to enable the proposed API:
1. Press **Ctrl+Shift+P** and select **Preferences: Configure Runtime Arguments**.
212
-
2. Add the above JSON snippet into the editor and save.
213
-
3. Restart VSCode.
214
-
214
+
-[Azure subscription](https://azure.microsoft.com/free/): Required if you want to deploy the migrated application to Azure.
215
+
-[Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli): Required if you want to deploy the migrated application to Azure locally. The latest version is recommended.
215
216
216
-
## Migrate the Sample Java Application
217
+
## Lab: Migrate the Sample Java Application
217
218
218
219
The following sections guide you through the process of migrating the sample Java application `asset-manager` to Azure using GitHub Copilot App Modernization for Java (Preview).
219
220
@@ -222,7 +223,7 @@ The following sections guide you through the process of migrating the sample Jav
222
223
The first step is to assess the sample Java application `asset-manager`. The assessment provides insights into the application's readiness for migration to Azure.
223
224
224
225
1. Open the VS code with all the prerequisites installed on the asset manager by changing the directory to the `asset-manager` directory and running `code .` in that directory.
225
-
2. Open the extension `App Modernization for Java`.
226
+
2. Open the extension `GitHub Copilot App Modernization for Java`.
226
227
3. Hover the mouse over the **Assessment** section and click **Assess** button which looks like a triangle pointing right. Then, the Github Copilot Chat window will be opened and propose to run Modernization Assessor. Please confirm the tool usage by clicking **Continue**.
@@ -251,7 +252,7 @@ The first step is to assess the sample Java application `asset-manager`. The ass
251
252
252
253
9. Review the **Summary** report. Take a look at the **Cloud Readiness** report under the **Issues** tab to view the proposed solutions for the issues identified in the summary report.
253
254
254
-
## Migrate to Azure Database for PostgreSQL Flexible Server
255
+
###Migrate to Azure Database for PostgreSQL Flexible Server
255
256
256
257
1. For this workshop, we will start with the **Database Migration**.
257
258
Select **Migrate to Azure Database for PostgreSQL (SDK on Public Cloud)** in the Solution report dropdown on the right.
@@ -281,7 +282,7 @@ Select **Migrate to Azure Database for PostgreSQL (SDK on Public Cloud)** in the
281
282
1. Once GitHub Copilot provides oyu with next recommended actions after the **Summary** has been generated, this part of the lab is concluded.
282
283
1. Take a look at the **summary.md** file to review the changes. `.github/appmod-java/code-migration/managed-identity-azure-sdk-public-cloud/mi-postgresql-azure-sdk-public-cloud/summary.md`
283
284
284
-
## Migrate from AWS S3 to Azure Blob Storage
285
+
###Migrate from AWS S3 to Azure Blob Storage
285
286
286
287
The Application `asset-manager` uses AWS S3 for image storage. Let's move to Azure Blob Storage instead.
287
288
@@ -297,7 +298,7 @@ We will **Migrate from AWS S3 to Azure Blob Storage**.
## Migrate from AMQP RabbitMQ to Azure Service Bus
301
+
###Migrate from AMQP RabbitMQ to Azure Service Bus
301
302
The Application `asset-manager` uses Spring AMQP with RabbitMQ for message queuing. Let's move to Azure Service Bus instead.
302
303
303
304
1. For this part of the workshop, we will take a look at the **Messaging Service Migration**.
@@ -309,77 +310,43 @@ We will **Migrate from AMQP RabbitMQ to Azure Service Bus**.
309
310
1. GHCP will continue to run `appmod-run-task`, `appmod-fetch-knowledgebase`,`appmod-search-file` and other tasks using the MCP Server. During each step, please manually click **Continue** repeatedly to allow, confirm and proceed. The Copilot Agent uses various tools to facilitate application modernization. Each tool's usage requires confirmation by clicking the `Continue` button.
310
311
1. Review the proposed code changes and click **Keep** to apply them.
311
312
312
-
## Deploy to Azure
313
-
At this point, you have successfully migrated the sample Java application `asset-manager` to Migrate to Azure Database for PostgreSQL (SDK on Public Cloud), Azure Blob Storage, and Azure Service Bus.
314
-
315
-
> The Lab is over.
316
-
317
-
Now you are free to can deploy the migrated application to Azure using the Azure CLI after you identify a working location for your Azure resources.
318
-
319
-
For example, an Azure Database for PostgreSQL Flexible Server requires a location that supports the service. Follow the instructions below to find a suitable location.
320
-
321
-
1. Run the following command to list all available locations for the current subscription.
313
+
### Completion
322
314
323
-
```bash
324
-
az account list-locations -o table
325
-
```
315
+
Congratulations — you completed the lab!
326
316
327
-
1. Select a location from column **Name** in the output.
317
+
- You ran an automated assessment and applied Copilot-generated migrations for database, storage, and messaging.
318
+
- You reviewed and accepted the generated code changes and migration summary.
328
319
329
-
1. Run the following command to list all available SKUs in the selected location for Azure Database for PostgreSQL Flexible Server:
320
+
**Next steps**
321
+
- You are free to deploy the migrated application to Azure using the provided deployment scripts in the [main repo](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/main/asset-manager/scripts):
322
+
(`scripts\deploy-to-azure.cmd` or `scripts/deploy-to-azure.sh`).
323
+
- Explore the `expected` branch to compare the final migrated state and learn from the changes.
324
+
- When finished, run the cleanup script to remove Azure resources (`scripts\cleanup-azure-resources.cmd` or `scripts/cleanup-azure-resources.sh`).
330
325
331
-
```bash
332
-
az postgres flexible-server list-skus --location <your location> -o table
333
-
```
326
+
**Resources**
327
+
- Review `.github/appmod-java/.../summary.md` and `plan.md` for migration details.
328
+
- See the References & resources section above for SDK and CLI documentation.
334
329
335
-
1. If you see the output contains the SKU `Standard_B1ms` and the **Tier** is `Burstable`, you can use the location for the deployment. Otherwise, try another location.
330
+
**Well done!**
331
+
We hope this lab improved your confidence with App Modernization for Java and Azure migrations.
You can either run the deployment script locally or use the GitHub Codespaces. The recommended approach is to run the deployment script in the GitHub Codespaces, as it provides a ready-to-use environment with all the necessary dependencies.
344
-
345
-
Deploy using GitHub Codespaces:
346
-
1. Commit and push the changes to your forked repository.
347
-
1. Follow instructions in [Use GitHub Codespaces for Deployment](README.md#use-github-codespaces-for-deployment) to deploy the app to Azure.
348
-
349
-
Deploy using local environment by running the deployment script in the terminal:
350
-
1. Run `az login` to sign in to Azure.
351
-
1. Run the following commands to deploy the app to Azure:
352
-
353
-
Windows:
354
-
```batch
355
-
scripts\deploy-to-azure.cmd -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
356
-
```
357
-
358
-
Linux:
359
-
```bash
360
-
scripts/deploy-to-azure.sh -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
361
-
```
362
-
363
-
Once the deployment script completes successfully, it outputs the URL of the Web application. Open the URL in a browser to verify if the application is running as expected.
364
-
365
-
## Clean up
366
-
367
-
When no longer needed, you can delete all related resources using the following scripts.
368
-
369
-
Windows:
370
-
```batch
371
-
scripts\cleanup-azure-resources.cmd -ResourceGroupName <your resource group name>
372
-
```
373
-
374
-
Linux:
375
-
```bash
376
-
scripts/cleanup-azure-resources.sh -ResourceGroupName <your resource group name>
377
-
```
333
+
### Manual Verification & Checkpoints:
334
+
After each major step you can run for build checks:
335
+
`
336
+
mvn -f web/ clean package
337
+
mvn -f worker/ clean package
338
+
`
378
339
379
-
If you deploy the app using GitHub Codespaces, delete the Codespaces environment by navigating to your forked repository in GitHub and selecting **Code** > **Codespaces** > **Delete**.
340
+
### Trouble Shooting
380
341
342
+
#### GHCP seems to be doing something unclear
343
+
Go and take a look at `.github/appmod-java/code-migration/managed-identity-azure-sdk-public-cloud/progress.md` and `.github/appmod-java/code-migration/managed-identity-azure-sdk-public-cloud/plan.md`.
344
+
You will find the **Migration Session ID** in `plan.md` which you can always use to refer to the current migration plan.
381
345
382
-
# Trouble Shooting
346
+
## References & resources
347
+
-[GitHub Copilot App Modernization for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.migrate-java-to-azure)
-[Azure Database for PostgreSQL](https://learn.microsoft.com/en-us/azure/postgresql/)
350
+
-[Azure Blob Storage SDK for Java](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-java-get-started?tabs=azure-ad)
351
+
-[Azure Service Bus SDK for Java](https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-java-how-to-use-queues?tabs=passwordless)
383
352
384
-
## GHCP seems to be doing something weird
385
-
Go and take a look at `.github/appmod-java/code-migration/managed-identity-azure-sdk-public-cloud/progress.md` and `.github/appmod-java/code-migration/managed-identity-azure-sdk-public-cloud/plan.md`. You will find the **Migration Session ID** in `plan.md` which you can always use to refer to the current migration plan.
0 commit comments