Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
63 changes: 26 additions & 37 deletions 03-Azure/01-01-App Innovation/03_GHCPAppModernization/Readme.md
Original file line number Diff line number Diff line change
@@ -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/)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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/)
Loading
Loading