Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (2024)

Introduction:

Azure Pipelines provides a powerful and flexible platform for continuous integration and deployment. While Microsoft offers hosted agents for executing pipeline tasks, there are scenarios where a self-hosted agent becomes necessary. In this blog post, we will walk you through the process of creating a self-hosted agent for Azure Pipelines, empowering you with the ability to run your pipelines on your own infrastructure. Let's dive in!

Prerequisites:

Before we get started, ensure that you have the following prerequisites in place:

  1. An Azure DevOps account.
  2. Access to the machine that will serve as your self-hosted agent.
  3. Administrator privileges on the machine.

Step 1: Install the Azure Pipelines Agent

To begin, we need to install the Azure Pipelines agent on the machine that will act as the self-hosted agent. Here's how you can do it:

  1. Open your web browser and log in to your Azure DevOps account.
  2. Navigate to your Azure DevOps project and click onProject settingsin the left side of the page.
  3. Click onAgent Poolsunder Pipelines and click onAdd pool (e.g. Demo-SH)

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (1)

  1. SelectPool-typeasSelf-hosted, give it a name and click onCreate. You can grant access to all pipelines if you want that other team members want to run their build/release pipeline’s job on this agent.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (2)

  1. Click on the created agent.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (3)

  1. Click onNew agent. It will show the below screen. We just have to follow the steps to create the agent. Click on theDownloadbutton to download the agent.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (4)

Step 2: Configure the Self-Hosted Agent

Once the agent package is downloaded, we need to configure it to connect with your Azure DevOps account:

  1. Create a agent directory and extract the downloaded agent package to a directory on your machine as shown in above screenshot . I have extracted the files in the below directory.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (5)

  1. Open a terminal or command prompt and navigate to the extracted agent directory. Make sure to run the terminal or command prompt as Administrator.
  2. Run the configuration script by executing the following command:
  • On Windows:“config.cmd”
  • On Linux or macOS:“./config.sh”
  1. The configuration script will prompt you for your Azure DevOps account URL and a personal access token (PAT).
  • To generate a PAT, go to your Azure DevOps account, click on the small icon on the left side of your profile picture in the top-right corner, and selectPersonal access tokensfrom the dropdown menu.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (6)

  • Generate a new token with appropriate permissions for the agent.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (7)

  • After clicking theCreatebutton, you will come to other screen where the PAT token will be shown. You just have to copy that. Remember that the token will be shown only once.
  1. After generating the token above, enter the details on the command prompt.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (8)

  1. After entering the PAT, it will ask to enter the name of agent pool. Enter the name of the pool, which we have created above.
  2. Now, it will ask for agent name and few more details.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (9)

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (10)

  1. I have given the permission to run the agent as a service in my machine. I can go toServicesand see that.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (11)

  1. After completing the configuration, the agent will register itself with the specified agent pool in Azure DevOps. Now, if you go back to your agent, you will see one agent.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (12)

Step 3: Use the Self-Hosted Agent in Pipelines

Now that the self-hosted agent is up and running, you can start leveraging it in your Azure Pipelines:

  1. Open your Azure DevOps project and navigate to your pipeline.
  2. Edit your pipeline configuration or create a new one.
  3. If you click on the stage, and then click onAgent job.In theAgent selectiondropdown, you will get your self-hosted agent as an option. Just select that.

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (13)

  1. When you run the pipeline, Azure Pipelines will allocate a job to the self-hosted agent and execute the defined tasks on the configured machine.

Conclusion:

Congratulations! You have successfully created and configured a self-hosted agent for Azure Pipelines. By following these steps, you can harness the power of your own infrastructure to execute pipeline tasks, ensuring greater control and flexibility in your continuous integration and deployment workflows. Explore the possibilities and take your Azure Pipelines to the next level with self-hosted agents. Happy coding!

Setup Azure DevOps Self Hosted Agent On-Premise & Troubleshooting Guidelines - Part 2 (2024)
Top Articles
3 tips can help you save if you're living paycheck to paycheck, personal finance expert Suze Orman says
Delinquent Payment Impact on Credit Score
Navicent Human Resources Phone Number
Tattoo Shops Lansing Il
Katmoie
Federal Fusion 308 165 Grain Ballistics Chart
Air Canada bullish about its prospects as recovery gains steam
Martha's Vineyard Ferry Schedules 2024
How Much Is 10000 Nickels
Pickswise the Free Sports Handicapping Service 2023
Mustangps.instructure
Costco in Hawthorne (14501 Hindry Ave)
Fcs Teamehub
MADRID BALANZA, MªJ., y VIZCAÍNO SÁNCHEZ, J., 2008, "Collares de época bizantina procedentes de la necrópolis oriental de Carthago Spartaria", Verdolay, nº10, p.173-196.
Rls Elizabeth Nj
Catsweb Tx State
The Rise of Breckie Hill: How She Became a Social Media Star | Entertainment
OSRS Dryness Calculator - GEGCalculators
How do you like playing as an antagonist? - Goonstation Forums
Craigslist Pets Athens Ohio
Vanessa West Tripod Jeffrey Dahmer
Dallas Cowboys On Sirius Xm Radio
Tnt Forum Activeboard
Urban Airship Expands its Mobile Platform to Transform Customer Communications
Van Buren County Arrests.org
VERHUURD: Barentszstraat 12 in 'S-Gravenhage 2518 XG: Woonhuis.
Sea To Dallas Google Flights
Tips on How to Make Dutch Friends & Cultural Norms
Craigslist Lewes Delaware
Highmark Wholecare Otc Store
How To Tighten Lug Nuts Properly (Torque Specs) | TireGrades
Delectable Birthday Dyes
Soul Eater Resonance Wavelength Tier List
Ascensionpress Com Login
Yale College Confidential 2027
Ups Drop Off Newton Ks
Puffin Asmr Leak
Blush Bootcamp Olathe
Baddies Only .Tv
PA lawmakers push to restore Medicaid dental benefits for adults
Wattengel Funeral Home Meadow Drive
Ticket To Paradise Showtimes Near Marshall 6 Theatre
9 oplossingen voor het laptoptouchpad dat niet werkt in Windows - TWCB (NL)
O'reilly's El Dorado Kansas
Sallisaw Bin Store
Iman Fashion Clearance
Streameast Io Soccer
Cara Corcione Obituary
Freightliner Cascadia Clutch Replacement Cost
Estes4Me Payroll
Laurel Hubbard’s Olympic dream dies under the world’s gaze
Latest Posts
Article information

Author: Jerrold Considine

Last Updated:

Views: 6708

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Jerrold Considine

Birthday: 1993-11-03

Address: Suite 447 3463 Marybelle Circles, New Marlin, AL 20765

Phone: +5816749283868

Job: Sales Executive

Hobby: Air sports, Sand art, Electronics, LARPing, Baseball, Book restoration, Puzzles

Introduction: My name is Jerrold Considine, I am a combative, cheerful, encouraging, happy, enthusiastic, funny, kind person who loves writing and wants to share my knowledge and understanding with you.