How it works...

The Azure Pipeline Agent is responsible for executing the build and release pipelines that you create in Azure DevOps. In order to create a pipeline agent, you first need to place it in either a new or existing agent pool. An agent pool is a collection of one or more pipeline agents. Using agent pools allows you to organize your pipeline agents and manage them at group level, instead of individually.

Once the agent pool has been created, you can then create the pipeline agent. There are two types of pipeline agents available:

  • Microsoft-hosted agents: These agents execute and exist solely in the cloud, meaning you do not have to have a machine configured with the agent. Every time a build/release pipeline runs, the agent is created on the fly and is discarded when the pipeline finishes.
  • Self-hosted agents: These agents require you to set up and configure them on your own. You will need to have either a virtual or physical machine to install these agents on. The agents can be installed in Linux, macOS, and Windows OSes, as well as within Docker containers. These agents remain idle (but running) until a pipeline is executed. When the pipeline finishes, these agents will remain in place, listening for the next pipeline that needs to be executed.

When you configure a pipeline agent, you will have the ability to define capabilities for that agent. In other words, you can tell Azure DevOps what software that particular pipeline agent has access to in their environment. When the pipelines are defined, you can define what the required capabilities are, so that when the pipeline is executed, Azure DevOps can determine which pipeline agent can successfully execute the pipeline. This is helpful in the event that you have to direct your pipeline to a specific pipeline agent.

Self-hosted pipeline agents can be set up to run in two modes:

  • Service mode: These agents are installed as a service in the OS so that they're always on. You can check the status of these agents on the host machine by using the service manager.
  • Interactive mode: These agents are installed using auto-login so that they are automatically started whenever the host machine is restarted. When these agents start up, a command-line dialog window will appear and, as long as that window is open, the pipeline agent is running and waiting for the next pipeline to execute.
Installing an interactive pipeline agent with auto-login is a security risk. Be aware of this and only use this type of agent setup when necessary.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.163.175