DevOps Classroom Series – 06/Mar/2021

What is Azure DevOps

  • Azure Devops server (formerly Team Foundation Server and Visual Studio Team System (VSTS)) is a Microsoft product that provides version control, reporting , requirements management, project managament , automated builds, testing and release management capabilities
  • This covers the entire application lifecycle and enables DevOps capabilities.
  • Azure DevOps is offered as
    • Azure DevOps Services:
      • This is a hosted solution on microsoft azure
    • Azure DevOps Server:
      • This is a installation that can be done on the on-premisies Refer Here
  • Azure DevOps has the application lifecycle defined as shown below Preview
  • During the Plan phase, teams use Backlogs or Kanban boards to define, track & layout the work that needs to be done for Application in Azure Boards. We also create a SCM system that can be GitHub or Azure Git Repos
  • During the Development Phase, we create Azure Pipelines to create automated builds from the source code. We can use visual studio code to create pipelines for building the code
  • During the deliver phase, we deploy applications and services to the target environments. We use terraform or ARM templates to create infrastructure
  • During the operate phase, we implement montoring for applications and services
  • For Creating an Azure DevOps Service environment Refer Here Preview
  • Create a new project in Azure DevOps Preview

Understanding Azure DevOps Services

  • The following are the different Azure DevOps Services
    • Azure Boards:
      • They are used to plan, track and discuss work across teams using Agile planning tools that are available
      • Teams can manage their software project with native support for Scrum and Kanban
      • You can alos create customizable dashboards Preview
    • Azure Repos
      • They support Git repository hosting and also Team foundation server version control. Preview
    • Azure Pipelines
      • We can azure pipelines to automatically build, test and deploy code and make it avalilable for other targets Preview
    • Azure Test Plans:
      • With Azure Test plans, teams can use the features offered to plan manual test, explorartory tests and user acceptance testng and gathering feedback from stack holders
      • Tests are organized as test plans and test suites by tester and team leads Preview
    • Azure Artifacts:
      • With Azure Artifacts, we can create and share Nuget, npm, Python and Maven packages from public and private sources with teams in Azure DevOps
    • Extension Marketplace

Azure Git Repos

  • Exercise: Create a new project in Azure Devops and create a new repository and add gameoflife source code into the Newly added repository.
  • I want all the commits of master branch from github Refer Here into Azure DevOps Git repo

Azure Pipelines

  • Azure pipeline is a cloud service offered by Azure platform to automate building, testing and releasing phases fo your development cycle (ci/cd)
  • Azure pipelines works with the following schema Preview
  • To use Azure pipelines, we need to create a pipeline. A pipeline in Azure DevOps can be created in two ways
    • Using the classic interface
    • Using a YAML
  • In Jenkins to define the pipeline we created a Jenkinsfile where we had option to create a scripted pipeline or declarative pipeline
  • In the case of Azure devops we create a azure-pipelines.yml file to define the pipeline
  • Refer Here for the azure pipeline yaml schema
  • Azure pipeline can be represented as Preview
  • A pipeline starts from a trigger ( a manual , a push inside repository or schedule)
  • Pipeline is generally composed of one or more stages
  • Each stage contains one or more jobs
  • Each job runs on a Agent and it has steps.
  • Each step is composed of task that performs some action.
  • the final output of the pipeline is an artifact

Build agents

  • To build and deploy code using Azure Pipelines, we need atleast one agent.
  • Agent is a service that runs the jobs defined in pipeline.
  • Execution of these jobs occur directly on agent’s host machine
  • When defining agents for the pipeline, we have two possible agents
    • Microsoft-hosted agents: This is a service managed by Microsoft and its cleared on every execution of pipeline
    • Self-hosted agents: This is a service which you setup and manage yourself. This can be a custom vm on Azure or on-premise. In the self-hosted agent you need the install the necessary softwares to perform builds. A self-hosted agent can be a windows, linux , mac or Docker container
  • Microsoft Hosted Agents:
    • Refer Here for the agent pool images and labels that can be used to build the project Preview
  • Lets create a sample pipeline by clicking on setup build and selecting maven Preview Preview
  • Now if we review the azure-pipelines.yaml file created Preview

Next Steps

  • JSON and YAML Tutorial Refer Here
  • Create a pipeline for .net builds by authoring yaml files
  • Create a pipeline for java builds by authoring yaml files
  • configure self hosted agents.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube