VSTS use on premise deployment agent - continuous-integration

I ran out of release/build minutes on VSTS, therefore I configured an on premise agent to run my builds. This is working fine, however I cannot select that agent to be used for deploying my releases.
I tried to follow the following tutorial, however it seems like it is a bit old:
http://vsts-deploy-guide.readthedocs.io/en/latest/
Does anyone have experience setting up on premise agents to do the deployment?

Refer to these steps:
Open release definition
Select Environments tab
Click Run on agent
Change Deployment queue in right panel.

Related

Team City Setup giving warning of no agent

I am trying to setup teamcity with Github repository.
After setting up projec, When I got "Paramater Tab", It asks some configuration parameter value. See in below screenshot.
For Now I am not giving any value and click on "Run" button on top right corner.
Then it gives some warning.
Warning: No enabled compatible agents for this build configuration.
Please register a build agent or tweak build configuration requirements.
What is the problem? How can I make it run?
It looks like your agent doesn't have Nuget installed, but your build configuration requires it.
To install Nuget on the build agent:
In TeamCity, go to Administration (top right of any page).
Go to Tools in the menu down the left hand side of that page.
You should now see a list of available tools.
Scroll down the list until you find Nuget.exe in the list.
You may already have multiple versions installed in which case you probably just need to click Make Default on one of them.
I you have no Nuget versions installed then click the Install Version button and pick the version you want to install.
This will distribute the Nuget tool to all build agents that can run it and it should resolve your error.
Please see this TeamCity documentation link for more information.
For TeamCity to run, you have to have TeamCity installed, the tooling configured (as the previous answer suggested you were missing NuGet) but you also need to install and configure build agents that can actually run the build. By default, the TeamCity instance does not install any build agents, you have to install and configure those yourself.
Seems that the agent wasn't up, try the following:
cd /home/admin/TeamCity/buildAgent_latest/bin
sudo ./agent.sh start
This solution worked for me.
C:\TeamCity\buildAgent\bin>agent.bat start
Looked on Teamcity help as well but did not answer the question properly. This was simple and after starting the agent from teamcity folder location the project got up and running. Thank you.

TeamCity JMeter plugin not showing remote monitoring

I've followed this guide to have my TeamCity build running some JMeter tests, but I'm not seeing the "RemotePerfMon" tab for the server statistics. I have the "Performance Statistics" tab, and I can see that the statistics are definitely being collected, as there is a monitoring.csv file being created and populated in the build agent's work directory.
Any ideas on how I can get the tab to display?
I'm using TeamCity v9.1.6 with JMeter plugin version 83, everything running on Windows 8.
Additional Info:
I've found that there is an open issue on Github for this problem, so I'm obviously not the only one facing this issue.
Make sure TeamCity is NOT running as Administrator
After quite a while playing around with it, I discovered that the problem was that both the TeamCity Server and the TeamCity build agent were running on the same machine, but the Build agent was running as Administrator. Stopping both the services and restarting them as a regular user fixed the issue.
I believe the root of the issue was that the monitoring.csv file was created by the Build Agent as Administrator, then wen the non-admin server agent attempted to parse it, it failed. This error doesn't seem to get logged anywhere, and TeamCity responds to the error by simply not displaying the tab.

Nuget and Teamcity Agent not allowed to run this configuration

I came across an interesting issue. I want to build nuget packages with Teamcity. I did set up the configuration which is really straight forward (Good job JetBrains!)
However I am not able to run it on one of our build agents.
The agent does pass the agent requirements for the configuration, but next to it's name the following is shown: not allowed to run this configuration
My question: Why?
On the agent configuration parameters page I have Nuget as possible configurations:
teamcity.tool.NuGet.CommandLine.2.8.2.nupkg D:\BuildAgent\tools\NuGet.CommandLine.2.8.2.nupkg
teamcity.tool.NuGet.CommandLine.DEFAULT.nupkg D:\BuildAgent\tools\NuGet.CommandLine.DEFAULT.nupkg
We have a second build agent which is able to run Nuget Packager configuration.
The main difference between this two machines is that one is a Windows 8, version 6.2 machine (not allowed to run this configuration) and the other one is a Windows 7, version 6.1 (allowed run this configuration)
We are running:
TeamCity Enterprise 8.0.5 (build 27692)
Any hints and help will be greatly appreciated!
Thank you!
Most likely the agent is configured to run only explicitly assigned configurations.
Plesase, check the Agents -> -> "Compatible configurations" tab.
There is a combo box with options "Run all compatible" / "Run assined .. ". Make sure "Run all compatible" is selected
You may not always be in a position to Run all compatible, In that case you can go to Agents--> Particular agent --> comaptible configurations --> Assign configurations --> Search and select the specific Job or build.

AppOffline rule issue w/ Continuous Integration/Build

I've connected Visual Studio Team Services to an Azure Website to enable automatic deployments. New Relic is running as a system process and therefore NewRelic.Agent.Core.dll is locked which prevents successful builds from being deployed.
I've tried adding a wpp.targets file to the solution in order to utilize MSDeploy to copy an app_offline document to the site before deployment, then delete it when deployment is done like seen here. However, it doesn't seem as if it is executing. I don't see anything in the build logs and my deployments continue to fail.
How do I take the app offline when using the VS Team Services/Azure CI process?
I came across this old post and there are now build tasks to start and stop an app service. See the Azure App Service Manage under the deployment tasks in the build task catalog.
Slightly different to what you are asking but what you could do is to login to your Azure website and set COR_ENABLE_PROFILING to 0 before your build runs. You then deploy as normal. Once done you set COR_ENABLE_PROFILING back to 1.
The act of changing the setting will cause an IIS reset and setting it to zero will disable the file from being locked again before the publish finishes.
Source: https://discuss.newrelic.com/t/visual-studio-online-azure-website-continuous-integration-fails/3825

TeamCity forcing "checking for changes" only on agent

I have the following set-up:
TeamCity server running on one machine
TeamCity agent on a separate machine, connected via VPN to source control (TFS).
The VPN is a bit tricky to set up to run as a service so can't/don't want to set it up on the server as well. Rather, I was hoping to have everything go through that agent.
The build server fails while collecting sources, it appears it's trying to figure out what changes were performed in TFS (but it can't find the TFS host since it's not on that VPN). The build is set to check out the sources only on the agent.
I'm afraid the answer is obvious, but couldn't find any documentation confirming this...Is it possible to have such a setup? Or does the build server need access to the TFS repo to check for changes and trigger builds?
The TeamCity server will still require access to the VCS root to evaluate the current revision and changeset details.
It's important to note the additional side-effects of agent side checkout as well. See VCS Checkout Mode in the TeamCity docs for more information (note the 2nd line).

Resources