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
Copy file name to clipboardExpand all lines: asset-manager/WORKSHOP.md
+8-67Lines changed: 8 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
> [!IMPORTANT]
4
4
> `GitHub Copilot App Modernization - Java on Azure` is in preview and is subject to change before becoming generally available.
5
5
6
-
`GitHub Copilot App Modernization - Java on Azure` (also referred to as App Modernization for Java on Azure) assists with app assessment, planning and code remediation. It automates repetitive tasks, boosting developer confidence and speeding up the Azure migration and ongoing optimization.
6
+
`GitHub Copilot App Modernization - Java on Azure` (also referred to as GitHub Copilot App Modernization - Java on Azure) assists with app assessment, planning and code remediation. It automates repetitive tasks, boosting developer confidence and speeding up the Azure migration and ongoing optimization.
7
7
8
8
In this workshop, you learn how to use `GitHub Copilot App Modernization - Java on Azure` to assess and migrate a sample Java application `asset-manager` to Azure. For more information about the sample application, see [Asset Manager](README.md).
9
9
@@ -19,7 +19,7 @@ To successfully complete this workshop, you need the following:
19
19
-[Maven 3.9.9](https://maven.apache.org/install.html): Required for the code remediation feature.
20
20
-[Azure subscription](https://azure.microsoft.com/free/): Required to deploy the migrated application to Azure.
21
21
-[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.
22
-
- Fork the [GitHub repository](https://github.com/Azure-Samples/java-migration-copilot-samples) that contains the sample Java application. **MAKE SURE TO UNCHECK THE BOX "Copy the `main` branch only.**Clone it to your local machine. Open the `asset-manager` folder in VSCode and checkout the `workshop` branch.
22
+
- Fork the [GitHub repository](https://github.com/Azure-Samples/java-migration-copilot-samples) that contains the sample Java application. Clone it to your local machine. Open the `asset-manager` folder in VSCode and checkout the `workshop` branch.
@@ -35,7 +35,7 @@ The following sections guide you through the process of migrating the sample Jav
35
35
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.
36
36
37
37
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.
38
-
1. Open the extension `App Modernization for Java on Azure`.
38
+
1. Open the extension `GitHub Copilot App Modernization - Java on Azure`.
39
39
1. The **Assess** button looks a triangle pointing right. Select **Assess**, the Github Copilot chat window will be opened and propose to run Modernization Assessor. Please confirm the tool usage by clicking **Continue**.
40
40
41
41
> **NOTE**: If you are asked to allow the tool access the language models provided by GitHub Copilot Chat, select **Allow** to proceed.
@@ -61,76 +61,17 @@ Recall that the sample Java application `asset-manager` uses AWS S3 for image st
61
61
62
62
Now, you migrate the **Worker Service** to use Azure Blob Storage and Azure Service Bus as well, by using custom formula created from existing commits that migrated the **Web Application**.
63
63
64
-
1. Open the sidebar of `App Modernization for Java on Azure`. Hover the mouse over the **Formulas** section. Select **Create formula from source control**. This icon looks like two circles with arrows pointing to the other circle. Type **migrate web** to search for the commits that migrated the **Web Application**, and you should see two commits listed:
64
+
1. Open the sidebar of `GitHub Copilot App Modernization - Java on Azure`. Hover the mouse over the **Formulas** section. Select **Create formula from source control**. This icon looks like two circles with arrows pointing to the other circle. Type **migrate web** to search for the commits that migrated the **Web Application**, and you should see two commits listed:
65
65
* migrate web rabbitmq to azure service bus
66
66
* migrate web s3 to azure blob storage
67
67
1. Select these two commits. Click **Create New** to create a new custom formula.
68
68
1. Formula name, formula description, and code location patterns will be generated in order. Press `Enter` repeatedly to confirm.
69
-
1. Select and run the custom formula you created in the FORMULAS section of the sidebar of `App Modernization for Java on Azure`. Follow the same steps as the predefined formula to review and apply the changes, and run the **Java Application Build-Fix** tool to apply build fixes.
69
+
1. Select and run the custom formula you created in the FORMULAS section of the sidebar of `GitHub Copilot App Modernization - Java on Azure`. Follow the same steps as the predefined formula to review and apply the changes, and run the **Java Application Build-Fix** tool to apply build fixes.
70
70
1. Review the proposed code changes and click **Keep** to apply them.
71
71
72
72
## Deploy to Azure
73
73
74
-
At this point, you have successfully migrated the sample Java application `asset-manager` to use Azure Database for PostgreSQL, Azure Blob Storage, and Azure Service Bus. Now, you deploy the migrated application to Azure using the Azure CLI after you identify a working location for your Azure resources.
74
+
At this point, you have successfully migrated the sample Java application `asset-manager` to use Azure Database for PostgreSQL, Azure Blob Storage, and Azure Service Bus.
75
75
76
-
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.
77
-
78
-
1. Run the following command to list all available locations for your account:
79
-
80
-
```bash
81
-
az account list-locations -o table
82
-
```
83
-
84
-
1. Try a location from column **Name** in the output. For example, `eastus2` stands for **East US 2**.
85
-
86
-
1. Run the following command to list all available SKUs in the selected location for Azure Database for PostgreSQL Flexible Server:
87
-
88
-
```bash
89
-
az postgres flexible-server list-skus --location <your location> -o table
90
-
```
91
-
92
-
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.
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.
101
-
102
-
Deploy using GitHub Codespaces:
103
-
1. Commit and push the changes to your forked repository.
104
-
1. Follow instructions in [Use GitHub Codespaces for Deployment](README.md#use-github-codespaces-for-deployment) to deploy the app to Azure.
105
-
106
-
Deploy using local environment by running the deployment script in the terminal:
107
-
1. Run `az login` to sign in to Azure.
108
-
1. Run the following commands to deploy the app to Azure:
109
-
110
-
Winndows:
111
-
```batch
112
-
scripts\deploy-to-azure.cmd -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
113
-
```
114
-
115
-
Linux:
116
-
```bash
117
-
scripts/deploy-to-azure.sh -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
118
-
```
119
-
120
-
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.
121
-
122
-
## Clean up
123
-
124
-
When you are done with the workshop, clean up the Azure resources to avoid incurring costs.
125
-
126
-
Winndows:
127
-
```batch
128
-
scripts\cleanup-azure-resources.cmd -ResourceGroupName <your resource group name>
129
-
```
130
-
131
-
Linux:
132
-
```bash
133
-
scripts/cleanup-azure-resources.sh -ResourceGroupName <your resource group name>
134
-
```
135
-
136
-
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**.
76
+
To deploy your app to Azure, you can use the Azure GitHub Copilot to automatically generate IOC files for quick deployment.
77
+
See https://learn.microsoft.com/en-us/azure/developer/github-copilot-azure/quickstart-deploy-existing-app for more details.
0 commit comments