You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pipelines/agents/agents.md
+16-17Lines changed: 16 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,7 +199,7 @@ On the **Tasks** tab of the pipeline, add the demand to your agent job.
199
199
200
200
You can view agent details, including version and system capabilities, and manage its user capabilities. Go to **Agent pools** and select the **Capabilities** tab for the desired agent.
@@ -322,7 +322,7 @@ These credentials are different from the credentials that you use when you regis
322
322
323
323
> [!TIP]
324
324
>
325
-
> After you install new software on a self-hosted agent, you must restart the agent for the new capability to show up. For more information, see: [Restart Windows agent](windows-agent.md#how-do-i-restart-the-agent), [Restart Linux agent](linux-agent.md#how-do-i-restart-the-agent), and [Restart Mac agent](osx-agent.md#how-do-i-restart-the-agent).
325
+
> After you install new software on a self-hosted agent, you must restart the agent for the new capability to show up. For more information, see [Restart Windows agent](windows-agent.md#how-do-i-restart-the-agent), [Restart Linux agent](linux-agent.md#how-do-i-restart-the-agent), and [Restart Mac agent](osx-agent.md#how-do-i-restart-the-agent).
326
326
327
327
<h2 id="communication">Communication</h2>
328
328
@@ -340,7 +340,7 @@ These credentials are different from the credentials that you use when you regis
340
340
341
341
The agent communicates with Azure Pipelines or Azure DevOps Server. It determines which job it needs to run and reports the logs and job status. The agent always initiates this communication.
342
342
343
-
All the messages from the agent to Azure Pipelines or Azure DevOps Server happen over HTTP or HTTPS, depending on how you configure the agent. This pull model allows you to configure the agent to different topologies as shown by the following examples.
343
+
All the messages from the agent to Azure Pipelines or Azure DevOps Server happen over HTTP or HTTPS, depending on how you configure the agent. This pull model allows you to configure the agent to different topologies, as shown in the following examples.
344
344
345
345
::: moniker range="< azure-devops"
346
346
:::image type="content" source="media/agent-topologies-tfs.png" alt-text="Graphic that shows agent topologies in on-premises installations." lightbox= "media/agent-topologies-tfs.png":::
@@ -350,13 +350,13 @@ All the messages from the agent to Azure Pipelines or Azure DevOps Server happen
350
350
:::image type="content" source="media/agent-topologies-devops.png" alt-text="Graphic that shows agent topologies in Azure DevOps Services." lightbox= "media/agent-topologies-devops.png":::
351
351
::: moniker-end
352
352
353
-
Here's a common communication pattern between the agent and Azure Pipelines or Azure DevOps Server.
353
+
Here's a common communication pattern between the agent and Azure Pipelines or Azure DevOps Server:
354
354
355
355
1. The user registers an agent with Azure Pipelines or Azure DevOps Server by adding it to an [agent pool](pools-queues.md). To register an agent in that agent pool, you need to have the [Agent pool administrator](pools-queues.md#security) role. The **Agent pool administrator** role is needed only at the time of registration and isn't persisted on the agent. It isn't used in any further communication between the agent and Azure Pipelines or Azure DevOps Server.
356
356
357
357
After registration is complete, the agent downloads a `listener OAuth token` and uses it to listen to the job queue.
358
358
359
-
1. The agent listens to see if a new job request is posted in the job queue in Azure Pipelines or Azure DevOps Server by using an HTTP long poll. When a job is available, the agent downloads the job and a `job-specific OAuth token`. Azure Pipelines/Azure DevOps Server generates a short-lived token for the scoped identity [specified in the pipeline](../build/options.md).
359
+
1. The agent listens to see if a new job request is posted in the job queue in Azure Pipelines or Azure DevOps Server by using an HTTP long poll. When a job is available, the agent downloads the job and a `job-specific OAuth token`. Azure Pipelines or Azure DevOps Server generates a short-lived token for the scoped identity [specified in the pipeline](../build/options.md).
360
360
361
361
The agent uses the token to access or modify resources on Azure Pipelines or Azure DevOps Server within that job. For example, it uses the token to access source code or upload test results.
362
362
@@ -377,7 +377,7 @@ This method secures secrets stored in pipelines or variable groups when exchange
377
377
378
378
When you use the agent to deploy artifacts to a set of servers, it must have "line of sight" connectivity to those servers. Microsoft-hosted agent pools, by default, have connectivity to Azure websites and servers that run in Azure.
379
379
380
-
If your Azure resources run in an Azure Virtual Network, you can get the [Agent IP ranges](hosted.md#agent-ip-ranges) where Microsoft-hosted agents are deployed. Then, you can configure the firewall rules for your Azure virtual network to allow access by the agent.
380
+
If your Azure resources run in an Azure virtual network, you can get the [Agent IP ranges](hosted.md#agent-ip-ranges) where Microsoft-hosted agents are deployed. Then, you can configure the firewall rules for your Azure virtual network to allow access by the agent.
381
381
382
382
If your on-premises environments don't have connectivity to a Microsoft-hosted agent pool, which is typically the case due to intermediate firewalls, you need to manually configure self-hosted agents on on-premises computers. The agents must have connectivity to the target on-premises environments, and access to the internet to connect to Azure Pipelines or Azure DevOps Server. This process is demonstrated in the following schematic:
383
383
@@ -411,15 +411,15 @@ The authentication method that you use to register the agent is used only during
411
411
412
412
You can run your self-hosted agent as either a service or an interactive process.
413
413
414
-
After you configure the agent, we recommend you first try it in interactive mode to make sure it works. Then, for production use, we recommend you run the agent in one of the following modes so that it reliably remains in a running state. These modes also ensure that the agent starts automatically if the machine is restarted.
414
+
After you configure the agent, we recommend that you first try it in interactive mode to make sure it works. Then, for production use, we recommend that you run the agent in one of the following modes so that it reliably remains in a running state. These modes also ensure that the agent starts automatically if the machine is restarted.
415
415
416
416
* **As a service**: You can use the service manager of the operating system to manage the lifecycle of the agent. The experience to autoupgrade the agent is better when you run the agent as a service.
417
417
* **As an interactive process with automatic sign in enabled**: In some cases, you might need to run the agent interactively for production use (for example, to run UI tests). When you configure an agent to run in this mode, the screen saver is disabled. Some domain policies might prevent you from enabling automatic sign in or disabling the screen saver. In such cases, you might need to seek an exemption from the domain policy, or run the agent on a workgroup computer where the domain policies don't apply.
418
418
419
419
> [!NOTE]
420
420
> There are security risks when you enable automatic sign in or disable the screen saver. Other users might be able to access the computer and use the account that automatically signs in. If you configure the agent to run this way, you must ensure the computer is physically protected (for example, located in a secure facility).
421
421
>
422
-
> If you use remote desktop to access a computer on which an agent is running with automatic sign in, closing the remote desktop causes the computer to lock. Any UI tests that run on this agent might fail. To avoid this issue, use the [`tscon`](/windows-server/administration/windows-commands/tscon) command to disconnect from remote desktop. Refer to the following example:
422
+
> If you use a remote desktop to access a computer on which an agent is running with automatic sign in, closing the remote desktop causes the computer to lock. Any UI tests that run on this agent might fail. To avoid this issue, use the [`tscon`](/windows-server/administration/windows-commands/tscon) command to disconnect from the remote desktop. For example:
423
423
>
424
424
> `%windir%\System32\tscon.exe 1 /dest:console`
425
425
@@ -453,15 +453,15 @@ If you run a self-hosted agent interactively, or if there's a newer *major* vers
453
453
454
454
:::image type="content" source="media/agents/update-all-agents.png" alt-text="Screenshot that shows how to select Update all agents." lightbox= "media/agents/update-all-agents.png":::
455
455
456
-
You can also update agents individually by choosing **Update agent** from the **...** menu.
456
+
You can also update agents individually by selecting **Update agent** from the **...** menu.
457
457
458
458
:::image type="content" source="media/agents/update-agent.png" alt-text="Screenshot that shows how to select Update agent." lightbox= "media/agents/update-agent.png":::
459
459
460
460
1. Select **Update** to confirm.
461
461
462
462
:::image type="content" source="media/agents/update-all-agents-confirmation.png" alt-text="Screenshot that shows how to select Update to confirm." lightbox= "media/agents/update-all-agents-confirmation.png":::
463
463
464
-
1. An update request is queued for each agent in the pool, and runs when any currently running jobs complete. An upgrade typically takes only a few moments. This amount of time is long enough to download the latest version of the agent software (approximately 200 MB), unzip it, and restart the agent with the new version. You can monitor the status of your agents on the **Agents** tab.
464
+
1. An update request is queued for each agent in the pool, and it runs when any currently running jobs finish. An upgrade typically takes only a few moments. This amount of time is long enough to download the latest version of the agent software (approximately 200 MB), unzip it, and restart the agent with the new version. You can monitor the status of your agents on the **Agents** tab.
465
465
466
466
::: moniker-end
467
467
@@ -515,16 +515,15 @@ For Microsoft-hosted agents, the agent is torn down and returned to the Azure Pi
515
515
516
516
For self-hosted agents:
517
517
518
-
When a pipeline is canceled, the agent sends a sequence of commands to the process that's executing the current step.
519
-
518
+
* When a pipeline is canceled, the agent sends a sequence of commands to the process that's executing the current step.
520
519
* The first command is sent with a timeout of 7.5 seconds.
521
520
* If the process doesn't terminate, a second command is sent with a 2.5-second timeout.
522
521
* If the process doesn't terminate, the agent commands it to be killed.
523
522
* If the process ignores the two initial termination requests, it's forcibly killed.
524
523
525
-
From the initial request to termination takes approximately 10 seconds.
524
+
The time from the initial request to termination is approximately 10 seconds.
526
525
527
-
The commands issued to the process to cancel the pipeline differ based on the agent operating system.
526
+
The commands issued to the process to cancel the pipeline differ based on the agent operating system:
528
527
529
528
* macOS and Linux: The commands sent are `SIGINT`, followed by `SIGTERM`, followed by `SIGKILL`.
530
529
* Windows: The commands sent to the process are `Ctrl+C`, followed by `Ctrl+Break`, followed by `Process.Kill`.
@@ -556,18 +555,18 @@ POST https://{server url}/tfs/{collection}/_apis/distributedtask/pools/{poolId}/
0 commit comments