Hiya folks, in this post, I will explain how easy you can create a deployment group and deploy a pipeline agent to an Azure (Windows) VM.
- An active Azure subscription (for the Azure VM deployment)
- An active Azure DevOps organization (check how to signup in this link)
- An active Personal Access Token (PAT)
How to deploy the pipeline agent to the VM
Step 1. Create the deployment group
From the left-hand side menu, select Pipelines – Deployment groups – Add a deployment group
Type a name for the Deployment group, i.e. “DevOpsDeploymentGroup”; press Create.
Step 2. Copy the registration script
The registration script is been generated automatically. Select Windows as the target to register, check the box (Use a personal access token in the script for authentication), and click the “Copy script to the clipboard” button to copy the PS script.
|Important: Open PowerShell CMD with elevated permissions|
After the registration script is executed, you will be able to see in the C: drive a new folder named “azagent”.
At the same time, a new Windows service has been created, i.e., Azure Pipelines Agent (devopspipelineagent.DevOpsPipelinA.).
On the Azure DevOps organization, in the Deployment groups section, you can see one online agent, which is your Azure Windows VM.