Reputation: 489
I'm new to Azure pipelines and curious to know the exact difference between Microsoft Hosted agents and Self-Hosted Agents. Also need to know in what scenarios we should use either of the agents. Do these agents have relation with On-prem and cloud deployments?
Upvotes: 8
Views: 17928
Reputation: 19401
Microsoft-hosted agents :
With Microsoft-hosted agents, maintenance and upgrades are taken care of for you. Each time you run a pipeline, you get a fresh virtual machine. The virtual machine is discarded after one use. Microsoft-hosted agents can run jobs directly on the VM or in a container.
The pre-defined Azure Pipelines
agent pool offers several virtual machine images to choose from, each including a broad range of tools and software. You can see the installed software for each hosted agent by choosing the Included Software
link in the table.
Microsoft-hosted agents run on secure Azure platform. However, you must be aware of the following security considerations.
For capabilities, limitations and other details about hosted agent ,please refer to this document.
For many teams this is the simplest way to run your jobs. You can try it first and see if it works for your build or deployment. If not, you can use a self-hosted agent.
Self-hosted agents :
Self-hosted agents give you more control to install dependent software needed for your builds and deployments. Also, machine-level caches and configuration persist from run to run, which can boost speed.
You can install the agent on Linux, macOS, Windows machines or Docker container.
The performance advantages of private agent:
Summary: There are many differences between hosted agent and self-hosted agent, you can choose the appropriate agent according to your needs. For details,please refer to the documentation .
Upvotes: 12