|
1 | 1 | # Getting Started with Copilot for Azure to Deploy to the Cloud |
2 | 2 |
|
3 | | -[Learning Objectives](#Learn) • [Prerequisites](#pre-req) • [Resources](#book) |
| 3 | +Managing and deploying cloud resources have historically required developers to switch between various interfaces — integrated development environments (IDEs), command-line tools, Azure Portal dashboards, and third-party CI/CD solutions. This context switching interrupts workflows, multiplies sources of truth, and slows down delivery. With the rise of AI-powered developer tools, a new paradigm is emerging: agentic, autonomous AI collaborators that reside within the IDE, orchestrate across cloud and DevOps environments, and allow developers to command the cloud as simply as they manipulate code. |
4 | 4 |
|
5 | | -Learn cloud deployment with GitHub Copilot for Azure—your ultimate guide to streamlined cloud success. Begin by building a strong foundation to boost coding efficiency, then transition to effortless application deployment, leveraging Azure’s powerful scalability. Conclude with advanced troubleshooting techniques to ensure your applications are reliable and high-performing. With Copilot as your trusted assistant, you’ll confidently create, deploy, and manage top-tier applications, enhancing your cloud expertise at every stage. |
| 5 | +This detailed hands-on workshop will guide developers through harnessing GitHub Copilot Agent Mode in Visual Studio Code (VS Code), integrated with the Azure Model Context Protocol (MCP) server. By the end of this session, you'll be able to set up GitHub Copilot's Coding Agent, connect it to the Azure MCP server for secure, natural language-driven management of cloud infrastructure, and seamlessly complete tasks such as provisioning resources, retrieving secrets, diagnosing issues, and deploying applications from your IDE—directly on top of an existing database API codebase. |
6 | 6 |
|
7 | | -- **Who is this for**: Developers and Operations (ITPro's) |
| 7 | +This workshop emphasizes how Copilot Agent Mode plus Azure MCP together alleviate pain points like context switching and fragmented workflows, providing developers with a unified, rapid, and secure cloud experience |
| 8 | + |
| 9 | + |
| 10 | +- **Who is this for**: Developers, DevOps Engineers and Operations (ITPros) |
8 | 11 | - **What you'll learn**: Gain a comprehensive understanding of GitHub Copilot for Azure through three key phases: learning, deployment, and troubleshooting. |
9 | 12 | - **What you'll build**: Confidently create, deploy, and maintain robust, scalable applications—powered by AI and optimized for the cloud. |
10 | 13 |
|
11 | | -<a name="pre-req"/> |
| 14 | +By the end of this workshop, you will: |
| 15 | + |
| 16 | +- Master foundational concepts and best practices of GitHub Copilot for Azure utilization. |
| 17 | +- Implement applications on Azure with seamless integration and scalability. |
| 18 | +- Use advanced tools to diagnose and resolve issues, ensuring reliable performance. |
| 19 | + |
| 20 | +## Prerequisite reading: |
| 21 | +- [What is GitHub Copilot for Azure?](https://learn.microsoft.com/azure/developer/github-copilot-azure/introduction) |
12 | 22 |
|
13 | | -## Prerequisites |
| 23 | +- [What is the Azure MCP Server?](https://learn.microsoft.com/azure/developer/azure-mcp-server/overview) |
14 | 24 |
|
15 | | -- [GitHub Copilot Chat](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot): GitHub Copilot is an AI pair programmer tool that helps you write code faster and smarter. |
16 | | -- [.NET Install Tool](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscode-dotnet-runtime): This extension provides a unified way for other extensions like the C# and C# Dev Kit extensions to install local versions of the .NET Runtime, and machine-wide versions of the .NET SDK. Those extensions tell the .NET Install Tool when they would like a .NET SDK to be on the machine, and we install one for them if there's not already one that matches the SDK they need to run properly. Users can also install the .NET SDK themselves by reading below. |
17 | | -- [GitHub Copilot for Azure](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azure-github-copilot): GitHub Copilot for Azure is the @azure extension. It’s designed to help streamline the process of developing for Azure. You can ask @azure questions about Azure services or get help with tasks related to Azure and developing for Azure, all from within Visual Studio Code. |
18 | | -- [Microsoft Azure Account](https://azure.microsoft.com/pricing/purchase-options/azure-account): Start building, deploying, and managing applications seamlessly across the cloud, on-premises, and edge environments with Azure's scalable and cost-efficient services. Try Azure free for up to 30 days with no upfront commitment—cancel anytime. |
| 25 | +## Requirements |
19 | 26 |
|
20 | | -<a name="Learn"/> |
| 27 | +1. [GitHub Account](https://docs.github.com/get-started/start-your-journey/creating-an-account-on-github) |
21 | 28 |
|
22 | | -## Learning Goals |
| 29 | +2. [GitHub Copilot Chat extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot): GitHub Copilot is an AI pair programmer tool that helps you write code faster and smarter. |
| 30 | + |
| 31 | +3. [GitHub Copilot for Azure](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azure-github-copilot): GitHub Copilot for Azure is the @azure extension. It’s designed to help streamline the process of developing for Azure. You can ask @azure questions about Azure services or get help with tasks related to Azure and developing for Azure, all from within Visual Studio Code. |
| 32 | + |
| 33 | +4. [Microsoft Azure Account](https://azure.microsoft.com/pricing/purchase-options/azure-account): Start building, deploying, and managing applications seamlessly across the cloud, on-premises, and edge environments with Azure's scalable and cost-efficient services. Try Azure free for up to 30 days with no upfront commitment—cancel anytime. |
23 | 34 |
|
24 | | -In this workshop, you will: |
| 35 | +5. [Azure MCP Server Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azure-mcp-server) |
25 | 36 |
|
26 | | -- Master foundational concepts and best practices of GitHub Copilot for Azure utilization. |
27 | | -- Implement applications on Azure with seamless integration and scalability. |
28 | | -- Use advanced tools to diagnose and resolve issues, ensuring reliable performance. |
| 37 | +## 💪🏽 Exercise |
| 38 | + |
| 39 | +**Right click the following Codespaces button to open your Codespace in a new tab** |
| 40 | + |
| 41 | +[](https://codespaces.new/microsoft/Mastering-GitHub-Copilot-for-Paired-Programming) |
| 42 | + |
| 43 | +This hands-on workshop guides you through setting up and using GitHub Copilot Agent Mode in Visual Studio Code, integrated with the Azure MCP server, to streamline cloud resource management and deployment workflows. Participants will start with a prebuilt database API demo and learn how to interact with the Copilot Coding Agent directly from their IDE—assigning cloud-related tasks, provisioning infrastructure, retrieving secrets, diagnosing issues, and deploying applications—all without switching to the Azure Portal or CLI. |
| 44 | + |
| 45 | +### 🗒️ Section 1: Exploring & Configuring Your Project |
| 46 | + |
| 47 | +🎯**Learning Goals** |
| 48 | +- Set up the GitHub Copilot Coding Agent and the GitHub Copilot for Azure extensions |
| 49 | +- Understand Agent Mode |
| 50 | +- Connect to your Azure subscription |
| 51 | + |
| 52 | +In this first section we are going to setup our environment and get started with GitHub Copilot for Azure, understanding the capabilities and features available to us. |
| 53 | + |
| 54 | +Let's get started! |
| 55 | + |
| 56 | +1. Click the Copilot Chat icon in the top-right corner of the Codespace window: |
| 57 | + |
| 58 | +<div align="left"> |
| 59 | +<img src="./images/001-chat.jpg" alt="Open GitHub Copilot Chat"> |
| 60 | +</div> |
| 61 | + |
| 62 | +2. This is GitHub Copilot Chat and agent mode should be displayed by default in the bottom left corner. Notice in the text box you can 'add context', which allows you to attach files, folders and other items to the context of Copilot so that it can better understand your codebase. You have the capability to choose your model as well. |
| 63 | + |
| 64 | +<div align="left"> |
| 65 | +<img src="./images/002-agentview.jpg" alt="Agent view in Copilot Chat"> |
| 66 | +</div> |
| 67 | + |
| 68 | +3. If you have not already done so, install the [GitHub Copilot for Azure extension in the marketplace](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azure-github-copilot). |
| 69 | + |
| 70 | +**Note:**You will need to authenticate to your Azure subscription. You should be prompted when it's installed. If not, when you go to the next step, you will receive a prompt. |
| 71 | + |
| 72 | +4. In the Copilot Chat window type in `@Azure` and look at the list available. You will notice a list of slash commands that you can also execute to quickly ask questions to Copilot. Take this time to play around with some of the commands. In the example below, Azure was queried as tools for available in the extension. |
| 73 | + |
| 74 | +<div align="left"> |
| 75 | +<img src="./images/003-azuretools.jpg" alt="Output of Chat with @Azure extension"> |
| 76 | +</div> |
| 77 | + |
| 78 | +5. After you have had some time to explore the responses from Copilot, select the tool icon in the chat pane. It opens up the extension tools, look around at the tools available that you can enable and disable. |
| 79 | + |
| 80 | +<div align="left"> |
| 81 | +<img src="./images/004-tools.jpg" alt="View of Azure tools"> |
| 82 | +</div> |
| 83 | + |
| 84 | +Now that we have had a tour and configured our environment, we're going to add context and configure the Azure MCP Server. |
| 85 | + |
| 86 | +### Section 2: MCP |
29 | 87 |
|
30 | | -<a name="book"/> |
| 88 | +🎯**Learning Goals** |
| 89 | +- Set up the GitHub Copilot Coding Agent and the GitHub Copilot for Azure extensions |
| 90 | +- Understand Agent Mode |
| 91 | +- Connect to your Azure subscription |
31 | 92 |
|
32 | | -## 🗃️ Lessons |
33 | | -| | Lesson Link | Concepts Taught | Learning Goal | |
34 | | -| :---: | :------------------------------------: | :---------------------------------------------------------: | ----------------------------------------------------------- | |
35 | | -| 01 | [Getting Started with GitHub Copilot for Azure](https://github.com/microsoft/Mastering-GitHub-Copilot-for-Paired-Programming/Mastering-GitHub-Copilot-for-Paired-Programming/Using-GitHub-Copilot-for-Azure-to-Deploy-to-Cloud/01-Getting-Started-with-GitHub-Copilot-for-Azure.md) | Unlock seamless coding and boost productivity with GitHub Copilot for Azure Preview.| This guide covers setup, installation in Visual Studio Code, and crafting your first prompt to harness Azure’s full potential effortlessly. | |
36 | | -| 02 | [Build and deploy your application with GitHub Copilot for Azure Preview](https://github.com/microsoft/Mastering-GitHub-Copilot-for-Paired-Programming/blob/main/09-Using-GitHub-Copilot-for-Azure-to-Deploy-to-Cloud/02-Build-and-deploy-your-application-with-GitHub-Copilot-for-Azure.md) | Integrate GitHub Copilot for Azure into your development and deployment workflow | Learn how to use GitHub Copilot for Azure Preview to create and deploy a website, showcasing its integration into your development and deployment workflow. | |
37 | | -| 03 | [Get answers to your questions about Azure services and resources](https://github.com/microsoft/Mastering-GitHub-Copilot-for-Paired-Programming/blob/main/09-Using-GitHub-Copilot-for-Azure-to-Deploy-to-Cloud/03-Get-Answers-to-your-Questions-about-Azure-Services-and-Resources.md) | Begin with open-ended questions about your Azure services or resources, then refine with specifics like technologies or features for better answers. | In this exercise, explore Azure’s potential for your application using example prompts to guide your queries effectively. | |
| 93 | +The Azure MCP Server is an open implementation of the Model Context Protocol—a standardized interface for exposing external tools, data sources, and actions to AI agents, such as Copilot in Agent Mode. It functions as a middle layer between the agent (client) and your Azure environment, enabling secure, context-aware natural language management of cloud resources. |
38 | 94 |
|
39 | | -## :books: Resources |
| 95 | +Key Points: |
| 96 | +- Supports broad Azure services: App Configuration, Key Vault, Storage, Cosmos DB, SQL, Kubernetes, Azure Developer CLI (azd), Azure CLI, etc. |
| 97 | +- Available as a VS Code Extension or via direct workspace config (see practical setup below) |
| 98 | +- Authentication: Uses Azure authentication flow, inheriting RBAC and user scopes |
| 99 | +- Command/Tool Abstraction: Each Azure resource operation is exposed as a discrete tool, discoverable and invocable by Copilot for queries and actions |
| 100 | +- Security: Enforces permissions, supports HTTPS, can be bound to Entra ID, follows least privilege principles |
40 | 101 |
|
41 | 102 | - [Blog: Introducing GitHub Copilot for Azure: Your Cloud Coding Companion in VS Code!](https://techcommunity.microsoft.com/t5/microsoft-developer-community/introducing-github-copilot-for-azure-your-cloud-coding-companion/ba-p/4127644) |
42 | 103 | - [Blog: GitHub Copilot for Azure: 6 Must-Try Features](https://techcommunity.microsoft.com/t5/microsoft-developer-community/github-copilot-for-azure-6-must-try-features/ba-p/4283126) |
|
0 commit comments