Installing a Linux Agent for VSTS Build Has Never Been Easier
How to install the new version of the VSTS Cross Platform Agent on Linux.
Join the DZone community and get the full member experience.Join For Free
if you installed linux agents for vsts vnext build in the past, you already know that it was a simple experience, especially because the agent was installed with npm , so it is a matter of a couple of commands.
the agent is undergoing a substantial change, and in github there is a project about vsts cross platform agent (coreclr) , a new version of the agent, entirely written in coreclr that will substitute the closed source windows agent and the actual xplat agent . this version of the agent is still work-in-progress, and we can expect a preview for osx and linux in the next month. until now, to run vnext build on linux, you should use the xplat agent .
installing the actual xpplat agent is really simple , just create a folder where you want to install the agent, open a bash in that folder and then issue the command:
curl -sksl http://aka.ms/xplatagent | bash
this will download an install script, and does everything for you: installing the prerequisite, downloading, and installing everything . at the end of the script you should only execute:
to start configuration of the agent. the official guide suggest you to use personal access token, but standard alternate credentials are fine, if the user is part of the agent pool administrators and agent pool service account.
once everything is configured, the agent is ready to run your builds .
figure 1: agents configured and running on linux centos machine
Published at DZone with permission of Ricci Gian Maria, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.