How to configure self-hosted(Custom) Linux Agent in Azure DevOps | How to setup Build Agent in Azure
Вставка
- Опубліковано 10 лют 2025
- www.coachdevop...
In Azure pipelines, there are two types of build agents:
Microsoft-hosted agents - This is a service totally managed by Microsoft and it's cleared on every execution of the pipeline (on each pipeline execution, you have a fresh new environment).
Self-hosted agents - This is a service that you can to set up and manage by yourself. This can be a custom virtual machine on Azure or a custom on-premise machine inside your infrastructure. In a self-hosted agent, you can install all the software you need for your builds, and this is persisted on every pipeline execution. A self-hosted agent can be on Windows, Linux, macOS, or in a Docker container.
Pre-requisites:
Microsoft account setup
Azure account and subscription setup
Create a VM(Ubuntu 18.0.4) in Azure Cloud
Create Personal Access Token in Azure DevOps
DevOps coach is the best. Amazing video, exactly what I needed.
thank you very much!!
Awesome explanation, concise and detailed at the same time, thank you!
Appreciate it! Glad it was helpful.
@@DevOpsCoachso helpful, specially now without the option to request for some free runs. Also, any suggestion on how to automatically start the vm with a run and then shut down when it's over?
well actually I got it, it is possible to use the task InvokeRESTAPI@1 to call the VM start and deallocate APIs. We need to run an agentless job for that, specifying 'pool: server' option 😉
Wow, this tutorial is incredible! It is worth every second.
Glad you think so!
Thanks a lot for this video, this gives more insights about configuring a SH server and uninstall the same,
Glad it helped
Very clear and enlightening video, my debt was how do I choose an agent pool different of "Azure Pipelines". Now it is clear for me. Thank You
Glad it was helpful!
Really great video. I was able to configure ec2 instance as an agent in Azure DevOps Pipeline
Glad it helped!
YOU ARE SO PRECIOUS, THIS VIDEO, HELPED ME A LOT, I LOVE YOU SO MUTCH DUDE! SERIOUSLY, I DON'T HAVE WORDS FOR THIS VIDEO! THANKS SO MUTCH!
Glad I could help!
Love from Nepal
Appreciate it..
Very Clear to understand and great video!!!
Thank you so much..
excellent video!
Thank you very much! glad you liked it!
Really NIce demo
Thank you so much
thank you so much, very nice
You are most welcome
thank you for this video!
You're so welcome!
This is very nice tutorial and hits cord exactly for us where we are struggling. Can we connect for more discussions? May be professional level?
Hi Gaurang, sure...anytime..please message me on whatsapp or email me. glad to know the video helped you.
Thanks
No problem, glad you liked the video
Thank you so much Sir
can you please create one public repo so that I can fork it and create a new pipeline for following up the lab
please check my play Azure Devops playlist --> ua-cam.com/play/PLJwvtUqYDmA7HZaLCTaLbHJsIEegzi51o.html
How can I have Hosted agent in another subscription and under VNET. I want to use same agent under different instance of Azure devops with different subscription?
I followed each step from this video but getting below error
The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
could you please help?
Thank you for reaching out…make sure the token has enough
Privileges
@@DevOpsCoach thanks, i gave token full access but still same issue is happening
After installing agent, how to exit the console without stopping the agent? I have ran it as a service, but if i exit the vm its going offline.
Execute now to run as a service..see below put & symbol
./runsvc.sh &
Can we use our Windows laptop/PC as a self hosted agent?
Yes you can
Can I have script for running agent as service in ubuntu machine?
yes, absolutely.
Can you paste here?
@@techdev5348 I don’t have it handy. Feel free to create one
Sir, how we can run it in aks 1.23 ? There by default cluster running on containerd. I am getting no docker.sock file when I trigger docker command in azure pipeline. Please help
Did you install docker on the agent?
umm docker.sock error was a permission issue iirc or yeah as he said use the proper task
Hey amazing video thanks for this but had one doubt....
How can I extract the pipeline status for each stage or task in Azure DevOps and forward each pipeline stage status to Google Chat Hangouts by implementing this in a pipeline script.?
Each status of Azure Pipeline should be send to Google Hangout - like if it succeed at stage 1 than it should go stage 1 succeed >> similiarly if it fails stage 2 than it should go stage 2 failed or whatever the message would be
dev.to/ib1/azure-devops-integration-with-google-hangouts-chat-3imn
i have My own Server Can this steps work for that ....
Yes you can. As long as you have token created from azure devops
@@DevOpsCoach okkay
@@DevOpsCoach with this steps i was able to access my own hosted premises based server to our azure environment
I m getting error while verified pat and server url
try again, look at video for help
Hi DevopsCoach,
I have installed the agent but it is showing offline when leaving it or awhile and have to run ./runsvc.sh & again to bring it back up - what am i doing wrong here? just wanted to have it always running when the azure vm is powered on
thanks in advance
thank you for trying this lab, please review the steps once again. you can also try by creating a new VM and set up the agent