Skip to content

Commit 728f33f

Browse files
authored
Merge pull request #207895 from ramiMSFT/pipeline/1973069
Canary deployment strategy
2 parents 527cb06 + babafd6 commit 728f33f

File tree

1 file changed

+28
-49
lines changed

1 file changed

+28
-49
lines changed
Lines changed: 28 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,68 @@
11
---
22
title: Configure canary deployments for Azure Linux Virtual Machines
3-
description: Learn how to set up a continuous deployment (CD) pipeline. This pipeline updates a group of Azure Linux virtual machines using the canary deployment strategy.
3+
description: Learn how to set up a classic release pipeline and deploy to Linux virtual machines using the canary deployment strategy.
44
author: moala
55
tags: azure-devops-pipelines
66
ms.service: virtual-machines
77
ms.collection: linux
88
ms.topic: how-to
99
ms.tgt_pltfrm: azure-pipelines
1010
ms.workload: infrastructure
11-
ms.date: 4/10/2020
11+
ms.date: 08/11/2022
1212
ms.author: moala
1313
ms.custom: devops
14-
15-
#Customer intent: As a developer, I want to learn about CI/CD features in Azure so that I can use Azure DevOps services like Azure Pipelines to build and deploy my applications automatically.
1614
---
1715

1816
# Configure the canary deployment strategy for Azure Linux Virtual Machines
1917

20-
**Applies to:** :heavy_check_mark: Linux VMs
18+
**Applies to:** :heavy_check_mark: Linux VMs
2119

22-
## Infrastructure as a service (IaaS) - Configure CI/CD
20+
Azure Pipelines provides a fully featured set of CI/CD automation tools for deployments to virtual machines. This article will show you how to set up a classic release pipeline that uses the canary strategy to deploy web applications to Linux virtual machines.
2321

24-
Azure Pipelines provides a fully featured set of CI/CD automation tools for deployments to virtual machines. You can configure a continuous-delivery pipeline for an Azure VM from the Azure portal.
22+
## Canary deployments
2523

26-
This article shows how to set up a CI/CD pipeline that uses the canary strategy for multimachine deployments. The Azure portal also supports other strategies like [rolling](./tutorial-devops-azure-pipelines-classic.md) and [blue-green](./tutorial-azure-devops-blue-green-strategy.md).
24+
A canary deployment reduces risk by slowly rolling out changes to a small subset of users. As you gain confidence in the new version, you can release it to more servers in your infrastructure and route more users to it.
2725

28-
### Configure CI/CD on virtual machines
26+
Using the **Continuous-delivery** feature, you can use the canary strategy to deploy your application from Azure portal.
2927

30-
You can add virtual machines as targets to a [deployment group](/azure/devops/pipelines/release/deployment-groups). You can then target them for multimachine updates. After you deploy to machines, view **Deployment History** within a deployment group. This view lets you trace from VM to the pipeline and then to the commit.
28+
1. Sign in to [Azure portal](https://portal.azure.com/) and navigate to a virtual machine.
3129

32-
### Canary deployments
30+
1. Select **Continuous delivery**, and then select **Configure**.
3331

34-
A canary deployment reduces risk by slowly rolling out changes to a small subset of users. As you gain confidence in the new version, you can release it to more servers in your infrastructure and route more users to it.
32+
:::image type="content" source="media/tutorial-devops-azure-pipelines-classic/azure-devops-configure.png" alt-text="A screenshot showing how to navigate to continuous delivery in your VM settings.":::
3533

36-
Using the continuous-delivery option, you can configure canary deployments to your virtual machines from the Azure portal. Here is the step-by-step walk-through:
34+
1. In the configuration panel, select **Use existing** and select your organization/project or select **Create** and create new ones.
3735

38-
1. Sign in to the Azure portal and navigate to a virtual machine.
39-
1. In the leftmost pane of the VM settings, select **Continuous delivery**. Then select **Configure**.
36+
1. Select your **Deployment group name** from the dropdown menu or create a new one.
4037

41-
![The Continuous delivery pane with the Configure button](media/tutorial-devops-azure-pipelines-classic/azure-devops-configure.png)
38+
1. Select your **Build pipeline** from the dropdown menu.
4239

43-
1. In the configuration panel, select **Azure DevOps Organization** to choose an existing account or create a new one. Then select the project under which you want to configure the pipeline.
40+
1. Select **Deployment strategy**, and then select **Canary**.
4441

45-
![The Continuous delivery panel](media/tutorial-devops-azure-pipelines-classic/azure-devops-rolling.png)
42+
:::image type="content" source="media/tutorial-devops-azure-pipelines-classic/azure-devops-rolling.png" alt-text="A screenshot showing how to configure the canary deployment strategy.":::
4643

47-
1. A deployment group is a logical set of deployment target machines that represent the physical environments. Dev, Test, UAT, and Production are examples. You can create a new deployment group or select an existing one.
48-
1. Select the build pipeline that publishes the package to be deployed to the virtual machine. The published package should have a deployment script named deploy.ps1 or deploy.sh in the deployscripts folder in the package's root folder. The pipeline runs this deployment script.
49-
1. In **Deployment strategy**, select **Canary**.
50-
1. Add a "canary" tag to VMs that are to be part of canary deployments. Add a "prod" tag to VMs that are part of deployments made after canary deployment succeeds. Tags help you target only VMs that have a specific role.
44+
1. Add a "canary" tag to the VMs that will be used in the canary deployment.
5145

52-
![The Continuous delivery panel, with the Deployment strategy value Canary chosen](media/tutorial-devops-azure-pipelines-classic/azure-devops-configure-canary.png)
46+
:::image type="content" source="media/tutorial-devops-azure-pipelines-classic/azure-devops-configure-canary.png" alt-text="A screenshot showing how to add canary tag.":::
5347

54-
1. Select **OK** to configure the continuous-delivery pipeline to deploy to the virtual machine.
48+
1. Select **OK** to configure the classic release pipeline to deploy to your virtual machine.
5549

56-
![The canary pipeline](media/tutorial-devops-azure-pipelines-classic/azure-devops-canary-pipeline.png)
50+
:::image type="content" source="media/tutorial-devops-azure-pipelines-classic/azure-devops-canary-pipeline.png" alt-text="A screenshot showing a classic release pipeline.":::
5751

58-
1. The deployment details for the virtual machine are displayed. You can select the link to go to the release pipeline in Azure DevOps. In the release pipeline, select **Edit** to view the pipeline configuration. The pipeline has these three phases:
52+
1. Navigate to your release pipeline and then select **Edit** to view the pipeline configuration. In this example, the *dev* stage is composed of three jobs:
5953

60-
1. This phase is a deployment-group phase. Applications are deployed to VMs that are tagged as "canary".
61-
1. In this phase, the pipeline pauses and waits for manual intervention to resume the run.
62-
1. This is again a deployment group phase. The update is now deployed to VMs tagged as "prod".
54+
1. Deploy Canary: the application is deployed to VMs with a "canary" tag.
55+
1. Wait for manual resumption: the pipeline pauses and waits for manual intervention. Before resuming the pipeline, ensure that at least one VM is tagged "prod". In the next phase, the app will be deployed only to "prod" VMs.
56+
1. Deploy Prod: the application is deployed to VMs with a "prod" tag.
6357

64-
![The Deployment group pane for the Deploy Canary task](media/tutorial-devops-azure-pipelines-classic/azure-devops-canary-task.png)
58+
:::image type="content" source="media/tutorial-devops-azure-pipelines-classic/azure-devops-canary-task.png" alt-text="A screenshot showing release pipeline jobs.":::
6559

66-
1. Before resuming the pipeline run, ensure that at least one VM is tagged as "prod". In the third phase of the pipeline, applications are deployed to only those VMs that have the "prod" tag.
60+
## Resources
6761

68-
1. The Execute Deploy Script task by default runs the deployment script deploy.ps1 or deploy.sh. The script is in the deployscripts folder in the root folder of the published package. Ensure that the selected build pipeline publishes the deployment in the root folder of the package.
62+
- [Deploy to Azure virtual machines with Azure DevOps](../../devops-project/azure-devops-project-vms.md)
63+
- [Deploy to an Azure virtual machine scale set](/azure/devops/pipelines/apps/cd/azure/deploy-azure-scaleset)
6964

70-
![The Artifacts pane showing deploy.sh in the deployscripts folder](media/tutorial-deployment-strategy/package.png)
65+
## Related articles
7166

72-
## Other deployment strategies
7367
- [Configure the rolling deployment strategy](./tutorial-devops-azure-pipelines-classic.md)
7468
- [Configure the blue-green deployment strategy](./tutorial-azure-devops-blue-green-strategy.md)
75-
76-
## Azure DevOps Projects
77-
78-
You can get started with Azure easily. With Azure DevOps Projects, start running your application on any Azure service in just three steps by selecting:
79-
80-
- An application language
81-
- A runtime
82-
- An Azure service
83-
84-
[Learn more](https://azure.microsoft.com/features/devops-projects/).
85-
86-
## Additional resources
87-
88-
- [Deploy to Azure virtual machines by using Azure DevOps Projects](../../devops-project/azure-devops-project-vms.md)
89-
- [Implement continuous deployment of your app to an Azure virtual machine scale set](/azure/devops/pipelines/apps/cd/azure/deploy-azure-scaleset)

0 commit comments

Comments
 (0)