This document serves as a comprehensive workshop guide that will walk you through the process of migrating a Java application to Azure using GitHub Copilot app modernization. The workshop covers assessment, database migration from Oracle to PostgreSQL, and deployment to Azure.
What the Migration Process Will Do: The migration will transform your application from using Oracle Database to a modern Azure-native solution. This includes migrating from Oracle Database to Azure Database for PostgreSQL Flexible Server with managed identity authentication, and deploying it to Azure with proper monitoring and health checks.
The Photo Album application is a Spring Boot web application that allows users to:
- Upload photos via drag-and-drop or file selection
- View photos in a responsive gallery
- View photo details with metadata
- Navigate between photos
- Delete photos
Original State (Before Migration):
- Oracle Database 21c Express Edition for photo storage
- Photos stored as BLOBs in Oracle Database
- Password-based authentication
- Running in Docker containers locally
After Migration:
- Azure Database for PostgreSQL Flexible Server
- Managed Identity passwordless authentication
- Deployed to Azure Container Apps
Time Estimates: The complete workshop takes approximately 40 minutes to complete. Here's the breakdown for each major step:
- Assess Your Java Application: ~5 minutes
- Migrate from Oracle to PostgreSQL: ~15 minutes
- Deploy to Azure: ~20 minutes
Before starting the migration, you can run the original Oracle-based application locally to understand how it works.
-
Clone the repository (if not already done):
git clone https://github.com/Azure-Samples/PhotoAlbum-Java-Lite.git cd PhotoAlbum-Java-Lite -
Start the application:
docker-compose up --build -d
This will:
- Start Oracle Database 21c Express Edition container
- Build and start the Photo Album application container
- Automatically create the database schema
-
Wait for services to start (~2-3 minutes for Oracle DB initialization on first run)
-
Access the application:
- Open your browser to http://localhost:8080
- Upload, view, and manage photos to explore the features
-
Stop the application:
docker-compose down
To remove data volumes as well:
docker-compose down -v
Before starting this workshop, ensure you have:
- Operating System: Windows, macOS, or Linux
- Java Development Kit (JDK): JDK 21 or higher
- Download from Microsoft OpenJDK
- Maven: 3.8.0 or higher
- Download from Apache Maven
- Docker Desktop: Latest version, required if you want to run locally
- Download from Docker
- Git: For version control
- Download from Git
- Visual Studio Code: Version 1.101 or later
- Download from Visual Studio Code
- GitHub Copilot: Must be enabled in your GitHub account
- GitHub Copilot subscription (Pro, Pro+, Business, or Enterprise)
- VS Code Extensions (Required):
- GitHub Copilot extension
- Install from VS Code Marketplace
- Sign in to your GitHub account within VS Code
- GitHub Copilot app modernization extension
- Install from VS Code Marketplace
- Restart VS Code after installation
- GitHub Copilot extension
- Azure Account: Active Azure subscription
- Create a free account if you don't have one
- Azure CLI: Latest version
- Download from Azure CLI
- Ensure
chat.extensionTools.enabledis set totruein VS Code settings - In the Visual Studio Code settings, make sure this setting is enabled (it might be controlled by your organization)
- Access to public Maven Central repository for Maven-based projects
- Git-managed Java project using Maven
The first step is to assess the Photo Album application to identify migration opportunities and potential issues.
- Clone or open the Photo Album project in Visual Studio Code:
git clone https://github.com/Azure-Samples/PhotoAlbum-Java-Lite.git
cd PhotoAlbum-Java-Lite
code .In VS Code, open the Extensions view from the Activity Bar, search for the GitHub Copilot app modernization extension in the marketplace. Click the Install button for the extension. After installation completes, you should see a notification in the bottom-right corner of VS Code confirming success.
-
In the Activity sidebar, open the GitHub Copilot app modernization extension pane.
-
In the QUICKSTART section, click Start Assessment to trigger the app assessment.
-
Wait for the assessment to be completed. This step could take several minutes.
-
Upon completion, an Assessment Report tab opens. This report provides a categorized view of cloud readiness issues and recommended solutions. Select the Issues tab to view proposed solutions and proceed with migration steps.
The Assessment Report provides:
- Application Information: Summary of detected technologies and frameworks
- Issues: Categorized list of migration opportunities
- Database Migration: Oracle Database → Azure Database for PostgreSQL
- Security: Current password-based authentication
- Recommended Solutions: Predefined migration tasks for each issue
Look for the following in your report:
-
Database Migration (Oracle Database)
- Detected: Oracle Database 21c
- Recommendation: Migrate to Azure Database for PostgreSQL Flexible Server
- Action: Run Task button available
Before running the migration task in Copilot Chat, make sure the chat is configured to use your preferred LLM model, to choose the model:
-
Open Copilot Chat in Agent mode.
-
Select the custom agent modernize-azure-java from the agent picker.
-
Select the a model from the model picker, e.g., GPT-5.4.
Now that you've assessed the application, let's begin the database migration from Oracle to Azure Database for PostgreSQL.
-
In the Assessment Report, locate the Database Migration (Oracle) issue
-
Click the Run Task button next to Migrate to Azure Database for PostgreSQL (Spring)
-
The Copilot Chat panel opens in Agent Mode with a pre-populated migration prompt
-
The Copilot Agent will analyze the project, generate and open plan.md and progress.md, then automatically proceed with the migration process.
-
The agent checks the version control system status and checks out a new branch for migration, then performs the code changes. Click Allow for any tool call requests from the agent.
-
When the code migration is complete, the agent will automatically run a validation and fix iteration loop which includes:
- CVE Validation: Detects Common Vulnerabilities and Exposures in current dependencies and fixes them.
- Build Validation: Attempts to resolve any build errors.
- Consistency Validation: Analyzes the code for functional consistency.
- Test Validation: Runs unit tests and automatically fixes any failures.
- Completeness Validation: Catches migration items missed in the initial code migration and fixes them.
-
After all validations complete, the agent generates a summary.md as the final step.
-
Review the proposed code changes and click Keep to apply them.
At this point, you have successfully migrated the database to PostgreSQL. Now, you can deploy the application to Azure.
-
In the Activity sidebar, open the GitHub Copilot app modernization extension pane. In the TASKS section, expand Common Tasks > Deployment Tasks. Click the run button for Provision Infrastructure and Deploy to Azure.
-
The Copilot Chat panel opens in Agent Mode and will be populated with a predefined prompt.
-
Select
Azure Container Appsin pop-up question box. Provide information as requested. Click Continue/Allow in pop-up notifications to let Copilot Agent analyze the project and create a deployment plan in plan.copilotmd with Azure resources architecture, recommended Azure resources for project and security configurations, and execution steps for deployment. -
View the architecture diagram, resource configurations, and execution steps in the plan. Copilot will automatically execute the deployment steps.
-
When prompted, click Continue/Allow in chat notifications as Copilot Agent follows the plan and leverages agent tools to create and run provisioning and deployment scripts, fix potential errors, and finish the deployment. You can also check the deployment status in progress.copilotmd.







