Azure DevOps Server 2019 Cookbook
eBook - ePub

Azure DevOps Server 2019 Cookbook

Proven recipes to accelerate your DevOps journey with Azure DevOps Server 2019 (formerly TFS), 2nd Edition

Tarun Arora, Utkarsh Shigihalli

Share book
  1. 456 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Azure DevOps Server 2019 Cookbook

Proven recipes to accelerate your DevOps journey with Azure DevOps Server 2019 (formerly TFS), 2nd Edition

Tarun Arora, Utkarsh Shigihalli

Book details
Book preview
Table of contents
Citations

About This Book

Over 70 recipes to effectively apply DevOps best practices and implement Agile, Git, CI-CD & Test automation using Azure DevOps Server (TFS) 2019

Key Features

  • Learn improving code quality using pull requests, branch policies, githooks and git branching design
  • Accelerate the deployment of high quality software by automating build and releases using CI-CD Pipelines.
  • Learn tried and tested techniques to automate database deployments, App Service & Function Deployments in Azure.

Book Description

Azure DevOps Server, previously known as Team Foundation Server (TFS), is a comprehensive on-premise DevOps toolset with a rich ecosystem of open source plugins. This book is your one stop guide to learn how to effectively use all of these Azure DevOps services to go from zero to DevOps.

You will start by building high-quality scalable software targeting.NET, .NET core or Node.js applications. You will learn techniques that will help you to set up end-to-end traceability of your code changes from design through to release. Whether you are deploying software on-premise or in the cloud in App Service, Functions, or Azure VMs, this book will help you learn release management techniques to reduce release failures. Next, you will be able to secure application configuration by using Azure KeyVault. You will also learn how to create and release extensions to the Azure DevOps marketplace and reach million developer ecosystem for feedback. The working extension samples will allow you to iterate changes in your extensions easily and release updates to the marketplace quickly.

By the end of this book, techniques provided in the book will help you break down the invisible silos between your software development teams. This will transform you from being a good software development team to an elite modern cross functional software development team.

What you will learn

  • Set up a team project for an Agile delivery team, importing requirements from Excel
  • Plan, track, and monitor progress using self updating boards, Sprint and Kanban boards
  • Unlock the features of Git by using branch policies, Git pull requests, forks, and Git hooks
  • Build and release.NET core, SQL and Node.js applications using Azure Pipeline
  • Automate testing by integrating Microsoft and open source testing frameworks
  • Extend Azure DevOps Server to a million developer ecosystem

Who this book is for

This book is for anyone looking to succeed with DevOps. The techniques in this book apply to all roles of the software development lifecycle including developers, testers, architects, configuration analysts, site reliability engineers and release managers. If you are a new user you'll learn how to get started; if you are an experienced user you'll learn how to launch your project into a modern and mature DevOps enabled software development team.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Azure DevOps Server 2019 Cookbook an online PDF/ePUB?
Yes, you can access Azure DevOps Server 2019 Cookbook by Tarun Arora, Utkarsh Shigihalli in PDF and/or ePUB format, as well as other popular books in Computer Science & Entreprise Applications. We have over one million books available in our catalogue for you to explore.

Information

Year
2019
ISBN
9781788830140
Edition
2

Continuous Deployments

Continuous Deployment is the practice of teams to continuously deploy tested and working software to production. The release pipeline of Azure DevOps Server is just an orchestrator of the activities you do on an environment to get your software deployed and running. Another key technique of continuous deployments is the consistency of deployment steps - meaning you follow the same deployment steps across all your deployment environments. The advantage is repeatability, reliability - thus improving your overall delivery so that you release software to production sooner and consistently.
In this chapter, we will see different ways to deploy various types of resources using continuous deployment strategy. Not only will we see how to deploy applications, but will also see how to provision infrastructure so that we eventually achieve repeatable and reliable deployments of our software.
We will cover the following recipes:
  • Deploying the database to Azure SQL using the release pipeline
  • Consuming secrets from Azure Key Vault in your release pipeline
  • Deploying the .NET Core web application to Azure App Service
  • Deploying an Azure function to Azure
  • Publishing secrets to Azure Key Vault
  • Deploying a static website on Azure Storage
  • Deploying a VM to Azure DevTest Labs

Deploying the database to Azure SQL using the release pipeline

Databases are an integral part of any application and should be part of your DevOps process, which means integrating changes continuously using source control and delivering every change to the environment.
However, most organizations still have a legacy way of deploying databases. Developers still have code stored procedures and commit to the source control, but when it comes to the deployment, a detailed release notes document is prepared on how the database has to be provisioned and handed over to the DBAs.
In this recipe, we will see how we can build a process to consistently develop and deploy the database to Azure SQLDB.

Getting ready

For this recipe, I am using a sample database called AdventureWorks, published by Microsoft. If you do not have this database already, Microsoft makes the backup file available for download on GitHub here: http://bit.ly/2GNpvSo. Go ahead and download the database as per your SQL Server version. Since I have SQL Server 2017 Express on my machine, I downloaded the AdeventureWorks2017.bak file and then restored the database from the backup. Microsoft has instructions on restoring the database, which is documented here: http://bit.ly/2GKK8hT. Once you restore you should see the database in SQL Server Management Studio shown as follows:

Creating a database project and importing the database

First, we need to ensure that we have SQL Server Data Tools (SSDT) installed with our Visual Studio version. This tool is available during Visual Studio installation with the data storage and processing workload. It is also available as a standalone installer for Visual Studio:
This development tool helps with database design, schema refactoring, and development of database using Visual Studio. Developers can benefit from familiar Visual Studio tools for database development with tools and assistance for code navigation, IntelliSense, debugging, and a rich editor. More information about SSDT can be found in the Microsoft documentation: http://bit.ly/2tr5Bon.
Create a new database project, import our existing AdventureWorks database, and commit it to the repository (for more information on how to do this, refer to http://bit.ly/2tBia0j):
Since we are going to be deploying to Azure SQL Database, I have changed the Target platform under Project Settings:
Right click on the project and then import the database. I have then committed the code (project) in my repository, as shown in the following screenshot:

Creating a build definition

Next, we will create a quick build pipeline and produce a dacpac package for this database. A database package is a deployable package from your version-controlled database project. You can read more about it at http://bit.ly/2tr5Bon.
We will add the new YAML-based pipeline, so add a new file named azure-pipelines.yml in the repository and add the following content:
The YAML file used in this recipe is available in the Chapter directory under RCP01-Database-CD folder
resources:
- repo: self
queue:
name: Default
demands:
- msbuild
- visualstudio

steps:
- task: VSBuild@1
displayName: 'Build solution AdventureWorks2017.sln'
inputs:
solution: AdventureWorks2017.sln
msbuildArgs: '/p:CmdLineInMemoryStorage=True'
platform: 'any cpu'
configuration: release

- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(Agent.BuildDirectory)'
Contents: '**\*.dacpac'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: tru...

Table of contents