Skip to content

Commit 8433a1b

Browse files
authored
Update agents.md
1 parent 3095b70 commit 8433a1b

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

docs/pipelines/agents/agents.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ On the **Tasks** tab of the pipeline, add the demand to your agent job.
199199

200200
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.
201201

202-
1. In your web browser:
202+
1. In your web browser, go to **Agent pools**:
203203

204204
[!INCLUDE [agent-pools-tab](includes/agent-pools-tab.md)]
205205

@@ -322,7 +322,7 @@ These credentials are different from the credentials that you use when you regis
322322

323323
> [!TIP]
324324
>
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).
326326

327327
<h2 id="communication">Communication</h2>
328328

@@ -340,7 +340,7 @@ These credentials are different from the credentials that you use when you regis
340340

341341
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.
342342

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.
344344

345345
::: moniker range="< azure-devops"
346346
:::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
350350
:::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":::
351351
::: moniker-end
352352

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:
354354

355355
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.
356356

357357
After registration is complete, the agent downloads a `listener OAuth token` and uses it to listen to the job queue.
358358

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).
360360

361361
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.
362362

@@ -377,7 +377,7 @@ This method secures secrets stored in pipelines or variable groups when exchange
377377

378378
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.
379379

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.
381381

382382
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:
383383

@@ -411,15 +411,15 @@ The authentication method that you use to register the agent is used only during
411411

412412
You can run your self-hosted agent as either a service or an interactive process.
413413

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.
415415

416416
* **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.
417417
* **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.
418418

419419
> [!NOTE]
420420
> 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).
421421
>
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:
423423
>
424424
> `%windir%\System32\tscon.exe 1 /dest:console`
425425

@@ -453,15 +453,15 @@ If you run a self-hosted agent interactively, or if there's a newer *major* vers
453453

454454
:::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":::
455455

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.
457457

458458
:::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":::
459459

460460
1. Select **Update** to confirm.
461461

462462
:::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":::
463463

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.
465465

466466
::: moniker-end
467467

@@ -515,16 +515,15 @@ For Microsoft-hosted agents, the agent is torn down and returned to the Azure Pi
515515

516516
For self-hosted agents:
517517

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.
520519
* The first command is sent with a timeout of 7.5 seconds.
521520
* If the process doesn't terminate, a second command is sent with a 2.5-second timeout.
522521
* If the process doesn't terminate, the agent commands it to be killed.
523522
* If the process ignores the two initial termination requests, it's forcibly killed.
524523

525-
From the initial request to termination takes approximately 10 seconds.
524+
The time from the initial request to termination is approximately 10 seconds.
526525

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:
528527

529528
* macOS and Linux: The commands sent are `SIGINT`, followed by `SIGTERM`, followed by `SIGKILL`.
530529
* 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}/
556555

557556
::: moniker range="<=azure-devops"
558557

559-
#### URI Parameters
558+
#### URI parameters
560559

561560
| Name | In | Required | Type | Description |
562561
| -------------- | ----- | -------- | ------------- | -------------------------------------------------------------------------------------- |
563-
| `agentId` | query | `False` | string | The agent to update. If not specified, update is triggered for all agents. |
562+
| `agentId` | query | `False` | string | The agent to update. If it's not specified, an update is triggered for all agents. |
564563
| `organization` | path | `True` | string | The name of the Azure DevOps organization. |
565564
| `poolId` | path | `True` | integer int32 | The agent pool to use. |
566565
| `api-version` | query | `False` | string | Version of the API to use. To use this version of the API, the value should be set to `6.0`. |
567566

568567
To trigger an agent update, the request body should be empty.
569568

570-
Azure Pipelines Agent is open source on [GitHub](https://github.com/microsoft/azure-pipelines-agent).
569+
The Azure Pipelines agent is open source on [GitHub](https://github.com/microsoft/azure-pipelines-agent).
571570

572571
## Related content
573572

0 commit comments

Comments
 (0)