diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/Readme.md b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/Readme.md index 5939d2dae..bbe1ac209 100644 --- a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/Readme.md +++ b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/Readme.md @@ -1,67 +1,56 @@ -# **Master Template MicroHack** -# **MicroHack Template** +# **Migrate & Modernize Applications with GitHub Copilot** -- [**MicroHack introduction**](#MicroHack-introduction) +- [**MicroHack introduction**](#microhack-introduction) - [**MicroHack context**](#microhack-context) - [**Objectives**](#objectives) - [**MicroHack Challenges**](#microhack-challenges) - [**Contributors**](#contributors) + # MicroHack introduction -This MicroHack scenario walks through the use of ... with a focus on the best practices and the design principles. Specifically, this builds up to include working with an existing infrastructure. +This MicroHack guides you through migrating and modernizing real-world applications to Azure using **GitHub Copilot App Modernization**. You will work across two technology stacks — **.NET** and **Java (Spring Boot)** — and use the **modernize CLI** agent to assess, upgrade, and deploy applications at scale. -![image](Path to the high level architecture ) +The lab builds up progressively: you start by driving multi-repository assessment and framework upgrades from the command line, and finish by provisioning Azure infrastructure and deploying the modernized apps. -This lab is not a full explanation of .... as a technology, please consider the following articles required pre-reading to build foundational knowledge. +# MicroHack context -Optional (read this after completing this lab to take your learning even deeper!) +Modernizing legacy applications is often slow and error-prone: upgrading frameworks, resolving cloud readiness issues, replacing non-Azure dependencies, and standing up infrastructure all take significant manual effort. GitHub Copilot App Modernization uses AI to accelerate every phase of this journey — assessment, code upgrade, migration planning, and deployment — while keeping you in control through reviewable plans and pull requests. -Describe the scenario here... - -# MicroHack context -This MicroHack scenario walks through the use of.... +Across the challenges you will work with **PhotoAlbum** and **PhotoAlbum-Java** — a .NET and a Spring Boot sample app that you upgrade and deploy to Azure using the modernize CLI. # Objectives After completing this MicroHack you will: -- Know how to build a ... -- Understand default .. -- Understand how .. +- Understand how to use the GitHub Copilot App Modernization agent (modernize CLI). +- Know how to assess applications for cloud readiness and framework upgrade opportunities. +- Be able to upgrade .NET and Java applications to their latest framework versions. +- Understand how to run batch assessments across multiple repositories. +- Know how to create a cloud modernization plan, resolve cloud readiness issues, and migrate dependencies (for example, Oracle to PostgreSQL). +- Be able to provision Azure infrastructure and deploy modernized apps to Azure Container Apps. # MicroHack challenges ## General prerequisites -This MicroHack has a few but important prerequisites - -In order to use the MicroHack time most effectively, the following tasks should be completed prior to starting the session. +This MicroHack has a few but important prerequisites. -With these pre-requisites in place, we can focus on building the differentiated knowledge in ... that is required when working with the product, rather than spending hours repeating relatively simple tasks such as setting up.... - -In summary: - -- Azure Subscription -- Resource Group -- Service 1 -- Service 2 - -Permissions for the deployment: -- Contributor on your Resource Group -- Other necessary permissions +In order to use the MicroHack time most effectively, the following should be in place before you start: +- An **Azure Subscription** with permission to create resource groups and resources (Contributor or Owner). +- A **GitHub account** to fork the sample repositories. +- **Visual Studio Code** and/or a terminal with the **GitHub Copilot App Modernization agent (modernize CLI)** installed. +- **Docker Desktop**, **Git**, and the relevant SDKs (.NET and Java) installed locally. +- An active **GitHub Copilot** subscription. ## Challenges -* [Challenge 1 - title](challenges/challenge-01.md) **<- Start here** -* [Challenge 2 - title](challenges/challenge-02.md) +* [Challenge 2 - Batch Upgrade a Java App and a .NET App](challenges/challenge-02.md) **<- Start here** +* [Challenge 3 - Modernize the Upgraded Apps and Deploy Them to Azure](challenges/challenge-03.md) +* [Finish](challenges/finish.md) ## Solutions - Spoilerwarning -* [Solution 1 - title](./walkthrough/challenge-01/solution-01.md) -* [Solution 2 - title](./walkthrough/challenge-02/solution-02.md) - - +* [Solution 2 - Batch Upgrade a Java App and a .NET App](./walkthrough/challenge-02/solution-02.md) +* [Solution 3 - Modernize the Upgraded Apps and Deploy Them to Azure](./walkthrough/challenge-03/solution-03.md) -## Contributors -* Nils Bankert [GitHub](https://github.com/nilsbankert); [LinkedIn](https://www.linkedin.com/in/nilsbankert/) diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-01.md b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-01.md index 30ac2d7cf..ce3c2e9de 100644 --- a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-01.md +++ b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-01.md @@ -1,29 +1,5 @@ -# Modernize a .NET Application +# Knowledge transfer on Agentic AI **[Home](../Readme.md)** - [Next Challenge Solution](challenge-02.md) -## Goal - -Modernize the Contoso University .NET Framework application to .NET 9 and deploy it to Azure App Service using GitHub Copilot’s AI-assisted tooling. - -## Actions - -* Fork `https://github.com/crgarcia12/migrate-modernize-lab`, clone your fork in Visual Studio 2022, and confirm the ContosoUniversity project builds. -* Use the Visual Studio “Modernize” flow to sign in to GitHub Copilot, select Claude Sonnet 4.5, and run the guided upgrade to .NET 9 until `dotnet-upgrade-report.md` is produced. -* Rerun “Modernize” to start “Migrate to Azure,” review the cloud readiness assessment, and resolve authentication findings by migrating from Windows AD to Microsoft Entra ID. -* Approve Copilot’s Azure App Service deployment workflow, wait for completion, and validate the site in Azure. - -## Success criteria - -* ContosoUniversity solution is forked, cloned, and builds locally. -* The application is upgraded from .NET Framework to .NET 9 with a generated upgrade report. -* Mandatory cloud readiness issues, including authentication migration to Microsoft Entra ID, are fully resolved. -* Azure App Service deployment completes successfully and the modernized app runs in Azure. - -## Learning resources - -* https://learn.microsoft.com/visualstudio/ide/visual-studio-github-copilot-extension -* https://learn.microsoft.com/dotnet/architecture/modernize-with-azure-containers/ -* https://learn.microsoft.com/dotnet/core/migration/ -* https://learn.microsoft.com/azure/app-service/quickstart-dotnetcore -* https://learn.microsoft.com/azure/active-directory/develop/quickstart-v2-aspnet-core-webapp +To be updated \ No newline at end of file diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-02.md b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-02.md index 1f6fc4b62..906b8268f 100644 --- a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-02.md +++ b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-02.md @@ -1,38 +1,42 @@ -# Modernize the Asset Manager Java Application +# Batch Upgrade a Java App and a .NET App -[Previous Challenge Solution](challenge-01.md) - **[Home](../Readme.md)** - [Next Challenge Solution](finish.md) +[Previous Challenge Solution](challenge-01.md) - **[Home](../Readme.md)** - [Next Challenge Solution](challenge-03.md) ## Goal -Modernize the Asset Manager Spring Boot application for Azure by replacing AWS S3 dependencies with Azure services through the GitHub Copilot App Modernization workflow. +Use the GitHub Copilot App Modernization agent (modernize CLI) to assess and upgrade two applications at once — a Spring Boot (Java) app and an ASP.NET (.NET) app — bringing each to its latest framework version before any cloud migration work begins. ## Actions -* Prepare the workstation by launching Docker Desktop, cloning the `migrate-modernize-lab` repo, and opening `src/AssetManager` in VS Code. -* Authenticate to GitHub, ensure the GitHub Copilot App Modernization extension (Claude Sonnet 4.5) is installed, and review prerequisite setup. -* Run `scripts\startapp.cmd` to validate the existing containers (RabbitMQ, Postgres) and confirm the app is reachable at `http://localhost:8080`. -* Launch the AppCAT assessment from the extension, track CLI installation, and wait for the identified cloud readiness issues and Java upgrade opportunities. -* Review the assessment insights, focusing on the AWS S3 to Azure Blob Storage migration recommendation and understanding the priority levels. -* Execute the guided migration task, inspect the generated `plan.md`, and continue the conversation to apply the proposed code refactoring. -* Monitor `progress.md`, Maven/Gradle changes, configuration updates, and Spring Cloud Azure versions as the migration proceeds. -* Allow the automated validation stages (CVE scans, builds, consistency checks, tests) to complete and remediate any issues flagged. -* Re-run `scripts\startapp.cmd`, verify Blob Storage integration locally, and test application functionality end-to-end. -* Optionally proceed with additional modernization tasks surfaced in the assessment to continue improving the workload. +* Fork the two sample repositories into your own GitHub account: + * PhotoAlbum-Java (Spring Boot): `https://github.com/Azure-Samples/PhotoAlbum-Java` + * PhotoAlbum (.NET): `https://github.com/Azure-Samples/PhotoAlbum` +* Prepare a working directory and install the GitHub Copilot App Modernization agent (modernize CLI), which you will use end-to-end for assessment, upgrade, planning, and execution. +* Create a repositories config file so the CLI can operate on both apps in a single batch run. +* Run a **batch assessment** across both repositories, selecting the *Upgrade* and *Cloud readiness* analyses with full analysis coverage. Let the assessment run locally and wait for it to complete. +* Explore the assessment output: the **aggregated report** (overall recommendations, target platforms, upgrade paths, and migration waves) and the **per-repository reports** (detailed findings per app). +* Because a batch upgrade requires both repositories to share the same language, **upgrade each app individually**: + * Upgrade the .NET app to the version recommended in the assessment (.NET 10). + * Upgrade the Java app to the versions recommended in the assessment (Java 25 and Spring Boot 4.0). +* Confirm each upgrade reports success, then commit and push the changes to each respective forked repository. + +> [!TIP] +> The assessment and each upgrade can take several minutes to run. Review the generated reports while you wait — they explain *why* each recommendation was made. ## Success criteria -* Docker containers start successfully and the legacy app runs locally before changes. -* AppCAT completes with nine cloud readiness issues and four Java upgrade opportunities identified. -* The AWS S3 to Azure Blob Storage migration task executes with updated dependencies and configuration. -* All automated validation stages pass without unresolved issues. -* The modernized application starts locally using Azure Blob Storage with no storage errors. -* Migration activities are traceable through dedicated plan and progress artifacts for rollback readiness. +* Both PhotoAlbum-Java and PhotoAlbum are forked and available in your working directory. +* The modernize CLI is installed and configured to target both repositories from a config file. +* A batch assessment completes and produces both an aggregated report and per-repository reports. +* The .NET app is upgraded to .NET 10 and the Java app is upgraded to Java 25 / Spring Boot 4.0, each reporting a successful upgrade. +* All upgrade changes are committed and pushed to the respective remote repositories. + +> Need the detailed, step-by-step walkthrough? See the [Challenge 2 Solution](../walkthrough/challenge-02/solution-02.md). ## Learning resources +* [GitHub Copilot App Modernization – modernization agent quickstart](https://learn.microsoft.com/azure/developer/github-copilot-app-modernization/modernization-agent/quickstart) +* [Batch assess multiple repositories](https://learn.microsoft.com/azure/developer/github-copilot-app-modernization/modernization-agent/batch-assess) +* [Upgrade .NET applications](https://learn.microsoft.com/dotnet/core/porting/) +* [Spring Boot upgrade guidance](https://learn.microsoft.com/azure/developer/java/spring-framework/) * [GitHub Copilot for VS Code](https://code.visualstudio.com/docs/copilot/overview) -* [Azure SDK for Java](https://learn.microsoft.com/azure/developer/java/sdk/) -* [Migrate from AWS to Azure](https://learn.microsoft.com/azure/architecture/aws-professional/) -* [Azure Blob Storage for Java](https://learn.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-java) -* [Spring Cloud Azure](https://learn.microsoft.com/azure/developer/java/spring-framework/) -* [AppCAT Assessment Tool](https://learn.microsoft.com/azure/developer/java/migration/migration-toolkit-intro) diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-03.md b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-03.md new file mode 100644 index 000000000..5c5958b44 --- /dev/null +++ b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/challenge-03.md @@ -0,0 +1,41 @@ +# Modernize the Upgraded Apps and Deploy Them to Azure + +[Previous Challenge Solution](challenge-02.md) - **[Home](../Readme.md)** - [Next Challenge Solution](finish.md) + +## Goal + +Take the two apps you upgraded in Challenge 2 and use the modernize CLI to create a cloud modernization plan, resolve cloud readiness issues, provision Azure infrastructure, and deploy both the Java and .NET applications to Azure. + +## Actions + +* Using the modernize CLI, create a **cloud modernization plan** that targets both repositories from your config file. Instruct the plan to: + * Ignore any upgrade recommendations from the earlier assessment (the apps are already upgraded). + * Focus on resolving cloud readiness issues, provisioning Azure infrastructure for each app, and deploying each app to Azure. + * Migrate any OracleDB dependency to PostgreSQL if present. +* Review the generated plan and its tasks, then review and **merge the pull request** the agent produces. +* **Deploy the PhotoAlbum-Java app**: pull the latest plan branch, execute the plan with the modernize CLI, and wait for all tasks to finish. Validate the deployment by inspecting the created resource group in Azure and browsing to the Frontend Container App URL. +* **Deploy the PhotoAlbum (.NET) app**: pull the latest plan branch and execute the plan. If the plan does not provision infrastructure or deploy resources for this app, create a second, more explicit plan (for example, an "infra-setup-plan" that provisions Azure resources and deploys the app), then execute it. +* Validate the .NET deployment the same way — confirm the Azure resources and open the Frontend Container App URL. + +> [!TIP] +> If a deployment step fails, use GitHub Copilot CLI to help diagnose and fix the error before retrying. + +> [!NOTE] +> Plan generation and execution can each take a while (roughly 15–20 minutes per plan). This is a good point to take a break while the agent works. + +## Success criteria + +* A cloud modernization plan is generated for both repositories and its pull request is reviewed and merged. +* The PhotoAlbum-Java app is deployed to Azure, with its resources visible in a resource group and the Frontend Container App reachable. +* The PhotoAlbum (.NET) app is deployed to Azure — creating an explicit infrastructure/deployment plan where needed — with its resources visible and the Frontend Container App reachable. +* Both applications run successfully in Azure. + +> Need the detailed, step-by-step walkthrough? See the [Challenge 3 Solution](../walkthrough/challenge-03/solution-03.md). + +## Learning resources + +* [GitHub Copilot App Modernization – create a modernization plan](https://learn.microsoft.com/azure/developer/github-copilot-app-modernization/modernization-agent/quickstart) +* [Azure Container Apps documentation](https://learn.microsoft.com/azure/container-apps/) +* [Migrate Oracle to Azure Database for PostgreSQL](https://learn.microsoft.com/azure/postgresql/migrate/) +* [GitHub Copilot CLI](https://docs.github.com/copilot/github-copilot-in-the-cli) +* [Azure deployment best practices](https://learn.microsoft.com/azure/architecture/) diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/finish.md b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/finish.md index 0a4f06df0..0a05961a3 100644 --- a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/finish.md +++ b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/challenges/finish.md @@ -1,49 +1,46 @@ # Finish -[Previous Challenge Solution](challenge-02.md) - **[Home](../Readme.md)** +[Previous Challenge Solution](challenge-03.md) - **[Home](../Readme.md)** -Congratulations! You've completed the Azure Migration & Modernization MicroHack. +Congratulations! You've completed the Migrate & Modernize Applications with GitHub Copilot MicroHack. **What You've Accomplished:** -Throughout this MicroHack, you've gained hands-on experience with the complete migration lifecycle: +Throughout this MicroHack, you've gained hands-on experience with the complete migration lifecycle using the GitHub Copilot App Modernization agent (modernize CLI): -### Challenge 1: .NET Application Modernization +### Challenge 2: Batch Upgrade a Java App and a .NET App -- Cloned and configured the Contoso University .NET application repository -- Used GitHub Copilot App Modernization extension in Visual Studio -- Performed comprehensive code assessment for cloud readiness -- Upgraded application from legacy .NET Framework to .NET 9 -- Migrated from Windows AD to Microsoft Entra ID authentication -- Resolved cloud readiness issues identified in the upgrade report -- Deployed the modernized application to Azure App Service +- Forked the PhotoAlbum-Java (Spring Boot) and PhotoAlbum (.NET) sample repositories +- Installed and configured the GitHub Copilot App Modernization agent (modernize CLI) +- Ran a batch assessment across both repositories for Upgrade and Cloud readiness +- Reviewed the aggregated and per-repository assessment reports +- Upgraded the .NET app to .NET 10 and the Java app to Java 25 / Spring Boot 4.0 +- Committed and pushed the upgraded code to each repository -### Challenge 2: Java Application Modernization +### Challenge 3: Modernize the Upgraded Apps and Deploy Them to Azure -- Set up local Java development environment with Docker and Maven -- Ran the Asset Manager application locally to validate functionality -- Used GitHub Copilot App Modernization extension in VS Code -- Performed AppCAT assessment for Azure migration readiness (9 cloud readiness issues, 4 Java upgrade opportunities) -- Executed guided migration tasks to modernize the application -- Migrated from AWS S3 to Azure Blob Storage with automated code refactoring -- Validated migration success through automated CVE, build, consistency, and test validation -- Tested the modernized application locally +- Created a cloud modernization plan targeting both repositories +- Resolved cloud readiness issues and migrated dependencies (for example, Oracle to PostgreSQL) +- Reviewed and merged the modernization pull request +- Provisioned Azure infrastructure and deployed the PhotoAlbum-Java app to Azure +- Created an explicit infrastructure/deployment plan and deployed the PhotoAlbum (.NET) app to Azure +- Validated both applications running on Azure Container Apps --- **Skills Acquired:** -- AI-powered code modernization with GitHub Copilot -- Azure App Service deployment -- AppCAT assessment for Java applications -- Automated validation and testing workflows +- AI-powered code modernization with GitHub Copilot App Modernization +- Batch assessment and framework upgrades across multiple repositories +- Cloud modernization planning and dependency migration +- Azure infrastructure provisioning and Azure Container Apps deployment **Key Takeaways:** -This workshop demonstrated the complete migration lifecycle from discovery to deployment: +This workshop demonstrated the complete migration lifecycle from assessment to deployment: - **AI-Powered Modernization**: GitHub Copilot dramatically accelerates code modernization while maintaining quality -- **Platform Migration**: Successfully migrated dependencies (S3 to Blob Storage, Windows AD to Entra ID) alongside application code -- **Validation at Every Step**: Automated testing ensures functionality is preserved throughout modernization +- **Scale Across Repositories**: Batch assessment and planning streamline modernizing multiple apps at once +- **Platform Migration**: Successfully migrated dependencies (for example, Oracle to PostgreSQL) alongside application code - **Multiple Technology Stacks**: Experience with both .NET and Java modernization approaches --- @@ -61,4 +58,3 @@ This workshop demonstrated the complete migration lifecycle from discovery to de If you want to give feedback, please don't hesitate to open an issue on the repository or get in touch with one of us directly. Thank you for investing the time and see you next time! - diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/1.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/1.png new file mode 100644 index 000000000..740acdb2d Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/1.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/10.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/10.png new file mode 100644 index 000000000..1b2a3daf4 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/10.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/11.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/11.png new file mode 100644 index 000000000..f6dacf345 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/11.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/12.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/12.png new file mode 100644 index 000000000..d91fa6810 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/12.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/14.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/14.png new file mode 100644 index 000000000..2fe59d02d Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/14.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/2.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/2.png new file mode 100644 index 000000000..2a3237a2b Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/2.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/3.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/3.png new file mode 100644 index 000000000..032deef80 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/3.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/4.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/4.png new file mode 100644 index 000000000..d1e5b5476 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/4.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/5.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/5.png new file mode 100644 index 000000000..6ec8719a7 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/5.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/6.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/6.png new file mode 100644 index 000000000..e649fd912 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/6.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/7.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/7.png new file mode 100644 index 000000000..75fea4886 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/7.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/8.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/8.png new file mode 100644 index 000000000..aaf3e6b65 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/8.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/9.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/9.png new file mode 100644 index 000000000..8be23dafb Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/img/9.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/solution-02.md b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/solution-02.md index 961abc850..defb275ef 100644 --- a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/solution-02.md +++ b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-02/solution-02.md @@ -1,98 +1,102 @@ -# Modernize a Java Application +# Walkthrough Challenge 2 - Upgrading one Java app and one .NET app [Previous Challenge Solution](../challenge-01/solution-01.md) - **[Home](../../Readme.md)** - [Next Challenge Solution](../challenge-03/solution-03.md) -**Duration:** 30 minutes +## 2.1. Fork the sample repositories -## Goal +Start by logging in your Github account and fork both the .NET and the Java app. -Modernize the Asset Manager Java Spring Boot application for Azure deployment, migrating from AWS dependencies to Azure services using GitHub Copilot App Modernization in VS Code. +- +- -## Actions +Forking the PhotoAlbum sample repositories -### Environment Setup: -1. Navigate to [../../src/AssetManager](../../src/AssetManager) -1. Open Visual Studio Code -1. Login to GitHub from VS Code -1. Install GitHub Copilot App Modernization extension if not present +## 2.2. Set up your working directory -### Validate Application Locally: +Create a working directory in a location at your choice. -1. Open Terminal in VS Code (View → Terminal) -1. Run `scripts\startapp.cmd` -1. Wait for Docker containers (RabbitMQ, Postgres) to start -1. Allow network permissions when prompted -1. Verify application is accessible at http://localhost:8080 -1. Stop the application by closing console windows +Install the Github Copilot modernization agent (modernize CLI). We will use it for the modernization end-to-end (upgrade, assessment, plan, execute). -### Perform AppCAT Assessment: +Download source: -1. Open GitHub Copilot App Modernization extension in the Activity bar -1. Ensure Claude Sonnet 4.5 is selected as the model -1. Click "Migrate to Azure" to begin assessment -1. Wait for AppCAT CLI installation to complete -1. Review assessment progress in the VS Code terminal -1. Wait for assessment results (9 cloud readiness issues, 4 Java upgrade opportunities) +For batch operations across many repositories, create a JSON config file to list all repositories. For example, create it at `.github/modernize/repos.json` in your working directory, or provide a custom path. -### Analyze Assessment Results: +Reference: -1. Review the assessment summary in GitHub Copilot chat -1. Examine issue prioritization: - - Mandatory (Purple) - Critical blocking issues - - Potential (Blue) - Performance optimizations - - Optional (Gray) - Future improvements -1. Click on individual issues to see detailed recommendations -1. Focus on the AWS S3 to Azure Blob Storage migration finding +Config file listing the repositories -### Execute Guided Migration: +## 2.3. Run the batch assessment -1. Expand the "Migrate from AWS S3 to Azure Blob Storage" task -1. Read the explanation of why this migration is important -1. Click the "Run Task" button to start the migration -1. Review the generated migration plan in the chat window and `plan.md` file -1. Type "Continue" in the chat to begin code refactoring +In your terminal, run the modernize CLI agent and accept execution in your working directory. -### Monitor Migration Progress: +Run "Assess" to analyze the code of the 2 apps and generate a report. -1. Watch the GitHub Copilot chat for real-time status updates -1. Check the `progress.md` file for detailed change logs -1. Review file modifications as they occur: - - `pom.xml` and `build.gradle` updates for Azure SDK dependencies - - `application.properties` configuration changes - - Spring Cloud Azure version properties -1. Allow any prompted operations during the migration +Running assess in the modernize CLI -### Validate Migration: +Select "From a config file". -1. Wait for automated validation to complete: - - CVE scanning for security vulnerabilities - - Build validation - - Consistency checks - - Test execution -1. Review validation results in the chat window -1. Allow automated fixes if validation issues are detected -1. Confirm all validation stages pass successfully +Selecting the config file source -### Test Modernized Application: +Select both apps. -1. Open Terminal in VS Code -1. Run `scripts\startapp.cmd` again -1. Verify the application starts with Azure Blob Storage integration -1. Test application functionality at http://localhost:8080 -1. Confirm no errors related to storage operations +Selecting both apps -### Optional: Continue Modernization: +Check both "Upgrade" and "Cloud readiness". Leave "Security" unchecked. -1. Review other migration tasks in the assessment report -1. Execute additional migrations as time permits -1. Track progress through the `plan.md` and `progress.md` files +Selecting Upgrade and cloud readiness +Change the Analysis coverage to "Full analysis" and press enter to continue. -## Learning Resources +Setting analysis coverage to Full analysis -- [GitHub Copilot for VS Code](https://code.visualstudio.com/docs/copilot/overview) -- [Azure SDK for Java](https://learn.microsoft.com/azure/developer/java/sdk/) -- [Migrate from AWS to Azure](https://learn.microsoft.com/azure/architecture/aws-professional/) -- [Azure Blob Storage for Java](https://learn.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-java) -- [Spring Cloud Azure](https://learn.microsoft.com/azure/developer/java/spring-framework/) -- [AppCAT Assessment Tool](https://learn.microsoft.com/azure/developer/java/migration/migration-toolkit-intro) +Chose to assess locally (using cloud agents is also possible) + +> [!NOTE] +> Note that an assessment-config.yaml file gets automatically generated. Both repositories get cloned and assessment starts. It may take about 5-10 min to complete, so it's a good time to take a coffee break. + +Assessment running locally + + +Congratulations 🎉 you have just finished the batch assessment phase. Take some time to explore the outcome results. + +## 2.4. Explore the assessment results + +Batch assessment is especially valuable for migration planning because it enables you to efficiently assess the readiness and requirements of various applications at once. By using batch assessment, you can evaluate different repositories at the same time and obtain detailed assessment reports for each application. It produces two kinds of reports to support your migration planning: + +**Aggregated report:** Presents an overall perspective of all assessed applications, offering summary insights, recommendations on Azure services, target platforms, upgrade paths, migration strategies, and migration waves. Additionally, the aggregated report includes shortcuts for easy access to each per repository report. + +Aggregated assessment report + +**Per repository report:** Provides detailed insights on the two aspects identified at the individual repository level. + +Per repository report + +Per repository report details + +## 2.5. Upgrade each app individually + +Now that we have an assessment report, we could jump straight to a modernization plan, but we want to start with an upgrade of the .NET and Java versions first. + +For a batch upgrade, both repositories would need to use the same programming language, which is not the case here, so let's upgrade both apps individually. + +Exit the modernize CLI, navigate to the folder of the PhotoAlbum (.NET) and relaunch the modernize CLI. + +Select the Upgrade option, current folder, and upgrade locally. + +In the prompt box, submit the following prompt: "Upgrade to .NET 10", as recommended previously in our assessment report. + +Migrate CLI imediately starts creating an upgrade plan, followed by execution of the necessary code changes. + +Check the resulting Plan Execution Summary for each app. Upgrade should show "Success". + +Plan Execution Summary showing Success + +Navigate to the PhotoAlbum-Java directory and repeat the same process for the Java version of the app. Use the following prompt: "Upgrade to Java 25 and upgrade to Spring Boot 4.0", as recommended previously in our assessment report. + +Exit modernize CLI, navigate to each app folder, commit and push your changes to each respective remote repository. Ensure all changes are committed and pushed. + +Congratulations 🎉 your apps are now upgraded and you have completed challenge 2. + +Navigate back to your parent directory and launch modernize CLI again. + +You are now ready to initiate challenge 3 - modernize your upgraded apps and deploy them in Azure. diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/15.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/15.png new file mode 100644 index 000000000..ae80ee4c7 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/15.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/16.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/16.png new file mode 100644 index 000000000..09096b3ae Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/16.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/17.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/17.png new file mode 100644 index 000000000..06f69d907 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/17.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/18.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/18.png new file mode 100644 index 000000000..ec42016c1 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/18.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/19.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/19.png new file mode 100644 index 000000000..c4c7c3ab9 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/19.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/20.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/20.png new file mode 100644 index 000000000..4718e2886 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/20.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/21.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/21.png new file mode 100644 index 000000000..435d415d4 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/21.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/22.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/22.png new file mode 100644 index 000000000..48bcd5071 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/22.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/23.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/23.png new file mode 100644 index 000000000..4feeb547a Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/23.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/24.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/24.png new file mode 100644 index 000000000..bd44f44ce Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/24.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/25.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/25.png new file mode 100644 index 000000000..256561a05 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/25.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/26.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/26.png new file mode 100644 index 000000000..8991e3036 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/26.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/27.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/27.png new file mode 100644 index 000000000..7a7f4be27 Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/27.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/28.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/28.png new file mode 100644 index 000000000..29dc76a5a Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/28.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/29.png b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/29.png new file mode 100644 index 000000000..6899ba71d Binary files /dev/null and b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/img/29.png differ diff --git a/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/solution-03.md b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/solution-03.md new file mode 100644 index 000000000..fba4f48ca --- /dev/null +++ b/03-Azure/01-01-App Innovation/03_GHCPAppModernization/walkthrough/challenge-03/solution-03.md @@ -0,0 +1,82 @@ +# Walkthrough Challenge 3 - Modernize your upgraded apps and deploy them in Azure + +[Previous Challenge Solution](../challenge-02/solution-02.md) - **[Home](../../Readme.md)** + +## 3.1. Create the cloud modernization plan + +Select the "Plan" option, then target both repositories from the config file. + +Select both apps and use cloud agents. Name the plan "cloud-modernization-plan" + +Type the following instruction in the prompt "An assessment has been previously completed for both apps, but after that both apps have been upgrated to their latest respective framework versions. In this plan, you should ignore any upgrade recommendations in the existing assessment report. You should focus on resolving the cloud readiness issues, set up Azure infrastructure for each app, and deploy the App on Azure. If OracleDB exists, migrate to PostgreSQL." + +Entering the cloud modernization plan prompt + +> [!NOTE] +> Generating the plan should take about 15-20 min. Once finished, you should see a series of tasks to be executed. + +Generated plan tasks + +Generated plan tasks continued + +## 3.2 Review and merge the pull request + +Review the pull request and merge it. + +Pull request overview + +Pull request changes + +Merging the pull request + +## 3.3 Deploy the PhotoAlbum-Java app + +Navigate to repos\PhotoAlbum-Java and pull the latest changes in he cloud-modernization-plan branch, which include the latest plan.md. + +Pulling the latest changes for PhotoAlbum-Java + +Launch Modernize CLI and execute the plan (cloud-modernization-plan). + +Executing the plan in Modernize CLI + +Plan execution will start. Wait for all tasks to complete. It may take a while. Maybe a good time to stretch your legs. + +Once finished, check the resource group on Azure with the deployed resources. Next, open the Frontend Container app URL. + +Deployed resource group in Azure + +Deployed resources + +Frontend Container app + + +Congratulations! 🎉 You managed to migrate and deploy in Azure the upgraded PhotoAlbum-Java app. + +## 3.4 Deploy the PhotoAlbum (.NET) app + +Now, let's migrate and deploy in Azure the .NET version of the app. Navigate to repos\PhotoAlbum and pull the latest changes in he cloud-modernization-plan branch, which include the latest plan.md. + +Launch Modernize CLI and execute the plan (cloud-modernization-plan). + +Plan execution will start. Wait for all tasks to complete. It may take a while. + +Notice this plan didn't create the infrastructure code nor deployed any resource in Azure. Let's create another plan and be explicit in our prompt. + +Create a new plan, locally this time, name it "infra-setup-plan", and use the following prompt "Provision Azure resources and deploy the app." + +Wait for the plan to be generated. + +Once finished, you can check the plan at `.\.github\modernize\infra-setup-plan` + +Generated infra-setup-plan + +Finally, execute the plan. + +Plan execution will start. Wait for all tasks to complete. It may take a while. + +Once finished, check the resource group on Azure with the deployed resources. Next, open the Frontend Container app link. + +> [!TIP] +> If you get any deployment error, you can use Github Copilot CLI to diagnose and help you fix it. + +Congratulations! 🎉 You managed to migrate and deploy in Azure the upgraded PhotoAlbum (.NET) app, and finish the challenge 3 successfully! \ No newline at end of file