|
7 | 7 | - [Migrated Infrastructure](#migrated-infrastructure) |
8 | 8 | - [Migrated Architecture](#migrated-architecture) |
9 | 9 | - [Prerequisites](#prerequisites) |
10 | | - - [Install GitHub Copilot App Modernization for Java (Preview)](#install-github-copilot-app-modernization-for-java-preview) |
| 10 | + - [Install GitHub Copilot app modernization](#install-github-copilot-app-modernization) |
11 | 11 | - [Migrate the Sample Java Application](#migrate-the-sample-java-application) |
12 | 12 | - [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) |
| 13 | + - [Migrate to Azure Database for PostgreSQL Flexible Server using Predefined Tasks](#migrate-to-azure-database-for-postgresql-flexible-server-using-predefined-tasks) |
| 14 | + - [Migrate to Azure Blob Storage and Azure Service Bus using Custom Tasks](#migrate-to-azure-blob-storage-and-azure-service-bus-using-custom-tasks) |
15 | 15 | - [Deploy to Azure](#deploy-to-azure) |
16 | 16 | - [Clean up](#clean-up) |
17 | 17 |
|
18 | | -> [!IMPORTANT] |
19 | | -> `GitHub Copilot App Modernization for Java` is in preview and is subject to change before becoming generally available. |
| 18 | +GitHub Copilot app modernization, assists with app assessment, planning and code remediation. It automates repetitive tasks, boosting developer confidence and speeding up the Azure migration and ongoing optimization. |
20 | 19 |
|
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. |
22 | | - |
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. |
| 20 | +In this workshop, you learn how to use GitHub Copilot app modernization to assess and migrate a sample Java application `asset-manager` to Azure. |
24 | 21 |
|
25 | 22 | ## About this Project |
26 | 23 |
|
@@ -200,81 +197,75 @@ To successfully complete this workshop, you need the following: |
200 | 197 | - [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 | 198 | - 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 | 199 |
|
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: |
208 | | -```json |
209 | | - "enable-proposed-api": ["Microsoft.migrate-java-to-azure"], |
210 | | -``` |
211 | | -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. |
| 200 | +## Install GitHub Copilot app modernization |
214 | 201 |
|
| 202 | +In VSCode, open the Extensions view from Activity Bar, search `GitHub Copilot app modernization` 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. |
215 | 203 |
|
216 | 204 | ## Migrate the Sample Java Application |
217 | 205 |
|
218 | | -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). |
| 206 | +The following sections guide you through the process of migrating the sample Java application `asset-manager` to Azure using GitHub Copilot app modernization. |
219 | 207 |
|
220 | 208 | ### Assess Your Java Application |
221 | 209 |
|
222 | 210 | 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 | 211 |
|
224 | 212 | 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 | | -1. Open the extension `App Modernization for Java`. |
226 | | -1. 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**. |
| 213 | +1. Open the extension `GitHub Copilot app modernization`. |
| 214 | +1. In the **QUICKSTART** view, click **Migrate to Azure** button to trigger the Modernization Assessor. |
227 | 215 |
|
228 | 216 |  |
229 | 217 |
|
230 | | - > **NOTE**: If you are asked to allow the tool access the language models provided by GitHub Copilot Chat, select **Allow** to proceed. |
231 | | -
|
232 | | -1. After each step, please manually input "continue" to confirm and proceed. |
233 | 218 | 1. Wait for the assessment to be completed and the report to be generated. |
234 | | -1. Review the **Summary** report. Select **Propose Solution** to view the proposed solutions for the issues identified in the summary report. |
235 | | -1. For this workshop, deselect all solutions and select **Migrate to Azure Database for PostgreSQL (SDK on Public Cloud)** in the Solution report, then select **Confirm Solution**. |
| 219 | +1. Review the **Assessment Report**. Select the **Issues** tab to view the proposed solutions for the issues identified in the report. |
| 220 | +1. For this workshop, select **Migrate to Azure Database for PostgreSQL (Spring)** in the Solution list, then click **Run Task**. |
| 221 | + |
236 | 222 |  |
237 | | -1. In the Migrate report, click **Migrate**. |
238 | 223 |
|
239 | | -### Migrate to Azure Database for PostgreSQL Flexible Server using Predefined Formula |
| 224 | +### Migrate to Azure Database for PostgreSQL Flexible Server using Predefined Tasks |
240 | 225 |
|
241 | | -1. After clicking the Migrate button in the Solution Report, Copilot chat window will be opened with Agent Mode. |
242 | | -1. In Copilot chat window, click **Continue** repeatedly to confirm each tool action. The Copilot Agent uses various tools to facilitate application modernization. Each tool's usage requires confirmation by clicking the `Continue` button. |
243 | | -1. After each step, please manually input "Continue" to confirm and proceed. |
244 | | -1. Click **Continue** to confirm to run **Java Application Build-Fix** tool. This tool will attempt to resolve any build errors, in up to 10 iterations. |
245 | | -1. After the Build-Fix tool begins, click **Continue** to proceed and show progress and migration summary. |
| 226 | +1. After clicking the **Run Task** button in the Solution Report, Copilot Chat panel will be opened with Agent Mode. |
| 227 | +1. The Copilot Agent will firstly analyse the project and generate a migratin plan. |
| 228 | +1. After the plan is generated, Copilot chat will stop with two generated files: **plan.md** and **progress.md**. Please manually input "Continue" or "Proceed" in the chat to confirm the plan and proceed its following actions to execute the plan. |
| 229 | +1. When the code is migrated, the extension will prepare the **CVE Validation and Fixing** process. Click **Allow** to proceed. |
246 | 230 | 1. Review the proposed code changes and click **Keep** to apply them. |
247 | 231 |
|
248 | | -### Migrate to Azure Blob Storage and Azure Service Bus using Custom Formula |
| 232 | +### Migrate to Azure Blob Storage and Azure Service Bus using Custom Tasks |
249 | 233 |
|
250 | 234 | The Application `asset-manager` used AWS S3 for image storage and Spring AMQP with RabbitMQ for message queuing. We have already migrated the code of **Web** module to use Azure Blob Storage and Azure Service Bus. These changes are recorded in two separate commits in the `main` branch. |
251 | 235 |
|
252 | 236 | The following steps demonstrate how to generate custom formulas based on those existing commits. Then, you can migrate **Worker** module to use Azure Blob Storage and Azure Service Bus as well, using the created custom formulas. |
253 | 237 |
|
254 | | -1. Open the sidebar of `App Modernization for Java`. 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. |
| 238 | +1. Open the sidebar of `GITHUB COPILOT APP MODERNIZATION`. Hover the mouse over the **Tasks** view. Select **Create a Custom Task**. |
| 239 | + |
255 | 240 |  |
| 241 | +1. In the poped up quick-pick window, select **Create new task**. |
| 242 | + |
| 243 | +  |
256 | 244 | 1. Type **migrate web** to search for the commits that migrated the **Web** module, and you should see two commits listed: |
257 | 245 | * migrate web RabbitMQ to azure service bus |
258 | 246 | * migrate web s3 to azure blob storage |
259 | 247 |
|
260 | 248 |  |
261 | | -1. You will create two custom formulas based on the two commits. First, create the formula for migrating RabbitMQ. Select the commit of **migrate web RabbitMQ to azure service bus**, click OK. |
262 | | -1. Click **Create New** to create a new custom formula. |
263 | | -1. Default formula name will be generated. Give it a new name: "custom formula migrate RabbitMQ". Press `Enter` to confirm. Then, formula description, and search patterns will be generated in order. Press `Enter` repeatedly to confirm. |
264 | | -1. Now, the custom formula for migrating RabbitMQ is generated and shows in the section of formulas in of `App Modernization for Java` blade. |
265 | | -  |
266 | | -1. Create another custom formula for migrating S3. Follow the same steps you just did, select the commit **migrate web s3 to azure blob storage** to create a new custom formula with name: "custom formula migrate s3". |
267 | | -1. Now, the two custom formulas are ready. |
| 249 | +1. You will create two custom tasks based on the two commits. First, create the task for migrating RabbitMQ. Select the commit of **migrate web RabbitMQ to azure service bus**, click OK. |
| 250 | +1. For the next question of **Select uncommited changes (Optional)**, select nothing and click OK. |
| 251 | +1. For the next question of **Describe changes using local files (Optional)**, choose **Skip file selection**. |
| 252 | + |
| 253 | +  |
| 254 | +1. Default task name will be generated. Give it a new name: "custom task migrate RabbitMQ". Press `Enter` to confirm. Then, task description, and search patterns will be generated in order. Press `Enter` repeatedly to confirm. |
| 255 | +1. Now, the custom task for migrating RabbitMQ is generated and shows under the item of `My Tasks` of the `Tasks` view. |
| 256 | +1. Create another custom task for migrating S3. Follow the same steps you just did, select the commit **migrate web s3 to azure blob storage** to create a new custom task with name: "custom task migrate s3". |
| 257 | +1. Now, the two custom tasks are ready. |
268 | 258 |
|
269 | 259 |  |
270 | | -1. Select and run the two custom formulas one by one you created in the formulas section of `App Modernization for Java`, one at a time. |
| 260 | +1. Select and run the two custom tasks one by one you created in the `Tasks` view of `GITHUB COPILOT APP MODERNIZATION`, one at a time. |
| 261 | + |
271 | 262 |  |
272 | | -1. 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. |
| 263 | +1. Follow the same steps as the predefined task to review and apply the changes. |
273 | 264 | 1. Review the proposed code changes and click **Keep** to apply them. |
274 | 265 |
|
275 | 266 | ## Deploy to Azure |
276 | 267 |
|
277 | | -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. Now, you can deploy the migrated application to Azure using the Azure CLI after you identify a working location for your Azure resources. |
| 268 | +At this point, you have successfully migrated the sample Java application `asset-manager` to Migrate to Azure Database for PostgreSQL (Spring), Azure Blob Storage, and Azure Service Bus. Now, you can deploy the migrated application to Azure using the Azure CLI after you identify a working location for your Azure resources. |
278 | 269 |
|
279 | 270 | 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. |
280 | 271 |
|
|
0 commit comments