DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Change Management Is Broken: Here’s How To Fix It
  • A Tool Is Not a Platform (And Your Team Knows the Difference)
  • AI Is Finding Bugs Faster Than Enterprises Can Patch — Here's What Data Security Teams Should Do
  • A Scalable Framework for Enterprise Salesforce Optimization: Turning Outcomes Into an Operating System

Trending

  • Architectural Collapse: How Extension Poisoning, Node Vulnerabilities, and Infrastructure Fog Enabled the GitHub Repository Breach
  • A Low-Latency Routing Pattern for Multiple Small Language Models
  • Rust-Native Alternatives to Spark SQL and DataFrame Workloads
  • Skills, Java 17, and Theme Accents

How to Set Up a Private Agent in Visual Studio Team Services

Learn how to install and set up a private agent to build and deploy your project with Visual Studio Team Services in this tutorial.

By 
Michele Ferracin user avatar
Michele Ferracin
·
Nov. 07, 17 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
15.4K Views

Join the DZone community and get the full member experience.

Join For Free

In the last post about VSTS (Visual Studio Team Services), we set up the foundations for a project.

In this tutorial, we'll  install a private agent to build and deploy our project.

VSTS provides hosted agents to build and deploy. When we use a hosted agent, Microsoft takes care of the maintenance and upgrades, so for many teams, this is the simplest way. Every agent has a set of capabilities that indicate what it can do. Capabilities are name-value pairs that are either automatically discovered by the agent software, in which case they are called system capabilities, or those that you define, in which case they are called user capabilities.
If the hosted agents do not suit our needs, we can set up our dedicated agent, and that's the topic of this post.

1. Set Up the Agent Machine

The first step we need to do is to set up the machine where we'll install the VS agent. By this, I mean we need to install the SDK, libraries, packages, etc that our project needs to build. After that, we install the VS agent.

2. Download the VS Agent

First, we need to go into the Agent Pools section of VSTS from the browser in the machine where we want to install the agent.

From here, we click the Download Agent button.

We choose our operating system and then click download.

When the download completes we can follow the instructions provided by MS in the same page or we can extract the content of the zip folder with the Windows user interface. We unzip the folder in a dedicated directory, for example, C:\vs-agent.

3. Install the Agent

Now we run the config bat file.

The installation procedure asks us our server URL of VSTS.

Then it asks the authentication type to communicate with VSTS. We'll use a Personal Access Token (PAT), so we simply press enter, because it is the default value.

Now we need to go back to VSTS to generate a PAT.

From our profile icon in the top-right corner, we access the Security section.

Here, we create a new token. We choose a name, the validity time, and the reference account. We specify the authorized scopes, too. In this example, for simplicity, we set "All Scopes," but we prefer to give the minimum set of functionalities for our production/business purposes.

When we click on Create Token, VSTS will show us our token that we must save in a safe place right now because we won't be able to see it anymore in the future.

With the token in our clipboard, we go back to the installation of the agent and right-click with the command prompt to paste the token, and press Enter.

The agent tries to connect, and if the test is OK, we need to specify the Agent Pool name where the agent will be inserted. If we want to create a new Agent Pool, we go back to VSTS in the Agent Pool section and create a new Pool.

Now we can write the name in the prompt (MadLab).

And now we give our agent a name (VsAgent1).

For the other options, we'll always choose the default option by pressing Enter when needed. At the end, the process will like something like the following picture:

If we go back to VSTS, we can see that agent has been recognized with all its capabilities.

TL; DR

The installation of a private agent is quick and simple. This enables us to avoid the limitations of the hosted agent if our project has particular needs of SDKs, libraries, and so on.

For this example, I installed the agent into an Azure VM with Windows Server 2016.

teams operating system

Published at DZone with permission of Michele Ferracin. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Change Management Is Broken: Here’s How To Fix It
  • A Tool Is Not a Platform (And Your Team Knows the Difference)
  • AI Is Finding Bugs Faster Than Enterprises Can Patch — Here's What Data Security Teams Should Do
  • A Scalable Framework for Enterprise Salesforce Optimization: Turning Outcomes Into an Operating System

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook