Skip to content

Commit 32068a9

Browse files
authored
Merge pull request #113652 from BobbySchmidt2/devops-tutorial-2
edit pass: devops-tutorial-2
2 parents 6bd7a8c + 2090a1b commit 32068a9

File tree

3 files changed

+168
-132
lines changed

3 files changed

+168
-132
lines changed
Lines changed: 55 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Tutorial - Configure canary deployments for Azure Linux Virtual Machines
3-
description: In this tutorial you will learn how to set up continuous deployment (CD) pipeline that updates a group of Azure virtual machines using the blue-green deployment strategy
2+
title: Tutorial - Configure canary deployments for Azure Linux virtual machines
3+
description: In this tutorial, you learn how to set up a continuous deployment (CD) pipeline. This pipeline updates a group of Azure Linux virtual machines using the blue-green deployment strategy.
44
author: moala
55
manager: jpconnock
66
tags: azure-devops-pipelines
@@ -14,65 +14,77 @@ ms.date: 4/10/2020
1414
ms.author: moala
1515
ms.custom: devops
1616

17-
#Customer intent: As a developer, I want to learn about CI/CD features in Azure so that I can use devops services like Azure Pipelines to build and deploy my applications automatically.
17+
#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.
1818
---
1919

20-
# Tutorial - Configure Blue-Green deployment strategy for Azure Linux Virtual Machines
20+
# Tutorial - Configure the blue-green deployment strategy for Azure Linux virtual machines
2121

22+
## Infrastructure as a service (IaaS) - Configure CI/CD
2223

23-
## IaaS - Configure CI/CD
24-
Azure Pipelines provides a complete, fully featured set of CI/CD automation tools for deployments to virtual machines. You can configure a continuous delivery pipeline for an Azure VM directly from the Azure portal. This document contains the steps associated with setting up a CI/CD pipeline that uses the blue-green strategy for multi-machine deployments. You can also take a look at other strategies like [rolling](https://aka.ms/AA7jlh8) and [canary](https://aka.ms/AA7jdrz), which are supported out-of-box from Azure portal.
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.
2525

26-
27-
**Configure CI/CD on Virtual Machines**
26+
This article shows how to set up a CI/CD pipeline that uses the blue-green strategy for multimachine deployments. The Azure portal also supports other strategies like [rolling](https://aka.ms/AA7jlh8) and [canary](https://aka.ms/AA7jdrz).
2827

29-
Virtual machines can be added as targets to a [deployment group](https://docs.microsoft.com/azure/devops/pipelines/release/deployment-groups) and can be targeted for multi-machine updates. Once deployed, viewing **Deployment History** within a deployment group provides traceability from VM to the pipeline and then to the commit.
30-
31-
32-
**Blue-Green Deployments**: A Blue-Green deployment reduces downtime by having an identical standby environment. At any time one of the environments is live. As you prepare for a new release, you complete final stage of testing in the green environment. Once the software is working in the green environment, switch the traffic so that all incoming requests go to the green environment - the blue environment is now idle.
33-
You can configure Blue-Green deployments to your “**virtual machines**” from the Azure portal using the continuous delivery option.
28+
### Configure CI/CD on virtual machines
3429

35-
Here is the step-by-step walkthrough.
30+
You can add virtual machines as targets to a [deployment group](https://docs.microsoft.com/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.
3631

37-
1. Sign in to your Azure portal and navigate to a virtual machine
38-
2. In the VM left pane, go **Continuous delivery**. Then click **Configure**.
32+
### Blue-green deployments
3933

40-
![AzDevOps_configure](media/tutorial-devops-azure-pipelines-classic/azure-devops-configure.png)
41-
3. In the configuration panel, click **Azure DevOps Organization** to select an existing account or create one. Then select the project under which you would like to configure the pipeline.
34+
A blue-green deployment reduces downtime by having an identical standby environment. Only one environment is live at any time.
4235

36+
As you prepare for a new release, complete the final stage of testing in the green environment. After the software works in the green environment, switch traffic so that all incoming requests go to the green environment. The blue environment is idle.
4337

44-
![AzDevOps_project](media/tutorial-devops-azure-pipelines-classic/azure-devops-rolling.png)
45-
4. A deployment group is a logical set of deployment target machines that represent the physical environments; for example, "Dev", "Test", "UAT", and "Production". You can create a new deployment group or select an existing deployment group.
46-
5. Select the build pipeline that publishes the package to be deployed to the virtual machine. Note that the published package should have a deployment script _deploy.ps1_ or _deploy.sh_ in `deployscripts` folder at the package root. This deployment script will be executed by Azure DevOps pipeline at run time.
47-
6. Select the deployment strategy of your choice. Select **Blue-Green**.
48-
7. Add a "blue" or "green" tag to the VMs that are to be part of Blue-Green deployments. If the VM is for a standby role, then you should tag it as "green", otherwise tag it as "blue".
49-
![AzDevOps_bluegreen_configure](media/tutorial-devops-azure-pipelines-classic/azure-devops-blue-green-configure.png)
38+
Using the continuous-delivery option, you can configure blue-green deployments to your virtual machines from the Azure portal. Here is the step-by-step walk-through:
5039

51-
8. Click **OK** to configure the continuous delivery pipeline. You will now have a continuous delivery pipeline configured to deploy to the virtual machine.
52-
![AzDevOps_bluegreen_pipeline](media/tutorial-devops-azure-pipelines-classic/azure-devops-blue-green-pipeline.png)
40+
1. Sign in to the Azure portal and navigate to a virtual machine.
41+
1. In the leftmost pane of the VM settings, select **Continuous delivery**. Then select **Configure**.
5342

43+
![The Continuous delivery pane with the Configure button](media/tutorial-devops-azure-pipelines-classic/azure-devops-configure.png)
5444

55-
9. Click on **Edit** release pipeline in Azure DevOps to see the pipeline configuration. The pipeline consists of three phases. The first phase is a deployment group phase and deploys to VMs that are tagged as _green_ (standby VMs). The second phase pauses the pipeline and waits for manual intervention to resume the run. Once a user is satisfied that deployment is stable, they can now redirect the traffic to _green_ VMs and resume the pipeline run which will then swap _blue_ and _green_ tags in the VMs. This makes sure that the VMs that have older application version are tagged as _green_ and are deployed to in the next pipeline run.
56-
![AzDevOps_bluegreen_task](media/tutorial-devops-azure-pipelines-classic/azure-devops-blue-green-tasks.png)
45+
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.
5746

47+
![The Continuous delivery panel](media/tutorial-devops-azure-pipelines-classic/azure-devops-rolling.png)
5848

59-
10. The Execute Deploy Script task will by default execute the deployment script _deploy.ps1_ or _deploy.sh_ in the `deployscripts` folder at the root directory of published package. Make sure that the selected build pipeline publishes this in the root folder of package.
60-
![AzDevOps_publish_package](media/tutorial-deployment-strategy/package.png)
49+
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.
50+
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.
51+
1. In **Deployment strategy**, select **Blue-Green**.
52+
1. Add a "blue" or "green" tag to VMs that are to be part of blue-green deployments. If a VM is for a standby role, tag it as "green". Otherwise, tag it as "blue".
6153

54+
![The Continuous delivery panel, with the Deployment strategy value Blue-Green chosen](media/tutorial-devops-azure-pipelines-classic/azure-devops-blue-green-configure.png)
6255

56+
1. Select **OK** to configure the continuous-delivery pipeline to deploy to the virtual machine.
6357

58+
![The blue-green pipeline](media/tutorial-devops-azure-pipelines-classic/azure-devops-blue-green-pipeline.png)
59+
60+
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:
61+
62+
1. This phase is a deployment-group phase. Applications are deployed to standby VMs, which are tagged as "green".
63+
1. In this phase, the pipeline pauses and waits for manual intervention to resume the run. Users can resume the pipeline run once they have manually ensured stability of deployment to VMs tagged as "green".
64+
1. This phase swaps the "blue" and "green" tags in the VMs. This ensures that VMs with older application versions are now tagged as "green". During the next pipeline run, applications will be deployed to these VMs.
65+
66+
![The Deployment group pane for the Deploy Blue-Green task](media/tutorial-devops-azure-pipelines-classic/azure-devops-blue-green-tasks.png)
67+
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.
69+
70+
![The Artifacts pane showing deploy.sh in the deployscripts folder](media/tutorial-deployment-strategy/package.png)
6471

6572
## Other deployment strategies
66-
- [Configure Rolling Deployment Strategy](https://aka.ms/AA7jlh8)
67-
- [Configure Canary Deployment Strategy](https://aka.ms/AA7jdrz)
68-
69-
## Azure DevOps project
70-
Get started with Azure more easily than ever.
71-
72-
With DevOps Projects, start running your application on any Azure service in just three steps: select an application language, a runtime, and an Azure service.
73-
74-
[Learn more](https://azure.microsoft.com/features/devops-projects/ ).
75-
76-
## Additional resources
77-
- [Deploy to Azure Virtual Machines using DevOps project](https://docs.microsoft.com/azure/devops-project/azure-devops-project-vms)
78-
- [Implement continuous deployment of your app to an Azure Virtual Machine Scale Set](https://docs.microsoft.com/azure/devops/pipelines/apps/cd/azure/deploy-azure-scaleset)
73+
74+
- [Configure the rolling deployment strategy](https://aka.ms/AA7jlh8)
75+
- [Configure the canary deployment strategy](https://aka.ms/AA7jdrz)
76+
77+
## Azure DevOps Projects
78+
79+
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:
80+
81+
- An application language
82+
- A runtime
83+
- An Azure service
84+
85+
[Learn more](https://azure.microsoft.com/features/devops-projects/).
86+
87+
## Additional resources
88+
89+
- [Deploy to Azure virtual machines by using Azure DevOps Projects](https://docs.microsoft.com/azure/devops-project/azure-devops-project-vms)
90+
- [Implement continuous deployment of your app to an Azure virtual machine scale set](https://docs.microsoft.com/azure/devops/pipelines/apps/cd/azure/deploy-azure-scaleset)

0 commit comments

Comments
 (0)