Agent Pool in DevOps

 

Agent: An agent is an computing infrastructure with an installed agent software that runs one job at a time.

 

Agent Pool: a computing infrastructure, that indicates it's a VM where you have agent installed software assisting you in running one task at a moment.

 

Job: That is rather comparable to what you what goals you wish to reach. Thus, the job will include several tasks.

 

When you execute your task via a pipeline behind the scene, an agent pool comes into picture. All this task, everything you see runs on top of that agent.

An agent therefore build/create your code or deploy/runs your applications via Azure pipelines. To do all of them, you require at least one agent. The system starts one or more tasks when your pipeline runs. Jobs are really nothing; rather, they are several tasks performed on top of the agent. So in short, agent is nothing, but it's a computing Infrastructure.

 

 

Types of agent

There are two types of agent which you will come across in real time.

  • Microsoft hosted agent. 
    • These agents are hosted and managed by Microsoft. So the maintenance, upgrades everything is taken care by Microsoft.
      • Benefits
        • You always get the latest version okay.
        • Each time you run a pipeline, you get fresh VM for each job.
      • Disadvantages
        • any job-made virtual machine file system changes, like the job may have downloaded config, prerequisites, or tools etc, all will be discarded each time and it will be not available for your next job.
        • If you want incremental builds, Self-hosted agents can do it, however Microsoft hosted Agents cannot build incrementally.
  • Self-hosted agent
    • Completely dependent on us. We need to manage this.
    • We need to configure it and we need to host this on our own VM.
      • Benefits
        • you gain access to everything.
        • You have access to the work directory.
        • You have access to the staging directory.
        • Basically you have every every access and you can manage that agent by yourself.
        • If you need an incremental build, if you need a caching to be done, then definitely self-hosted agent is an option.
  •  

 


Related Question