0
votes

I’m in the process of installing a Team Foundation Server (TFS) build agent onto a Ubuntu server in Azure. The Ubuntu server is running 16.04.2 LTS. The TFS server is running TFS 2017 update 1. The TFS server is on premise. I’m using the Deploy an agent on Linux documentation (https://www.visualstudio.com/en-us/docs/build/actions/agents/v2-linux) as a guide. I have very little experience with Linux, so please bear with me.

Here are my questions.

  1. I want to setup the build agent to run as a service on the Ubuntu server. I assume I need to create a local account that the service will run under. What do I need to do to enable the on premise TFS server to fire a build using the agent on the Azure Ubuntu server? Or will this just work once the build agent is registered with the on premise TFS server?

  2. When the build is complete, the output from the build needs to be copied back to an on premise network file location. What steps do I need to complete to allow the build agent running under the Ubuntu account to connect to the on premise file system?

2

2 Answers

2
votes
  1. You need to create a service account to run the build. To configure the build agent, suggest you to use a local account. If you want to run the agent as service mode on Ubuntu server, after registered with the on premise TFS server, the build agent is still online, you need to manually stat the service.

For more details about install TFS2017 Build Agent on Ubuntu Linux server, suggest you go through this wonderful tutorial(page105~118) from Ben.

  1. A workaround for this is directly publish Build Artifacts to Team Foundation Server. And then download the build artifacts to the on premise file system.
1
votes

I finished installing my TFS build agent onto the Ubuntu server in Azure. I used putty (so no GUI) to do all of the configuration on the server. Here are the additional steps I had to take to get my setup to work beyond what was in Ben Day’s excellent guide:

Install Ubuntu Package Prerequisite

https://github.com/Microsoft/vsts-agent/blob/master/docs/start/envubuntu.md

Use this command: sudo apt-get install -y libunwind8 libcurl3

Download the Agent Install File Microsoft publishes agent install files on GitHub at this location: https://github.com/Microsoft/vsts-agent/releases Make sure the version number matches what is available in Team Web Access (TWA). This ensures all build agents are the same across all servers. This is the version I used v2.112.0 (TFS2017 QU1) – https://github.com/Microsoft/vsts-agent/releases/tag/v2.112.0

Use this command to download the build agent install file:

sudo wget https://github.com/Microsoft/vsts-agent/releases/download/v2.112.0/vsts-agent-ubuntu.16.04-x64-2.112.0.tar.gz