Table of contents
π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:
π Checkout GitHub Repository for projects:
π github.com/sumanprasad007
π Check out my YouTube channel - Prasad Suman Mohan:
###