Before diving into application modernization, you need a working local environment with all required tools installed and authenticated. This challenge ensures everyone on your team starts from the same baseline for the Java track.
The repository uses Git submodules to include the sample applications. You must initialise the submodules before the source code of the legacy apps is available on your machine.
This repo also provides a Dev Container definition (.devcontainer/) that pre-installs most dependencies inside a Docker container — if you prefer that approach, opening the repo in VS Code with the Dev Containers extension will get you up and running quickly.
Set up your local development environment so you are ready to work with the Java sample application:
- Install and verify all required tools listed in the Prerequisites section of the hack README
- Clone the repository with submodules so that
Student/Resources/java/PhotoAlbum-Java/is populated - Install and authenticate the GitHub Copilot Modernization CLI (see below)
- Verify your Azure subscription is accessible and you have permissions to create resources
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/microsoft/modernize-cli/main/scripts/install.sh | sh
source ~/.bashrc # or source ~/.zshrc on macOSWindows:
winget install GitHub.Copilot.modernization.agentAfter installing, authenticate and verify:
gh auth login # if not already authenticated
modernize --version # confirm the CLI is on your PATHVS Code alternative: Install the GitHub Copilot Modernization extension from the VS Code Marketplace. It provides the same capabilities through the editor UI.
To see the application running in its original, unmodified state before starting the modernization, a Terraform configuration is provided that provisions a dedicated Azure VM and configures everything automatically.
This is recommended — it gives your team a concrete "before" picture and validates that the original app works end-to-end.
Java app (PhotoAlbum — Ubuntu + Docker + Oracle):
- Follow the steps in
../Resources/java/infra/README.md - Runs at
http://<vm-ip>:8080after ~10 minutes
Run these commands from the repo root before starting Challenge 01. Every check must pass:
# 1. GitHub CLI authenticated
gh auth status
# 2. Modernization CLI installed and on PATH
modernize --version
# 3. Azure CLI logged in and correct subscription active
az account show --query "{name:name,id:id,state:state}" -o table
# 4. Submodule populated (no leading '-' in the output)
git submodule status
# 5. Java submodule source code is present
ls Student/Resources/java/PhotoAlbum-Java/
# 6. Java version (Java 25 required for local builds — 8 is fine for running the legacy app)
java -version 2>&1 | head -1
# 7. Maven version
mvn --version | head -1
# 8. Docker daemon is running (required for Dev Container and image builds)
docker info --format "Docker version: {{.ServerVersion}}" 2>/dev/null \
|| echo "⚠ Docker is not running — start Docker Desktop"To complete this challenge successfully, demonstrate:
modernize --version(CLI) or the GitHub Copilot Modernization extension shows as active in VS Codegh auth statusreturns your authenticated GitHub accountaz account showreturns your Azure subscription- Running
git submodule statusin the repo root shows the Java submodule at a valid commit hash (no leading–) - (Optional) The PhotoAlbum legacy app is accessible at its Azure VM URL
- Explain to your coach — what does the Dev Container provide, and why must both GitHub CLI and Azure CLI be authenticated before any
modernizecommand can run?
- GitHub Copilot Modernization – Get Started
- Modernization CLI reference
- Git submodules documentation
- Dev Containers overview
- Terraform getting started
- Your team can deploy the VM while other setup steps are running.
- If
git submodule statusshows a-prefix, the submodule has not been initialised. Fix it with:git submodule update --init --recursive - If
modernizeis not found, install it first (see the Install the Modernization CLI section above), then ensure~/.local/binis on your PATH:export PATH="$HOME/.local/bin:$PATH"(add to~/.bashrcor~/.zshrcto persist)