Skip to content

Latest commit

 

History

History
191 lines (123 loc) · 6.1 KB

v2-windows.md

File metadata and controls

191 lines (123 loc) · 6.1 KB
title description ms.topic ms.prod ms.technology ms.assetid ms.manager ms.author author ms.date monikerRange
Deploy a build and release agent on Windows
Learn how to use Windows Build and Release agents to build and deploy your Windows and Azure code for VSTS and TFS.
conceptual
devops
devops-cicd
20409B8F-A3A9-49A0-A418-1840BD7ADA8E
douge
alewis
andyjlewis
3/14/2018
>= tfs-2017

Deploy an agent on Windows

VSTS | TFS 2018 | TFS 2017 | TFS 2015 | Previous versions (XAML builds)

To build and deploy Windows, Azure, and other Visual Studio solutions you'll need at least one Windows agent. Windows agents can also build Java and Android apps.

Before you begin:

[!INCLUDE include]

Check prerequisites

Make sure your machine is prepared with our Windows system prerequisites.

If you're building from a Subversion repo, you must install the Subversion client on the machine.

Prepare permissions

[!INCLUDE permissions]

Download and configure the agent

  1. Log on to the machine using the account for which you've prepared permissions as explained above.
  2. In your web browser, sign on to VSTS or TFS, and navigate to the **Agent pools** tab: [!INCLUDE [include](_shared/agent-pools-tab.md)]
  3. Click **Download agent**.
  4. On the **Get agent** dialog box, click **Windows**.
  5. Click the **Download** button.
  6. Follow the instructions on the page.

::: moniker range="vsts"

Server URL on VSTS

https://{your-account}.visualstudio.com ::: moniker-end

::: moniker range=">= tfs-2017 < vsts"

Server URL on TFS 2017 and newer

https://{your_server}/tfs ::: moniker-end

Authentication type

::: moniker range="vsts"

VSTS

Choose PAT, and then paste the PAT token you created into the command prompt window.

::: moniker-end

::: moniker range=">= tfs-2017 < vsts"

TFS 2017 and newer

Important

Make sure your server is configured to support the authentication method you want to use.

When you configure your agent to connect to TFS, you've got the following options:

  • Alternate Connect to TFS using Basic authentication. After you select Alternate you'll be prompted for your credentials.

  • Negotiate Connect to TFS as a user other than the signed-in user via a Windows authentication scheme such as NTLM or Kerberos. After you select Negotiate you'll be prompted for credentials.

  • Integrated (Default) Connect a Windows agent to TFS using the credentials of the signed-in user via a Windows authentication scheme such as NTLM or Kerberos. You won't be prompted for credentials after you choose this method.

  • PAT Supported only on VSTS and TFS 2017 and newer. After you choose PAT, paste the PAT token you created into the command prompt window. Use a personal access token (PAT) if your TFS instance and the agent machine are not in a trusted domain. PAT authentication is handled by your TFS instance instead of the domain controller.

Note

When using PAT as the authentication method, the PAT token is used only for the initial configuration of the agent. Learn more at Communication with VSTS or TFS.

::: moniker-end

Choose interactive or service mode

For guidance on whether to run the agent in interactive mode or as a service, see Agents: Interactive vs. service.

If you configured the agent to run interactively, to run it:

.\run.cmd

If you configured the agent to run as a service, it starts automatically. You can view and control the agent running status from the services snap-in. Run services.msc and look for "VSTS Agent (name of your agent)".

If you need to change the logon account, don't do it from the services snap-in. Instead, see the information below to re-configure the agent.

[!INCLUDE include]

Remove and re-configure an agent

To remove the agent:

.\config remove

After you've removed the agent, you can configure it again.

Help on other options

To learn about other options:

.\config --help

The help provides information on authentication alternatives and unattended configuration.

[!INCLUDE include]

Q&A

::: moniker range="tfs-2017"

What version of the agent runs with TFS 2017?

TFS version Agent version
2017 RTM 2.105.7
2017.3 2.112.0

::: moniker-end

::: moniker range="vsts" [!INCLUDE include] ::: moniker-end

How do I run the agent with self-signed certificate?

Run the agent with self-signed certificate

How do I run the agent behind a web proxy?

Run the agent behind a web proxy

::: moniker range="vsts"

How do I set different environment variables for each individual agent?

Create a .env file under agent's root directory and put environment variables you want to set into the file as following format:

MyEnv0=MyEnvValue0
MyEnv1=MyEnvValue1
MyEnv2=MyEnvValue2
MyEnv3=MyEnvValue3
MyEnv4=MyEnvValue4

::: moniker-end

::: moniker range="vsts" [!INCLUDE include] ::: moniker-end

::: moniker range="vsts" [!INCLUDE include] ::: moniker-end

::: moniker range="< vsts" [!INCLUDE include] ::: moniker-end