Azure DevOps Deployment Group

cakriwut 876 views 18 slides Apr 28, 2019
Slide 1
Slide 1 of 18
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18

About This Presentation

Global Azure Bootcamp 2019 Singapore, Azure DevOps deployment group


Slide Content

Riwut Libinuko Welcome to the Singapore Hands On Lab LAB B : Azure DevOps Deployment Groups

Hands On Lab Azure DevOps Deployment Group Synopsis In this hands-on lab, you will learn how to deploy an application to multiple servers. The Windows PowerShell remoting had to be enabled manually, the required ports opened, and the deployment agent installed on each of the servers. The pipeline had to be managed manually if a roll-out deployment was required. All of above challenges have been handled seamlessly with the introduction of the Deployment Groups. The Deployment Group installs a deployment agent on each of the target servers in the configured group and instruct the Release Pipeline to gradually deploy the application to all these servers that belong to the Deployment Group. Multiple pipeline can be created for the roll-out deployments so that the latest version of the application could be provided in a phased manner to the multiple user groups for validating the newly introduced features.

Hands On Lab Azure DevOps Deployment Group Prerequisites Microsoft Azure Account – you will need a valid and active Azure account. If you do not have one, please sign up for a free trial here ( https://azure.microsoft.com/en-us/free/ ) Azure DevOps account – you will need a valid and active Azure DevOps account. If you do not have one, please sign up for free here ( https://azure.microsoft.com/en-us/services/devops/ ) Sample Azure DevOps Project – use Azure DevOps Demo generator to create team project on your Azure DevOps Organization with sample content that include source code, work items, iterations, service endpoints, build and release definition. Click here ( https://azuredevopsdemogenerator.azurewebsites.net/?TemplateId=77368&Name=deploymentgroups ) to provision sample project.

What is Deployment Group Deployment group is a logical set of deployment target machines that have agents installed on each one. Deployment groups represent the physical environments; for example “Dev”, “Test”, “UAT” and “Production” Web Server SQL Server Web Server SQL Server RELEASE package RELEASE pipelines (DEV) RELEASE pipelines (PROD) DEV deployment group PROD deployment group A deployment agent must be installed in each machine

How to install deployment agent? Manually run script in each machine Install Azure Pipelines Agent Azure VM extension in each machine Use Azure Resource Group Deployment task in release pipeline

Hands On Lab Azure DevOps Deployment Group Step – 1 Ensure all prerequsites are met Microsoft Azure Account – you will need a valid and active Azure account. If you do not have one, please sign up for a free trial here ( https://azure.microsoft.com/en-us/free/ ) Azure DevOps account – you will need a valid and active Azure DevOps account. If you do not have one, please sign up for free here ( https://azure.microsoft.com/en-us/services/devops/ ) Sample Azure DevOps Project – use Azure DevOps Demo generator to create team project on your Azure DevOps Organization with sample content that include source code, work items, iterations, service endpoints, build and release definition. Click here ( https://azuredevopsdemogenerator.azurewebsites.net/?TemplateId=77368&Name=deploymentgroups ) to provision sample project. Template : DeploymentGroups

Hands On Lab Azure DevOps Deployment Group Step – 2 Create target machines for deployment group target In this step following resources will be provisioned on Azure using an ARM template: 6 virtual machines (VM) web servers with IIS configured 1 virtual machine (VM) SQL server 1 azure network load balancer Launch following URL ( https://portal.azure.com/#create/Microsoft.Template/uri/ http%3A%2F%2Fbit.ly%2Fgab2019-tmpl ) http %3A%2F%2F bit.ly %2F gab2019-tmpl  http :// bit.ly / gab2019-tmpl https://bit.ly/2PyzXPU

Hands On Lab Azure DevOps Deployment Group Step – 2 Create target machines for deployment group target In this step following resources will be provisioined on Azure using an ARM template: 6 virtual machines (VM) web servers with IIS configured 1 virtual machine (VM) SQL server 1 azure network load balancer Launch following URL ( https://portal.azure.com/#create/Microsoft.Template/uri/ http%3A%2F%2Fbit.ly%2Fgab2019-tmpl ) Complete the custom deployment settings, create GAB2019 resource group Notes the settings for the rest of HOL. Notes DNS name of SQL server and Web Server after resources creation ( https://portal.azure.com/#create/Microsoft.Template/uri/ http %3A%2F%2F bit.ly %2F gab2019-tmpl )

Hands On Lab Azure DevOps Deployment Group Step – 3 Add Azure Resource Manager service connection In AzureDevOps – click Project Settings -> Pipelines -> Service Connections Click “New service connection” -> Azure Resource Manager On “Add an Azure Resource Manager service connection” dialog, select Service Principal Authentication . Select from available Subscription Type Connection name and click OK.

Hands On Lab Azure DevOps Deployment Group Step – 4 Create Personal Access Token in AzureDevOps In profile name, select “ Security ”

Hands On Lab Azure DevOps Deployment Group Step – 4 Create Personal Access Token in AzureDevOps In profile name, select “ Security ” In Personal Access Token page, click New Type Name, select Organization, and expiration. Select following scopes: Work Items – Read & Write Code – Read Build – Read & Execute Release – Read, write , execute & manage Test Management – Read & write Deployment Groups – Read & manage Click “Show all scopes” if you can not see the scope in dialog. Important, keep PAT token in secure place until we complete this HOL.

Hands On Lab Azure DevOps Deployment Group Step – 4 Add Azure Repos/Team Foundation Server service connection In AzureDevOps – click Project Settings -> Pipelines -> Service Connections Click “ New service connection ” -> Azure Repos/Team Foundation Server On “Add Azure Repos/Team Foundation service connection” dialog, select Token Based Authentication . On Connection URL , type Azure Repos/Team Foundation server url from Step-1. Type Connection name and click OK. Type PAT from Step-4 and click Verify connection. Click OK

Hands On Lab Azure DevOps Deployment Group Step – 5 Create Deployment Groups In AzureDevOps – click Pipelines -> Deployment groups Click Add a deployment group Type the name

Hands On Lab Azure DevOps Deployment Group Step – 6 Configure Release pipeline In AzureDevOps – click Pipelines -> Releases Click Edit

Hands On Lab Azure DevOps Deployment Group Step – 6 Configure Release pipeline In AzureDevOps – click Pipelines -> Releases Click Edit On edit pipeline, click Task -> Dev

Hands On Lab Azure DevOps Deployment Group Step – 6 Configure Release pipeline In AzureDevOps – click Pipelines -> Releases Click Edit On edit pipeline, click Task -> Dev Modify task what requires settings attention (use information from previous steps )

Hands On Lab Azure DevOps Deployment Group Step – 6 Configure Release pipeline In AzureDevOps – click Pipelines -> Releases Click Edit On edit pipeline, click Task -> Dev Modify task what requires settings attention (use information from previous steps ) Click Variables, and modify DefaultConnectionString with the SQL DNS Save and create new Release.

A BIG thank you to the 2019 Global Sponsors!