Setting Up Azure DevOps Agents on Windows ✨

Setting Up Azure DevOps Agents on Windows ✨

πŸ“Introduction:

Azure DevOps is a powerful platform for managing and automating software development processes. To effectively utilize its features, it is essential to set up agent pools that enable the execution of pipelines and jobs. In this blog post, we will guide you through the process of setting up an agent pool on a Windows and resolving the common error message "No hosted parallelism has been purchased or granted." Let's get started! πŸš€

πŸ”„ Step 1: Setting up Agent Pool on Windows πŸ–₯️

πŸ”Ή Log in to Azure DevOps and navigate to your project.

πŸ”Ή Go to Settings, then Agent Pools.

πŸ”Ή Select the default agent pool and click on the "Get the agent" button.

πŸ”„ Step 2: Downloading and Configuring the Agent πŸ’Ύ

πŸ”Ή Download the agent file onto your Windows machine.

πŸ”Ή Open PowerShell with administrative access.

πŸ”Ή Navigate to a suitable location where you want to set up the agent by running the following command:

cd ../..

πŸ”Ή Create a new directory for the agent and navigate into it:

mkdir agent_new ; cd agent_new

πŸ”Ή Extract the agent files from the downloaded ZIP archive using the following PowerShell command:

Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$HOME\Downloads\vsts-agent-win-x64-3.220.5.zip", "$PWD")

Note: Adjust the ZIP file name and version number according to the agent you downloaded

πŸ”„ Step 3: Configuring and Running the Agent βš™οΈ

πŸ”Ή In the same PowerShell session, run the configuration script:

.\config.cmd

πŸ”Ή Follow the instructions provided by the configuration script to set up the agent. Enter the URL of your Azure DevOps server, select the agent pool, and provide a unique agent name when prompted.

πŸ”Ή Once the configuration is complete, run the following command to start the agent:

.\run.cmd

πŸ”„ Alternative Method: If you prefer a simpler approach, you can use the following steps:

πŸ”Ή Download the agent file and extract it to a suitable location on your Windows.

πŸ”Ή Open PowerShell with administrative access and navigate to the agent's directory.

πŸ”Ή Run the following commands:

arduinoCopy code.\config.cmd
.\run.cmd

πŸ”„ Verification:

After the agent is successfully running, it will be listening for jobs from Azure DevOps. You can confirm its status by checking the agent pool in Azure DevOps, where the agent should appear online. βœ”οΈ

πŸ“ Conclusion:

By following the steps outlined in this blog post, you have learned how to set up an agent pool on a Windows in Azure DevOps. Additionally, we have resolved the common error message related to parallelism grants. Now you can confidently execute your pipelines using the default agent without encountering the mentioned errors. Thank you for reading this blog post, and we hope it has been valuable in helping you set up your Azure DevOps environment! βœ…πŸ™Œ

πŸ” Thumbnail Image credits:

https://zoomspeaks.tech/assets/images/posts/2021/2021-05-04-configuring-azure-devops-vmss-agent-pool.png

πŸ” Checkout GitHub Repository for projects:

πŸ”— github.com/sumanprasad007

πŸ” Check out my YouTube channel - Prasad Suman Mohan:

###

Did you find this article valuable?

Support Prasad Suman Mohan by becoming a sponsor. Any amount is appreciated!

Β