I have been preparing for my Techorama session on TFS vNext build. One of the demo’s I am planning is to use the Node based cross platform build agent to build something on a Linux VM. Turns out this takes a few undocumented steps to get this going with the CTP of TFS 2015
The process I followed was:
- I installed a Mint 17 VM
- On the VM, I installed the Node VSOAgent as detailed in the npm documentation (or I could have built it from from source from GitHub to get the bleeding edge version)
- I created a new agent instance
vsoagent-installer - I then tried to run the configuration, but hit a couple of issues
_ node vsoagent_
URL error
The first problem was I was told the URL I provided was invalid. I had tried the URL of my local TFS 2015 CTP VM
The issue is that the vsoagent was initially developed for VSO and is expecting a fully qualified URL. To get around this, as I was on a local test network, I just added an entry to my Linux OS’s local /etc/hosts file, so I could call
This URL was accepted
401 Permissions Error
Once the URL was accepted, the next problem was I got a 401 permission error.
Now the release notes make it clear that you have to enable alternate credentials on your VSO account, but this is not a option for on premises TFS.
The solution is easy though (at least for a trial system). In IIS Manager on your TFS server enable basic authentication for the TFS application, you are warned this is not secure as passwords are sent in clear text, so probably not something to do on a production system
Once this was set the configuration of the client worked and I had an vsoagent running on my Linux client.
I could then go into the web based TFS Build.vNext interface and create a new empty build, adding the build tool I required, in my case Ant, using an Ant script stored with my project code in my TFS based Git repo.
When I ran the build it errored, as expected, my Linux VM was missing all the build tools, but this was fixed by running apt-get on my Linux VM to install ant, ant-optional and the Java JDK. Obviously you need to install the tools you need.
So I have working demo, my Java application builds and resultant files dropped back into TFS. OK the configuration is not perfect at present, but from the GitHub site you can see the client is being rapidly iterated