DevOps Classroom Series – 12/Dec/2021

Scrum Based Agile Project Managment

  • Refer Here for the Agile Project Managment using scrum

Azure DevOps

  • Product Evolution Preview
  • Azure DevOPs can be installed on-premises or you can go with Azure DevOps Hosted.
  • For on-premises Refer Here
  • To use the Azure DevOps Hosted Refer Here
  • For pricing options Refer Here
  • For users of Microsoft Azure. Login into the Azure Portal Preview
  • Features with Azure DevOps
    • Dashbiards
    • Wiki
    • Boards
    • Repos
    • Pipelines
    • TestPlans
    • Artifacts
  • In newly created Organization, create a new project Preview
  • Source Repos:
    • Can host public or private Git Repositories
    • Create a Private Repository for Spring-pet-clinic & Generate Credentials Preview
    • Lets manage by using ssh keys (In your workstation lets assume you have a private public key pair generated from ssh-keygen) Preview

Azure Pipelines

  • Azure Pipelines is a service offered by Azure DevOps that allows you to automate building, testing and releasing phase of SDLC.

  • Azure Pipelines can be created for the applications developed in any language or working on any platform.

  • Using Azure Pipelines we can build the code on Windows, Linux or mac

  • Azure Pipelines is free for public projects which for private projects you have up to 1800 miutes (30 hours) worth of pipelines for free each month

  • Azure Pipelines work with the following schema Preview

  • A pipeline in Azure DevOps can be created in two ways

    • Using the Classic Interface: This allows you to select some tasks visually from the list of possible tasks and you need to fill in parameters for those tasks
    • Using YAML: This pipeline is created by creating a YAML file inside your repository with all the needed steps.
  • Since we understand Jenkins, There is a document that can be used to understand the similarities or differences in writing YAML vs Jenkinsfile Refer Here

  • Representation of Azure Pipeline Preview

  • Understanding agents:

    • To build and deploy your code using Azure Pipelines, you need atleast one Agent.
    • Agent is a service that runs the jobs defined in your pipeline.
    • The execution of Jobs can occur directly on the agent’s host machine or in containers
    • While defining agents for your pipeline, you have two types of possible agents
      • Microsoft-hosted agents: This service is totally managed by Microsoft and its cleared on every execution of pipelinet
      • Self-hosted agents: This is a service that you need to setup and manage by yourself. This can be a custom virtual machine in Azure or on-premises. A self-hosted agent can be on Windows, Linux, mac or in Docker container
  • Microsoft-hosted agents

    • Microsoft hosted agents are simplest way to define an agent for your pipeline.
    • Azure Pipelines a provides a Microsoft-host Agent pool by default called as Azure Pipelines Preview
    • You can create different virtual machine types for executing your poeple. The following are the standard agent types Refer Here Preview
  • Self-Hosted agents

    • A self hosted agent software can be installed on various platforms
    • Creating a self hosted agent involves completing the following activities
      • Prepare the environment
      • Prepare Permission for Azure DevOps
      • Download and configure the agent
      • Start the agent

Creating an ubuntu linux Self-Hosted agent to build the java code

  • Create an ubuntu 20.04 vm

  • Install jdk 11 and maven Refer Here

  • Refer Here for the self-hosted agent setups

  • The first step to perform when creating an agent is to register the agent in your Azure DevOps Orgnaization. To do that you need to sign in as adminstrator and from the UserSetting Menu. Click on Personal Access tokens & Generate and Access token Preview Preview Preview

  • Now copy the token.

  • Navigate to agent pools -> Default Preview Preview Preview

  • Following instructions from above image

wget https://vstsagentpackage.azureedge.net/agent/2.195.2/vsts-agent-linux-x64-2.195.2.tar.gz
mkdir myagent && cd myagent
tar xzvf ~/vsts-agent-linux-x64-2.195.2.tar.gz
./config.sh
./run.sh
  • Now the agent should be online Preview

  • If you want your agent to start automatically when the vm starts configure as systemd service Refer Here

  • Refer Here for the YAML schema reference for creating the pipeline

  • In your reposiotory create a file called as azure-pipelines.yml

  • Refer Here for visual studio marketplace extension

  • In Azure we have catalog of tasks Refer Here

  • Refer Here for the pipeline created by us

  • Now lets create a pipeline from source-repos Preview Preview Preview

  • Now lets run the job and view the test results Preview

  • For creating the pipeline from Azure Devops without directly writing yaml refer to class room video

Leave a Reply

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

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