Azure virtual machine for azure pipeline

Whoever Wherever 0 Reputation points
2023-11-23T19:49:35.3533333+00:00

Hi All,

sorry i am beginner in this field so excuse my anger from microsoft.

My expectations:

I want to create pipeline build on azure git. But for this i need docker which has installed all needed SW. So i have created container register and instance on azure devops and pushed the built image. Next step was to create agent pool for this. So i have created Virtual machine scale set and virtual machine. I have installed docker in virtual machine and tried to add agent pool into azure git. And here it starts.

When i have added this pool my original virtual machine disappeared and two new appears. Now i ma not able to connect to any of them and also i dont see any agents in azure git. Fascinating is also that in settings of those virtual machines is info that it is not accessible through port 22. Nice, isnt it?

So please, what have i to do to be able to simple build something in azure pipeline in docker? I am loosing my nerves.

Thanks

Community Center | Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. Adam Zachary 2,936 Reputation points
    2023-11-23T21:12:28.2733333+00:00

    Hi,

    1. Set Up a Self-Hosted Agent: Choose between a Microsoft-hosted or self-hosted agent. If a self-hosted agent is required, download and install it on your VM​​.
    2. Configure Agent Permissions: Ensure the user configuring the agent has pool admin permissions and restrict access to the agent's folders​​.
    3. Download and Configure the Agent: Download the agent from Azure DevOps, unpack it in a directory like C:\agents, and run config.cmd for configuration​​.
    4. Run the Agent: Decide if the agent will run in interactive or service mode. For interactive, use .\\run.cmd to start; for service mode, it starts automatically​​​​.
    5. Use Docker in Azure Pipelines: For Docker tasks, use the Docker@2 task in your pipeline YAML to build or push images, and control containers​​.
    6. Replace or Reconfigure Agent: To replace an agent, re-download, and configure using the same name as the existing agent. Remove the old agent to avoid conflicts​​​​.

    Please review the following Microsoft Documentation links

    https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/windows-agent?view=azure-devops

    https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/docker-v2?view=azure-pipelines&tabs=yaml

    Kindly if you find the provided information helpful and it resolves your query, please consider accepting the answer. Your feedback is valuable and helps ensure the quality and relevance of the responses.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.