We have multiple on-site build agents attached to our VSTS instance, and would like to implement monitor their availability. That is, not just that their services are running, but also that they can connect to VSTS, since we have had some issues with the proxy previously.
I have checked the VSTS API documentation, but I couldn't find a call that would return whether a particular agent is online. Basically what I would need to do is integrate the green/red indicator that's available in VSTS when you go to the agent pool management page. I don't want to do web scraping, and I know I could check the agent log (and that's what I have in mind as last resort), but it would be good to have a prettier solution.
Does anyone have any ideas? Is there an API I missed? Or can you talk to the agent directly and ask it whether it is currently connected to VSTS?
You can use this api to get the status of agent:
https://XXX.visualstudio.com/_apis/distributedtask/pools/[pool id]/agents
A related thread: TFS 2015 api remove agent from pool with powershell
Related
I am unable to find any documentation on wiki which details approach for SSH/RDP into the ADO agents. Will be good to know the approach for both BTL/ATL agents.
The Microsoft hosted agents? You don't. You can't. They are assigned when the pipeline is queued and immediately deprovisioned after the pipeline finishes running.
Your own on-premise/self-hosted agents? The same way you'd SSH/RDP into any other machine. If you're having trouble with that, that's something for you to discuss with your networking / infrastructure team.
If you are using a Microsoft hosted then you can not per the documentation. The agent is created on a one-time instance and then torn down as soon as the build is completed.
Microsoft-hosted agents do not offer:
The ability to remotely connect.
The ability to drop artifacts to a UNC file share.
The ability to join machines directly to your corporate network.
The ability to get bigger or more powerful build machines.
The ability to pre-load custom software. You can install software during a pipeline run, such as through tool installer tasks or in a
script.
Potential performance advantages that you might get by using self-hosted agents that might start and run builds faster.
The ability to run XAML builds.
If you are using a self-hosted machine running the agent, then you'd just SSH/RDP into the server like any other and check the work folder.
Forgive me for asking a stupid question. I am from IT Infrastructure background & have been asked to create CI/CD pipelines based on my recent learnings on DevOps.
We have couple of applications whose source code is currently in TFS 2013 & those apps are written in ASP.NET C# language. Now, requirement is to migrate the source code from TFS to Azure Repos (Azure DevOps services) & further create a CI/CD pipeline.
Now for demo purposes, customer is asking us to do the deployment (i.e. Release pipeline) on a test server which is a plain windows 2012 OS without any SQL & IIS for both of these applications. Is that possible & how could we achieve the results to confirm release pipeline is funcioning properly?
In my opinion, it wont work as there is no application infra/configuration done for those applications on that plain test server. I guess we actually need a ready dev/stage environment which is replica of production to do the testing of release pipeline for those applications. Am I correct?
Just need expert advise for confirmation so I communicate the same to customer.
Azure DevOps Pipelines use an agent to perform the deployments. You can run the agent entirely in the cloud when deploying to Azure resources. You can also install an agent locally. Follow this link and scroll down to read about self-hosted agents. This is how you can deploy to your test instance from the pipeline.
Now, what you deploy there may require additional software be installed. You say it's an application in C#. Cool. Now, what's it do? Is it a windows program? Then just having the server there, with an agent installed, is all you need. Is it a web program? Then, yeah, it's going to need an IIS (or whatever) instance available somewhere to deploy to. Is it a database program? Then, yeah, it's going to need a database instance to deploy to. There's nothing magical about having a VM or a machine somewhere. All the same rules have to apply. There has to be an OS, drives, memory, and yes, supporting services depending on the needs of the application.
However, using a local machine instead of a hosted one, that works fine. Just follow the instructions in the link above.
What is the best way to go about adding Status Checks from Azure DevOps in a self-hosted scenario using a private GitHub Enterprise instance (not accessible externally).
Presently our setup is self-hosted with the agent installed on our build servers. We have a custom hook that tells Azure Pipelines to start a build however we aren't sure the best way to deal with the status checks. It would be preferable to not have each build pipeline have to make custom REST calls for the status checks rather have some means to register the status check between systems.
Has anyone configured for this scenario before?
Thanks!
I have a Visual Studio (formally MSDN) Enterprise License.
My newly created Azure DevOps Service does not reflect this when looking at the self-hosted pipeline configuration under Project Settings > Pipelines > Retention and parallel jobs.
According the the (i) info button:
Visual Studio Enterprise subscribers get one self-hosted parallel job
as a subscriber benefit.
Anyone know how I can get my Enterprise Subscription to show through to Azure DevOps Services (formally VSTS)? It was pretty simple to do with TFS, but am drawing blanks on ADOS.
My user account for both my Enterprise account and ADOS are one and the same - I was rather hoping it would just show through - apparently that's not the case.
The best I found was this page - but it's only for TFS and explicitly warns that:
The requested page is not available for Azure DevOps Services. You have been redirected to the newest product version this page is available for.
My initial attempt at asking MS through their online chat "Concierge Service" was met with apathy and a suggestion I ask elsewhere...
Apparently patience is a virtue.
It took several days but eventually (or was it because I also raised this issue on the Azure Developer Community site?) it correctly shows my associated Enterprise Subscription.
Is there any way to find out utilization of build agents in VSTS (Visual Studio Team Services).
I have a feeling that agents are busy and builds are queuing for long time, so want to add one more agent. But to justify the cost to management I need to present some data, e.g. percentage of the time agent is busy doing builds, preferrably withing working hours.
Is there any such VSTS extension or tool to measure this and display?
See example how it's beautifully done in TeamCity:
https://confluence.jetbrains.com/display/TCD10/Viewing+Agents+Workload
There is no build agent utilization report or related API to generate it. I have submitted a UserVoice for this feature at website below, you can vote it:
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/17023195-add-a-report-of-build-agent-in-vsts-or-related-api
Including buying one or more hosted agents, you can also consider deploying your own on-premises build agents.
The closest thing that VSTS offers is to go to the Settings menu (the gear icon) and choose Agent pools. Once the page loads, choose Hosted from the menu on the left (assuming you are using Hosted agents). This will display each of your Hosted agents and their statuses, as well as a history of all requests, when they were queued, assigned, started, completed, duration, etc.