Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f2156ea
Update README
allxiao Mar 19, 2025
7e161c6
add execution permisson to shell scripts
majguo Mar 22, 2025
0dd7bed
worker doesn't listen to port 8081
majguo Mar 22, 2025
281c8a1
clean before starting web/worker apps
majguo Mar 23, 2025
11d2a53
update readme
majguo Mar 24, 2025
ceca68a
add dev container config
majguo Mar 25, 2025
dd38867
fix typo in readme
majguo Mar 25, 2025
963ea03
Use jdk8 and springboot 2 for asset manager
Apr 16, 2025
4f73f6a
fix compile
Apr 18, 2025
dd2ec3f
remove ut in asset manager jdk8 branch (#25)
yiliuTo May 26, 2025
b51cb80
simply rabbitmq config
yiliuTo Oct 15, 2025
5ace1db
add spring boot 2 api
yiliuTo Oct 15, 2025
05ee169
add handler interceptor
yiliuTo Oct 17, 2025
bf21706
remove asb-unsupported properties
yiliuTo Oct 17, 2025
0a7c5ba
refine code
yiliuTo Oct 17, 2025
fbaf65b
remove unnecessary code
yiliuTo Oct 17, 2025
429d85b
update readme
yiliuTo Oct 22, 2025
c2b6aa0
set rabbitmq config
yiliuTo Oct 22, 2025
3409841
remove rabbitmq features
yiliuTo Oct 23, 2025
27bd8ec
add custom tasks
yiliuTo Oct 23, 2025
0c5c838
update readme
yiliuTo Oct 24, 2025
6750903
containerization
wchigit Oct 28, 2025
b4c40cc
deployment init
wchigit Oct 28, 2025
c91a778
comment a graph
wchigit Oct 28, 2025
eb9d28b
comment another graph
wchigit Oct 28, 2025
9e16e7e
revert deploy for pr
wchigit Oct 28, 2025
0e24240
Merge branch 'workshop/initial' of https://github.com/Azure-Samples/j…
wchigit Oct 28, 2025
114b866
Wc/c2c workshop (#59)
wchigit Oct 29, 2025
548fdeb
deployment using c2c
wchigit Oct 31, 2025
269b46d
Merge branch 'workshop/initial' of https://github.com/Azure-Samples/j…
wchigit Oct 31, 2025
a549b1e
Merge branch 'main' of https://github.com/Azure-Samples/java-migratio…
wchigit Nov 4, 2025
ba4239c
rebase 2
wchigit Nov 4, 2025
3860d01
minor
wchigit Nov 4, 2025
d96e211
paraphrase and format
wchigit Nov 4, 2025
afffbe8
remove old script
wchigit Nov 4, 2025
b5642e7
add expected result
wchigit Nov 6, 2025
3639664
recover clean-up and refine expected
wchigit Nov 7, 2025
3777425
refine sentence
wchigit Nov 7, 2025
562120f
add state to top
wchigit Nov 10, 2025
31d6da2
Merge branch 'main' of https://github.com/Azure-Samples/java-migratio…
wchigit Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 14 additions & 42 deletions asset-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ In this workshop, you will use the **GitHub Copilot app modernization** extensio
* [main](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/main/asset-manager): The original state of the asset-manager application.
* [workshop/java-upgrade](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/workshop/java-upgrade/asset-manager): The project state after assessment and Java upgrading steps.
* [workshop/expected](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/workshop/expected/asset-manager): The project state after assessment, Java upgrading, and migration steps.
* [workshop/deployment-expected](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/workshop/deployment-expected/asset-manager): The project state after containerization and deployment steps.

## Current Architecture
```mermaid
Expand Down Expand Up @@ -233,7 +234,7 @@ In this section, you will use custom tasks to expose health endpoints for your a
### Containerize Applications

Now that you have successfully migrated your Java application to use Azure services, the next step is to prepare it for cloud deployment by containerizing both the web and worker modules. In this section, you will use **Containerization Tasks** to containerize your migrated applications.
> Note: If you have any problems with the previous migration step, you can start from the [workshop/expected](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/workshop/expected/asset-manager) branch for the deployment operation.
> Note: If you encounter any issues with the previous migration step, you can directly proceed with the containerization step using the [workshop/expected](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/workshop/expected/asset-manager) branch.

1. Open the sidebar of `GITHUB COPILOT APP MODERNIZATION`. In **Tasks** view, click the **Run Task** button of **Java** -> **Containerization Tasks** -> **Containerize Application**.

Expand All @@ -249,54 +250,25 @@ Now that you have successfully migrated your Java application to use Azure servi

### Deploy to Azure

At this point, you have successfully migrated the sample Java application `asset-manager` to Azure Database for PostgreSQL (Spring), Azure Blob Storage, and Azure Service Bus, and exposed health endpoints via Spring Boot Actuator.
> Note: If you encounter any issues with the previous migration step, you can directly proceed with the deployment step using the [workshop/expected](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/workshop/expected/asset-manager) branch.
At this point, you have successfully migrated the sample Java application `asset-manager` to Azure Database for PostgreSQL (Spring), Azure Blob Storage, and Azure Service Bus, and exposed health endpoints via Spring Boot Actuator. Now, you can start the deployment to Azure.
> Note: If you encounter any issues with the previous migration step, you can directly proceed with the deployment step using the [workshop/expected](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/workshop/expected/asset-manager) branch.

Now, you can deploy the migrated application to Azure using the Azure CLI after you identify a working location for your Azure resources. 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.
1. Open the sidebar of `GITHUB COPILOT APP MODERNIZATION`. In **Tasks** view, click the **Run Task** button of **Java** -> **Deployment Tasks** -> **Provision Infrastructure and Deploy to Azure**.

1. Run the following command to list all available locations for the current subscription.
![Run Deployment task](doc-media/deployment-run-task.png)
1. A predefined prompt will be populated in the Copilot Chat panel with Agent Mode. The default hosting Azure service is Azure Container Apps.To change the hosting service to **Azure Kubernetes Service** (AKS), click on the prompt in the Copilot Chat panel and edit the last sentence of the prompt to **Hosting service: AKS**.

```bash
az account list-locations -o table
```
![Deployment prompt](doc-media/deployment-prompt.png)
1. Click ****Continue**/**Allow** if pop-up notifications to let Copilot Agent analyze the project and create a deployment plan in **plan.copilotmd** with Azure resources architecture, recommended Azure resources for project and security configurations, and execution steps for deployment.

1. Select a location from column **Name** in the output.
1. View the architecture diagram, resource configurations, and execution steps in the plan. Click **Keep** to save the plan and type in **Execute the plan** to start the deployment.

1. Run the following command to list all available SKUs in the selected location for Azure Database for PostgreSQL Flexible Server:
![Deployment execute](doc-media/deployment-execute.png)
1. When prompted, click **Continue**/**Allow** in chat notifications or type **y**/**yes** in terminal as Copilot Agent follows the plan and leverages agent tools to create and run provisioning and deployment scripts, fix potential errors, and finish the deployment. You can also check the deployment status in **progress.copilotmd**. **DO NOT interrupt** when provisioning or deployment scripts are running.

```bash
az postgres flexible-server list-skus --location <your location> -o table
```
![Deployment progress](doc-media/deployment-progress.png)

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.

```text
SKU Tier VCore Memory Max Disk IOPS
----------------- --------------- ------- -------- ---------------
Standard_B1ms Burstable 1 2 GiB 640e
```

You can either run the deployment script locally or use GitHub Codespaces. The recommended approach is to run the deployment script in GitHub Codespaces, as it provides a ready-to-use environment with all the necessary dependencies.

Deploy using GitHub Codespaces:
1. Commit and push the changes to your forked repository.
1. Follow the instructions in [Use GitHub Codespaces for Deployment](README.md#use-github-codespaces-for-deployment) to deploy the app to Azure.

Deploy using the local environment by running the deployment script in the terminal:
1. Run `az login` to sign in to Azure.
1. Run the following commands to deploy the app to Azure:

Windows:
```batch
scripts\deploy-to-azure.cmd -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
```

Linux:
```bash
scripts/deploy-to-azure.sh -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
```

Once the deployment script completes successfully, it will output the URL of the web application. Open the URL in a browser to verify that the application is running as expected.
> Note: If you encounter any issues with the deployment step, you can refer to the expected Copilot-generated deployment scripts in `/.azure` folder of the [workshop/deployment-expected](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/workshop/deployment-expected/asset-manager) branch to compare your deployment scripts and troubleshoot the problems.

#### Clean up

Expand Down
Binary file added asset-manager/doc-media/deployment-aks-prompt.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 modified asset-manager/doc-media/deployment-architecure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 asset-manager/doc-media/deployment-execute.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 modified asset-manager/doc-media/deployment-progress.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 modified asset-manager/doc-media/deployment-prompt.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 modified asset-manager/doc-media/trigger-assessment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified asset-manager/scripts/startapp.sh
100644 → 100755
Empty file.
Empty file modified asset-manager/scripts/stopapp.sh
100644 → 100755
Empty file.