TFS 2017 update Agent pool V 1 to V2.x - tfs

I am trying to update the build agent (TFS 2017) from V1.x to V2.x what i tries are:
I followed these steps 'https://learn.microsoft.com/en-us/vsts/pipelines/agents/v2-windows?view=vsts' but the issue is my url is http not https.
1) is there any easy way to update the build agent instead above link because setting https getting connectivity/cert issues.
Do i have only PAT is the only option? any thing else apart from PAT to update the build agent. i even tries 'update all' nothing happens and no errors.
any help would be great-full. Thanks.

No matter you are using http or https, you could both update build agents properly. If directly entire the url in the browser could not reach the right page.
You could also try to navigate to http://yourserver:8080/tfs/DefaultCollection/_projects page and clcick the configuration button, select the Agent Pools in the drop down list.
Back to the original requirement, according to Daniel Steiner there are 2 kinds of agents:
Windows specific agents (version 1.x)
cross platform agents (version 2.x)
In TFS 2017 the Windows specific agents (version 1.x) are deprecated. Thus they won't be updated from the agent queues admin area. So you have to download the agent from tfs (or github) and install it yourself. After initial installation/configuration the agent updates via tfs should work again. It would have been cool if they automated that process or at least said what to do in tfs.

Related

TFS Build Agent not accepting work

Using on-prem TFS 2017, I have added an additional agent to an existing pool. The agent is displayed in the pool/queue management pages, is enabled, and is in an idle state. The logs reflect a healthy agent that is listening for work, but the TFS controller won't designate work to it (as far as I can tel). I have tried disabling the other agent as well as stopping the other agent's service. In either situation, the build status states there are no available agents to perform work. I have other agents running in different pools that are all functioning properly, so I am not sure how to determine whats at fault: agent/agent configuration, queue/pool configuration, or the TFS controller it self.
I finally found the issue:
While MSBuild and all the relevant Microsoft SDK's required for my builds were installed and properly reflected in the agent's capabilities, Visual Studio was not installed on the new build server.
I was not able to determine why the agent(s) was rejected for insufficient capabilities; we were running TFS 2015 update 2, but after an update to TFS 2017, the agents are no longer dependent on Visual Studio being installed and work just fine running the same build definitions with the MSBuild step.

Upgrading my build agent to .Net 4.6.1 did not work

So, I tried to upgrade my TFS 2015 to allow project with .NET 4.6.1.
I downloaded the Targeting Pack for .NET 4.6.1, ran it, restarted the server, ran my build configuration for the build agent by overwriting the old settings, and started my builds.
Now non of them will build :(
I think I miss setting a parameter somewhere.
This is my agent, which is registered, but never requested (for some odd reason):
Am I missing something?
According to your agent.version 1.95.3, seems you are using TFS2015 update3 which should definitely support .Net 4.6.1. And the system capabilities of your agent looks okay except the Number_OF_PROCESSOR. Your value is 1, but usually the default is 8. Did you manually change the value during the configure?
Recommend you follow below way to narrow down this issue:
First check in that if the build server is available and enabled in
TFS at https://YOURCOMPANYNAME:8080/tfs/_admin/_AgentQueue, and
your build agent should be “Green”.
Make sure the agent is in interactive mode.
Try to change a domain account which is a member of the Build
Agent Service Accounts group and belongs to "Agent Pool Service
Account" role, to see whether the agent would work or not.
Double check whether there are some Firewall interface block the
build, try to disable all related settings.
If it's still not work, delete that agent and re-deploy a new one following the detail steps in this article. You can also go through below similar questions to check if there is some useful info :
TFS 2015 On-premise issues
TFS 2015 build vNext - hangs with "Waiting for console output from
an agent..."
TFS 2015 Build agent won't start

How do I install prerequisites for TeamCity to connect to Team Foundation Server Version Control?

I've installed the prerequisite (Team Explorer 2013) to the best of my knowledge, but when I try to set up a VCS root to connect to our TFS Version Control server, I continue to get this error message:
"No TFS assemblies were found on the system. Please make sure you have
Microsoft Team Explorer installed. Supported versions: 2015 2013 2012
2010 2008 2005"
The Team Explorer I downloaded from Microsoft just seemed to be a plugin for Visual Studio, which doesn't make much sense as a server-side component. Anyway, I configured a connection to our TFS box within Team Explorer/Visual Studio on my TeamCity server.
So I have two questions that seem to be undocumented by JetBrains:
What does it mean to set up and configure Team Explorer? How can I validate that I have set up and configured Team Explorer on my TeamCity server correctly?
How does TeamCity know how to find the Team Explorer assemblies? Is there some sort of configuration I am supposed to do? Where is this documented?
I guess I'm looking for a true step-by-step set of instructions that make no assumptions about my understanding of TFS or Team Explorer, or any assumptions about what I may have already installed on my TeamCity box.
I've read the two articles on the JetBrains site regarding how to set this up, and they don't cover actually installing and configuring the prerequisites or configuring TeamCity to discover the Team Explorer assemblies it needs.
Team Explorer is the client software that you use to access Visual Studio Team Foundation Server functionality from Visual Studio. You can simply launch Team Explorer on your TeamCity server to create a team project and check in a project, to validate whether it is installed correctly.
I couldn't find any documentation that mentioned how does TeamCity find Team Explorer assemblies. But, based on my understanding, there is no configuration needed to detect Team Explorer. Please make sure your TeamCity server is running under Windows.
If the issue that can't find Team Explorer persists, you can install VS Premium instead of Team Explorer.
Setting up Jetbrains TeamCity for CI with Team Foundation Server:
Install Jetbrains TeamCity
If you are planning on using IIS or TFS on the same server, configure Jetbrains TeamCity to run on a port other than 80 or 8080
Once TeamCity is up and running, you can begin configuring your TeamCity installation for CI Builds.
Log into TeamCity with your user name and password
Create a new TeamCity Project
Create a new build configuration
You will now see a series of build configuration settings that you will have to complete presented in a Wizard-style navigation view.
Enter General Settings
Enter VCS Settings
After entering VCS Settings, Create and attach new VCS Root
Enter the relevant information for your TFS instance
Create a Build Step using Visual Studio as your build runner. You can create as many build steps as you need and specify the order of the steps (similar to a TFS Build Workflow).
For setting up Continuous Integration builds, you will need to specify a Build Trigger. CI Builds will generally use a VCS Trigger that is triggered on each source control check-in.
If you need to pass any parameters to your build, you can configure these in your Build Parameters.
That is all! You can then either run your Builds manually by clicking on the Run button in TeamCity or simply verify that your builds are triggered by the next check-in into TFS.

TFS 2015 off shore Build does not take files from proxy

I have some problems with our TFS 2015 Build in our off shore location.
We have our main TFS in Austria and an already working proxy (TFS 2013) in India.
I have created a TFS 2015 Buildagent which is also working but it is not able to gather the files from the proxy.
I have configured the build machine like it is stated on this Microsoft site:
https://msdn.microsoft.com/en-us/library/cc716770(v=vs.120).aspx
But it still downloads all the files from our TFS which takes up to 15 Minutes with a good connection.
The proxy was provided for older versions of TFS. One of the great features of the new build system is you can place the agent wherever your files are. Setup up the build agent where the files are instead of going through a proxy. You will still need to connect the build agent to the server but that may work better.

Upgrading TFS 2015 Build Agent

I would like to upload on my TFS 2015 some of the build tasks that are available here https://github.com/Microsoft/vso-agent-tasks.
I do have a problem with certain task as they do require a minimum agent version of 1.89.0. My build agents are 1.83.2 version.
Now, the question is, how do I update my agents for a given pool? If I do right click the agent pool on my TFS and choose update all agents option, nothing happens. I suppose because the latest version of my agent available on TFS is the 1.83.2.
Where can I find the latest version of it and how do I update it?
Note I'm working on premises TFS 2015 and not VSO.
Thanks
If you right-click the agent pool and choose "Update all agents", it will upgrade the agents to the version of the on-premise TFS server. For instance, if you initially installed some RC, and upgraded the server to RTM later, some agents might have lower version. Otherwise, as you mentioned, nothing will happen because all agents are up to date.
VSO has a different release model and updates/fixes to its agents are continuously delivered. That's why the version is constantly growing.
Technically it might be possible to grab the source code of the latest VSO agent tasks, and push it to the on-premise version of TFS 2015. However, it is considered an anti-pattern, and the behavior is undocumented and unsupported.
Let me quote build vNext developers from this discussion (see the bottom of the thread):
That is not a supported option. It is very likely that the agent we
have in VSO will not work with the on-prem server. You must use the
version of the agent that ships with your server.
And:
The behavior is undefined/untested. It may work, may not. The design
is for agents to get pulled forward via an auto update process
downloaded from your service. The auto update process may alter
configs/layout on disk, whatever. That future agent might call REST
apis that don't exist, etc... The primary focus for agents is on
forward compat so they can lazily get upgraded (via task minimum agent
demand, on restart or eventually a scheduled job).
Same answer as #Yan, but putting this here because the following error came from nowhere - so I think Microsoft updated the minimum requirements this week.
No agent found in pool Default which satisfies the specified demands:
msbuild
visualstudio
Agent.Version -gtVersion 1.95.0
For your own hosted agent just right click on the queue, or click the ... icon.
I had to restart the agent service after a few minutes as it didn't seem to want to by itself. Give it a chance to update properly before doing this.

Resources