Azure DevOps Complete Zero to Hero Guide
date
Apr 29, 2024
slug
azure-devops-hero-to-zero-guide
author
status
Public
tags
CI/CD
DevOps
Azure DevOps
Guide
summary
Azure DevOps is a suite of services you can implement end-to-end DevOps in your organization. It includes services such as Azure Repos, Boards, Wiki, Build and Release pipelines, Test plans, Artifacts, etc.,
type
Post
category
๐ข DevOps Blogs
updatedAt
Apr 29, 2024 04:32 AM
Intoduction:
Azure DevOps is a suite of services you can implement end-to-end DevOps in your organization. It includes services such as Azure Repos, Boards, Wiki, Build and Release pipelines, Test plans, Artifacts, etc.,
Azure DevOps Link โย https://dev.azure.com

Logically separate the projects
Azure DevOps includes the following services:
- Azure Boards:ย A project management tool that assists teams in planning, tracking, and discussing work.
- Azure Pipelines:ย A continuous integration/continuous delivery (CI/CD) platform that automates software development, testing, and deployment.
- Azure Repos:ย A Git repository hosting service that offers code version control.
- Azure Artifacts:ย A centralized storage and management system for software artifacts such as NuGet packages and Docker images.
- Azure Test Plans:ย A test management solution that assists teams in planning, executing, and analyzing tests.
- Azure Security Center:ย A security management tool that assists teams in identifying and mitigating security threats.
Charges are based on the number of users and build and deployment agents you purchased during the month, plus the actual usage of other services that were used.
In the basic plan, you will get the first 5 users free of cost with all the services within certain limits except the Azure test plan, for which you need a Basic+Test plan subscription.
Two types of services provide
- Azure DevOps Services โ Cloud offering
- Azure DevOps Server โ On-Premises implentation (or) Own data centre

Service limit applicable to these plans

The Visual Studio IDE is a creative launching pad that you can use to edit, debug, and build code, and then publish an app.

How to create a project

If you have any project side โ Look bottom left side โ Click Project setting you need to change.

Azure Boards
Azure Boards is a service for managing the work for your software projects. Teams need tools that flex and grow.

Azure Boards
Azure Boards does just that, brining you a rich set of capabilities including native support for Scrum and Kanban, customizable dashboards, and integrated reporting. Here you are aided by three work item types:
- Epics
- Issues
- Tasks

Also as the work gets completed the status gets updated stage by stage from:
- To Do
- Doing
- Done
Here is the image below depicting the same

Each time we create or add an issue, task or an epic, it means we are creating a work item.
Useful links below, hope it helps.
Choose a processย โ Process
Agile workflowย โ Agile
CMMI workflowย โ CMMI
Agileย is an iterative approach to project management and software development that helps teams deliver value to their customers faster and with fewer headaches.The Capability Maturity Model Integration (CMMI) is a model that helps organizations to: Effectuate process improvement. Develop behaviors that decrease risks in service, product, and software development
Azure Boards Processes
- Basic: Choose Basic when your team wants the simplest model that uses Issues, Tasks, and Epics to track work.
- Agile: Methodology is a way to manage a project by breaking it up into several phases.
- Scrum: Framework for creating and maintaining a consistent rate of work for complex projects.
- CMMI: Structured collection of best practices in engineering, service delivery and management, which aims to assist companies improve their ability to deliver customer satisfaction through an ever increasing understanding of their capabilities.

The basic process contains three work item types:
- Epics: Group your more significant items into Epics such as Website updates, Cloud migration, CICD implementation
- Issues: Further divide your Epics into Issues such as Homepage, about us page, secure sign-in
- Task: Tasks are the smallest amount of work that can be assigned to someone, for example, designing a homepage header, standardizing fonts, and fixing the homepage CSS to make it mobile responsive.
Read moreย โ Azure Boards
Defining Teams and Work Items
What is a Work Item:
A work item can track all types of activities. It could be a
- Task to do
- A bug to fix,
- An issue or anything that we can assign to people and keep track of the progress.

Kanban Board
Kanbanย is a visual system for managing work as it moves through a process. Kanbanvisualizes both the process (the workflow) and the actual work passing through that process.
Kanban has two significant elements namely:
- Cards
- Boards
The board can beย physical, but the software team has a preference towardsย virtual boardย as this could be easily accessed from various locations and thus makes the team collaboration more proficient.
Usually, the board can be split into three sections namely:
- To-Do
- In Progress
- Done
Basic principles associated with the Kanban process
- Visualize the workflow
- Limit work in progress
- Managing the workflow
- Make explicit process policies
- Implement feedback loops
- Continuous Improvement
Hands-On
Create a new project

Click left side Boards โ Boards

This is a todo list template or notion template and this a board view.

Swithch on the view as backlog. Using create a workitem and list over here.

Lets go to the board view and lets try to add the work items.

Two types of workitem here
- Epics
- Issues
Create a workitem

Click on the workitem it will be expand. So you can add more details

Created a first workitem which is to-do state

Create a new issues workitem and add to the task

Expand the website homepage workitems. Add a description after save and close.

Click the particular task add the activity

Lets move to the workitem the task is complete.

We will go the advanced concept โ Scrum
Go to this link โย https://azuredevopsdemogenerator.azurewebsites.net/ย โ Sign In
Generates from dummy data in our project.

Create a new project โ Select a template & Organization

How to check the project created or not? Go to the organization the project showing

Make some changes in project setting

Create a new team

Open the PUL-Web after click iteration and access paths

Go to iteration tab and add to the sprint


Go to my dashboard โ Click Overview

Create a new workitems add sprint2


Go to boards โ work items. If you have check the workitems created or not?


Add to the child work items



Go to the boars โ My team boards โ PUL-Web boards

Change the features state โ Add Product Backlog Item


Go to the View as backlog you can approve the separate features and assign to the task particular members.


Click view as backlog โ to create a task another way


Sprint means a fixed period of time during which the team commit and work towards a fixed goal which does not change.

There is no changes in particular project

So if you change the project

Now you add itetation. Go to Project setting โ Team Configuration โ Iterations

It shows the sprints

Assign to someone โ Sometask

Capacity โ adjust the team planning

Goto the taskboard

Modify the task the working hours automatically change

Or let move to the another sprint in particular tasks


Lets check the sprint 3

Easily identify the some color technique. Go to setting

Go and check the development the color will be change

Changed the p1 issue show the red color


I change the priority select 1 color will automatically change

Other setting will be change โ tag color

Add tag

The automatically change the data tag

One more column add in work items


Split the column

Swimlanes โ Track the more items


Now check the another work item


How to create a Custom dashboard
Dashboards โ New dashboard


Add a Widget โ Sprint Overview โ Click Configure

Add another widget โ Sprint Capacity โ Select the team โ PUL Web

Goto boards โ queries โ New query โ Create a custom query


Add Charts โ New

Save all โ Click save as

Shared queries โ Queries shared across the board.
Goto chart โ Add new chart โ Assigned to โ Save

Add to dashboard

The chart is added to dashboards

Click Edit button โ Chart for Work Items โ Add


Click Configure

Customize the team process
Goto Organization setting โ Process โ Scrum โ Create inherited process

Create a process

Click the Customized Scrum โ Product Backlog Item

Add โ New field โ Click Add field

Go to All processes โ Scrum โ Projects โ Parts Unlimited โ Change Process

Save โ Customized Scrum

Go to our project โ Parts Unlimited โ Boards โ Work Items

The Ticket ID has been created

If you create a new project the work item process show the customized processโฆ.

Thanks for readingโฆI hope it would be more helpful for understand the Azure Boards.!
Azure Pipelines
Azure Pipelines automatically builds and tests code projects. It supports all major languages and project types and combines continuous integration, continuous delivery, and continuous testing to build, test, and deliver your code to any destination.
An Azure SPN is a security identity used by user-created applications, services, and automation tools to access specific Azure resources.
This access is restricted by the roles assigned to the service principal, giving you control over which resources can be accessed and at which level.
The service principal name (SPN) is the name that a client uses to identify a service for mutual authentication.
Clone the repositoryย https://github.com/Ibrahimsi/Youtube_clone.git

Go to the azure devops portal create a new project

Go to the azure repo copy the code

Paste the location of the folder terminal

Check the code is update for azure repo
git remote show origin

Not update the remote repository remove that and again add to the azure devops remote repo.
git remote remove origin git remote add origin https://Ibrahimsi909@dev.azure.com/Ibrahimsi909/Youtube%20Clone/_git/Youtube%20Clone git push -u origin --all

Check devops portal the code is updated?

Create a webapp from azure portal
Azure App Services is a platform for building, deploying, and scaling web applications and services. It offers a variety of services, each with its own unique capabilities and use cases.
Azure App Service is an HTTP-based service for hosting web applications, REST APIs, and mobile back ends. You can develop in your favorite language, be it . NET, . NET Core, Java, Node. js, PHP, and Python.
Go to โ weapp โ Create a webapp


Once created a webapp the website is ready

Check the default domainย ibrahimsi.azurewebsites.net

Create a Pipeline
Go to pipeline โ Create a pipeline โ Click classic editor

Select Azure Repos Git โ Select repo โ Click Continue

Select a template click Empty job

Add another agent

Add the agent
- npm install
- npm build
- Publish artifact
- Azure app service deploy





4 Task are set remaining variable,trigger see on later release handson. Click save and queue.

Finally save the pipeline

If you faced problem some error
โError: No hosted parallelism has been purchased or granted. To request a free parallelism grantโ

Follow the below steps:

Finally run the pipeline


Click the URL the page redirect but the same default homepage

Why?
Default enable the cache in app services disable it now.
Go to azure portal โ Webapp โ Configuration โ Finally save the setting

Restart the webservice application. Again hit the URLย https://ibrahimsi.azurewebsites.net/

Successfully hosted the applicationsโฆ
Export to pipeline


YAML code
Another way to create a pipeline
Pipeline โ New pipeline โ Azure repos git โ You tube Clone โ Starter pipeline โ Save and run


trigger: - main stages: - stage: Build jobs: - job: Build pool: vmImage: 'ubuntu-latest' steps: - task: Npm@1 inputs: command: 'install' - task: Npm@1 inputs: command: 'custom' customCommand: 'run build' - task: PublishBuildArtifacts@1 inputs: PathtoPublish: 'build' ArtifactName: 'drop' publishLocation: 'Container' - stage: Deploy jobs: - job: Deploy pool: vmImage: 'ubuntu-latest' steps: - task: DownloadBuildArtifacts@1 inputs: buildType: 'current' downloadType: 'single' artifactName: 'drop' downloadPath: '$(System.ArtifactsDirectory)' - task: AzureRmWebAppDeployment@4 inputs: ConnectionType: 'AzureRM' azureSubscription: 'f2d858b2-0b52-4d8e-a750-adae9358c49a' appType: 'webAppLinux' WebAppName: 'ibrahimsi' packageForLinux: '$(System.ArtifactsDirectory)/drop' RuntimeStack: 'STATICSITE|1.0'
Finally run the code

Successfully completed the job


Rehit the URL

Azure Repos
Azure Repos is a set ofย version control toolsย that you can use to manage your code. Whether you work with a team or independently, Azure Repos providesย Git repositoriesย (or)ย Team Foundation Version Controlย (TFVC) for source control of your code.
ย

Itโs integrated with Azure DevOps, a suite of tools thatย cover the entire software development lifecycle, from planning and project management to CI/CD and monitoring.

Azure Repos supports two types of Version Control:
- Git
- TFVC ( Team Foundation Version Control)

Git
Gitย is a version control system that lets you manage and keep track of your source code history.ย GitHubย is a cloud-based hosting service that lets you manage Git repositories.
More Git ๐ย Click the link
TFVC
Team Foundation Version Control (TFVC)ย is aย centralizedย version control system. Typically, team members have only one version of each file on their dev machines. Historical data is maintainedย only on the server. Branches are path-based and created on the server.
Configure the VSCode Git client using
git config --global credential.helper wincred git config --global user.name "Ibrahim S" git config --global user.email Ibrahimsi909@hotmail.com

Goto the last projectย PartsUnlimited
Repos โ Files โ Clone โ Clone in VS Code

Clone the repository on VS Code

PartsUnlimited repository cloned successfully let make the changes to source code

Save & Commit the code

Finally sync the code to remote repository

Go to the azure devops the code is commit or not?

If you get the old code go to the previous commit code and you clone (or) download the old code

Branchย is an independent line of development. It works as aย pointerย to your next commits. Whenever a new branch is created, Git creates a new pointer while keeping the original code base untouched.
Branch is a pointer to one specific commit, while a commit is a snapshot of your repository at a specific point in time
Five types of branches, each with different roles:
- Main branch.
- Feature branch (i.e., Topic branch)
- Release branch.
- Hotfix branch.
- Develop branch (i.e., Integration branch)

Aย local branchย exists only on your local machine. All the changes you introduce and commit to your local repository are stored only on your local system. Create a branch using the below command.
git branch <branchname> git checkout -b <branchname> git branch <branchname> <tag> git branch <branchname> <commit id>
Remote branchesย are how developers collaborate on the same project simultaneously. A remote branch exists in a remote repository (most commonly referred to as origin by convention) and is hosted on a platform such as GitHub.
git remote -v git remote add origin git@github.com:github URL git push origin master

โOriginโย remote refers to the default remote repository that is created when a Git repository is cloned. This remote repository is typically the central repository that is used to share changes and collaborate with other developers.
Find out the branch.

Create a new branch and switch out the new one.

Created a branch in azure repo

Git pullย copies changes from a remote repository directly into your working directory.
Git fetchย command only copies changes into your local Git repo.
Locking a branch will make the branch read-only and ensures that no commits can be made to the branch.
Locking a branch prevents other users from changing the existing commit history.
Tagsย in git are valuable for marking significant points in your projectโs history, documenting releases, and providing a clear reference for important milestones.
Pull Requestsย are specific requests to merge changes from one branch into another.
Azure Artifacts
Azure Artifacts enables developers to efficiently manage all their dependencies from one place. With Azure Artifacts, developers can publish packages to their feeds and share them within their team, across organizations, and even publicly across the internet.

Azure Artifacts if you need to share packages within the same team, across organizations, or even publicly.
Create a new project

Go to azure repository โ Import a repository

Successfully imported

Create a Webapp in Azure portal
App Services โ Create โ Web App

Modify the configuration setting
Note: You must set the app settings as below to disable all file caching:

Add 2 New application setting
Name: WEBSITE_DYNAMIC_CACHE Value: 0

Name: WEBSITE_ENABLE_SYNC_UPDATE_SITE Value: never

Save the changes

If you click the URL the page is goes to default web page

Default web page is running on Azure

Create a new pipeline
Set of automated processes and tools that allows both developers and operations professionals to work cohesively to build and deploy code to a production environment.
Create Pipeline โ Azure Repos Git โ Day7_Artifacts โ Starter Pipeline
trigger: - main stages: - stage: Build jobs: - job: Build pool: vmImage: 'ubuntu-latest' steps: - task: Npm@1 inputs: command: 'custom' customCommand: 'install -D tailwindcss postcss autoprefixer' - task: Npm@1 inputs: command: 'custom' customCommand: 'run build'
Organizational constructs that allow you to store, manage, and group your packages and control who to share it with.
Letโs Create a artifacts feed

Created

Again goto the pipelines click show assistant

npm stands for Node Package Manager. Itโs a library and registry for JavaScript software packages.
Add NPM

Add NPM the code automatically add to the pipelines
trigger: - main stages: - stage: Build jobs: - job: Build pool: vmImage: 'ubuntu-latest' steps: - task: Npm@1 inputs: command: 'custom' customCommand: 'install -D tailwindcss postcss autoprefixer' - task: Npm@1 inputs: command: 'custom' customCommand: 'run build' - task: Npm@1 inputs: command: 'publish' workingDir: './dist' publishRegistry: 'useFeed' publishFeed: '515a2edb-27f5-416f-88c0-0c50138edec1/336630b1-903f-4ae3-88c6-69149d01550e'
Pipeline Code

Finally save the run Got some error

Goto azure artifacts given to the contributor access
Click the Feed Settings

Remove the old one

Add the โย contributorย permission
Enables users to manage personal views, edit items and user information, delete versions in existing lists and document libraries and add, remove, and update personal Web Parts.

Again run the pipeline. Change the version 1.3

Automatically trigger the pipeline

Goto the azure feed

Create a release pipeline
A Release Pipeline consumes the Artifacts and conducts follow-up actions within a multi-staging system.
Release pipeline is a process to ship committed code into production by incorporating CI/CD, automated testing, and finally, software release.
Pipelines โ Releases โ New Pipeline โ Select โ Azure App Service deployment

Given to the name โ Deployment

Click Add an artifact โ Azure artifacts

Enable the continuous deployment trigger
A trigger consists of a specified component, deployment process, and user.

Enter the stage name and select the subscription, Service nameโฆ

Select the azure pipelines on agent pool.
An agent is a service that runs the jobs defined in your pipeline. The execution of these jobs can occur directly on the agentโs host machine or in containers.

Deploy Azure App Service
Added to the some script on app service.
cp -rf /home/site/wwwroot/package/* /home/site/wwwroot/

Save the all setting. Check the release pipelines there is no create

Goto azure artifact promote artifactory

Pre-release means software, online services, and additional products and features that are provided for preview, beta, (or) early access versions. Click that Prerelease

Check the release pipeline

Deploy the stages

Job is completed

Check the URL

KUDU Console is a debugging service for Azure platform which allows you to explore your web app and surf the bugs present on it, like deployment logs, memory dump, and uploading files to your web app, and adding JSON endpoints to your web appsโฆ
Kudu gives you helpful information about your App Service app, Such as App settings. Connection strings. Environment variables.
Diagnostic and troubleshooting purposes when your function or function host fails.

Redirect the console

Click an SSH you should able to the access in web app

File created before 10 minutes
Azure Test Plans
Azure Test Plans is a test management module within Azure DevOps that lets users manage test plans, test suites, and test cases for everyone in the software development process.

Using test plans, you can Azure Test Plans also provides a browser extension for exploratory testing and gathering feedback from stakeholders.
Activate the azure test plan trial period enableย Organization + User side

User level change


Changes made


Access level
- You should haveย Basic + test planย access to execute, create, and publish test cases
- To execute theย test cases using Test Runner, you should have at least basic access
- Toย run exploratory testing with the Feedback extension, you should have stakeholder access

Create a Plan

C

A test suite is a set of tests designed toย check the functionality and performance of the software. It collects individual test cases based on their specific purpose or characteristics.
The Azure Test Plans contain andย configure test suites and individual test cases. Test suites are the collection of test cases. So, when you create a test plan, you must create test suites within it. Three types of test suitesโฆ
- Static-based: You can use these test cases to group out other test suites or test cases.
- Requirement based:ย These test suites are the basic test suites. They pull all the test cases for a given requirement.
- Query based:ย these test suites pull a group of test cases from your project as per the requirement.

Create some dummy data for azure test plan
Azure Bioards โ Create a new work item โ Epic

Save the Epic

Go to the azure boards โ Select Epic

Change the name Testing instead of UI Testing


Goto the azure test suite and change the work item type โMicrosoft.EpicCategoryโ

Run a query โ Create suites


Add the test case

Another one test case created

Assign the test case for someone (users)

Theย test hubย provides a central place for all test planning, execution, and analysis. Test hubย displays the results of test runs. This includes all test runs, both manual and automated.

Goto the azure board check the work item. The test case reflected to the board.

First install the test & case feedback extension. I already add

Connect to the dev azure portal

Select the project

Execute the test case

Manually stop the test case

Capture the screenshot


Finally check the test case

Again run the second test case

Go to the azure board check the work item

Finally check the report

Azure Release Pipelines
A Release Pipeline consumes the Artifacts and conducts follow-up actions within a multi-staging system.
A blue/green deployment is a deployment strategy in which you create two separate, but identical environments. One environment (blue) is running theย current application versionย and one environment (green) is running theย new application version.

Using a blue/green deployment strategy increases application availability and reduces deployment riskย by simplifying the rollback process if a deployment fails.
Once testing has been completed on the green environment, live application traffic is directed to theย green environment and the blue environment is deprecated.
A Build Pipeline is used to generate Artifacts out of Source Code. A Release Pipeline consumes the Artifacts and conducts follow-up actions within a multi-staging system.

Letโs see the release pipeline hands-on ๐
Pipeline โ release pipeline โ new pipelinev โ azure app development

Select s template

Artifactory helps in keeping your data center and automated pipelines ticking, so your business is often running at its best.
Whatever happens, putting in Artifactory with High Availableness ensures that your Artifactory will continue to be available even if one of its nodes is unavailable or down for an upgrade.
One of the foremost benefits of running builds from Artifactory is fully reproducible build.

Click Add an artifact

Click continuous deployment trigger

Continuous deployment triggers allow you to create a release every time a new build artifact is available.
Using the build branch filters you can trigger deployment for a specific target branch. A release will be triggered only if the Git push contains a commit on the specified branch.

The work items represent the core of the Azure DevOps tracking system and can be a bug, a requirement, a general to-do, and so on.
Each work item has a unique ID to keep track of its references from its creation to its implementation as a piece of executable software.
Boards โ work items โ new work item โ task

Go to the queries โ Create a new query

Create a chart also

Goto the pipeline click predeployment conditions



Next goto the task

Agent โ Modify


Azure Functions deployment slots allow your function app to run different instances called slots. Slots are different environments exposed via a publicly available endpoint.
One app instance is always mapped to the production slot, and you can swap instances assigned to a slot on demand.
Goto the azure portal โ webapp โ deployment slots โ add slot

Staging is a creating different subdomain. its created

Deploy an azure service

Select a path and save

Create a another stage (or) clone & Goto Pre-deployment conditions

Pre-deployment approval name add

Goto the task Check everything is same previous stage. Goto to the pipeline edit


Save to the YAML files

trigger: - main stages: - stage: Build jobs: - job: Build pool: vmImage: 'ubuntu-latest' steps: - task: Npm@1 inputs: command: 'install' - task: Npm@1 inputs: command: 'custom' customCommand: 'run build' - task: PublishBuildArtifacts@1 inputs: PathtoPublish: 'build' ArtifactName: 'drop' publishLocation: 'Container'
Its trigger the pipeline

Successfully run the build

Next go to the release pipeline got some query error

Goto the query make some changes

Add permission

Again save the pipeline its automatically trigger

Finally build the job

Check the release pipeline

Completed

Click the staging URL

Redirected the staging url successfully

Deploy the application in production but its need to approval

Click on approve

Finally the application deployed the production

Both URL are working fine

ย
Thank you for reading my blog โฆ:)
ยฉ Copyrights: ProDevOpsGuy
Support ๐ซถ
- Help spread the word about ProDevOpsGuy by sharing it on social media and recommending it to your friends. ๐ฃ๏ธ
- You can also sponsor ๐ on GitHub Sponsors // ๐๏ธ Support Our Work ๐๏ธ
Thank you for reading this long article.
Feedback on typos and content is always welcome.
#Azure DevOps#CI/CD#DevOps#Guide