Editare

Quickstart: Deploy your project to Azure by using GitHub Copilot modernization

This quickstart shows how to deploy your project to Azure by using GitHub Copilot modernization.

During development, you often need to deploy your project to a cloud environment for testing. The GitHub Copilot modernization extension automates the deployment process, deploying your migrated project to Azure and fixing any deployment errors along the way.

Prerequisites

Deploy your project

Use the following steps to start the deployment process:

  1. Open your project in Visual Studio Code.

  2. From the Activity sidebar, open the GitHub Copilot modernization extension pane. Under Tasks, open Java/Deployment Tasks and select one of the following tasks:

    • If you already have Azure infrastructure provisioned, select task Deploy to Existing Azure Infrastructure and select Run.

      Screenshot of Visual Studio Code that shows the Deploy to existing Azure Infrastructure task with the Run Task button highlighted.

    • If you don't have infrastructure yet, select task Provision Infrastructure and Deploy to Azure and select Run.

      Screenshot of Visual Studio Code that shows the Provision Infrastructure and Deploy to Azure task with the Run Task button highlighted.

  3. After you select the button, the Copilot chat window with Agent Mode opens automatically.

    Screenshot of Visual Studio Code that shows the Copilot chat window as opened automatically by the task.

  4. In the Copilot Chat window (opens automatically in Agent Mode), select Continue to approve each tool action, and provide details like subscription and resource group when prompted.

  5. Copilot typically goes through the following steps to deploy your project:

    • Copilot generates a deployment plan markdown file with the deployment goal, project information, Azure resource architecture, Azure resources, and execution steps.
    • Copilot follows the execution steps in this file.
    • Copilot fixes deployment errors.
    • Copilot generates a summary file explaining the results of the deployment.

Note

Use Claude Opus 4.5 or later models for the best results.

It might take Copilot a few iterations to correct deployment errors.

Deploy your project

Use the following steps to start the deployment process:

  1. Open your project in IntelliJ IDEA.

  2. From the Activity sidebar, open the GitHub Copilot modernization extension pane. Under Tasks, open Java/Deployment Tasks and select one of the following tasks:

    • If you already have Azure infrastructure provisioned, select task Deploy to Existing Azure Infrastructure and select Run.

      Screenshot of Intellij IDEA that shows the Deploy to existing Azure Infrastructure task with the Run Task button highlighted.

    • If you don't have infrastructure yet, select task Provision Infrastructure and Deploy to Azure and select Run.

      Screenshot of Intellij IDEA that shows the Provision Infrastructure and Deploy to Azure task with the Run Task button highlighted.

  3. After you select the button, the Copilot chat window with Agent Mode opens automatically.

    Screenshot of Intellij IDEA that shows the Copilot chat window as opened automatically by the task.

  4. In the Copilot Chat window (opens automatically in Agent Mode), select Continue to approve each tool action, and provide details like subscription and resource group when prompted.

  5. Copilot typically goes through the following steps to deploy your project:

    • Copilot generates a deployment plan markdown file with the deployment goal, project information, Azure resource architecture, Azure resources, and execution steps.
    • Copilot follows the execution steps in this file.
    • Copilot fixes deployment errors.
    • Copilot generates a summary file explaining the results of the deployment.

Note

Use Claude Opus 4.5 or later models for the best results.

It might take Copilot a few iterations to correct deployment errors.

Customize with your own prompts

The deployment task buttons send predefined prompts. For more control, type a custom prompt directly in the Copilot chat with Agent mode to specify the target Azure resource, subscription, resource group, scaling preferences, or environment configuration.

Tip

Example prompts:

  • "Deploy my app to the AKS cluster in subscription: <sub-id>, resource group: <rg-name>" - target a specific Kubernetes cluster.
  • "Deploy my containerized application to Azure Container Apps and configure auto-scaling with a minimum of 2 replicas" - specify scaling preferences.

See also