0

I am trying to set up a deployment agent on a server.

The process is failing with the message "No agent pool found with identifier 61".

Looking at the logs I can see the following

    INFO DeploymentGroupAgentConfigProvider] Found deployment group Web Servers with id 23
    INFO DeploymentGroupAgentConfigProvider] PoolId for deployment group 'Web Servers' is '61'.

This would suggest the server is connecting as it can find the deployment group id but not that of the pool.

This ties in with the fact that although I can see the relevant Deployment Group in DevOps, I cannot see the corresponding Deployment Pool.

My account is registered as a collection administrator which I would have thought would be enough to give me visibility of everything.

Also a colleague, who is also a collection administrator, CAN see the Deployment Pools which I can't.

Anyone got any idea why that might be?

When Googling for help on Deployment Groups and Pools, I found loads of information about Build Agents but not Deployment Agents and Pools.

Does anyone have a definitive resource for giving guidance on Deployment Groups and Pools, how they relate, how they differ and how they are administered?

Thanks

kevins1966
  • 366
  • 2
  • 4
  • 19

2 Answers2

0

Link to the Deployment group documentation.

Deployment group is basically a specialized agent pool, only usable with classic release definitions, and provide some extra functionality, like which deployment group agent to use in which stage. You can't use them with multistage yaml-pipelines, which is good to keep in mind.

Not sure how you are installing and configuring you agent as you are not seeing the actual deployment groups, but there is a specific switches in the agent installation command for deployment groups:

.\config.cmd --deploymentpool --deploymentpoolname "WebAppDemo-deployment-group-1" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://dev.azure.com/myorg/

Which might explain your errors. When creating a new deployment group, it inherits some groups from the azdo project, so maybe check if you are part of those: Contributors, Deployment Group Adminstrators, Project Administrators, Release Adminstrators. Can't remember how the agent configuration authenticates if you are not using a PAT-token, but I'd guess that you basically can't authenticate in the agent config with those deployment group switches unless you rights to that group, or someone who has the rights have created a PAT-token for you.

If you do get rights to the deployment group, you can find an autogenerated installation script for agents there. I never got it to work out of the box back in the days (*, but you can at least copy the config command from there and run it manually.

*) When Azure DevOps Server was launched, haven't really used deployment groups in three years, so my info might be a bit outdated.

JukkaK
  • 1,105
  • 5
  • 15
0

@JakkaK

Thanks for the response.

I have seen the Deployment group documentation page you referenced however I believe we have taken everything on that into account so I was looking for alternatives to get other view points.

In terms of security I have added myself to

  • Contributors
  • Deployment Group Adminstrators
  • Project Administrators
  • Release Adminstrators

The agent installation command/switch combo I used was

.\config.cmd --gituseschannel --deploymentgroup --deploymentgroupname "My Deployment Group" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://MyOrg.co.uk/tfs/' --collectionname 'MyCollection' --projectname 'My Project';

I tried the agent installation command/switch combo suggested and got the message

Access denied. <<User>> needs Manage permissions for pool "My Deployment Pool" to perform the action. For more information, contact the Azure DevOps Server administrator.

Given that I am in all the Security Groups listed about this makes no sense.

One thing I have noticed is that, when creating a Development Group the Development Pool name defaults to "Project Name-Development Group Name".

The Project portion of the Deployment Pool I am trying to connect to indicates to me that the Project Name has been altered since the Deployment Group was created.

ie

  • The project is called "BBB Project Name"
  • The Deployment Pool which, as I have stated above appears to be set by a default format, is called "AAA BBB Project Name-Development Group Name".

i.e. the project looks like it has been renamed from "AAA BBB Project Name" to "BBB Project Name".

You'd like to think that relationships were by identifiers rahter then names but I'm wondering if that would cause this issue.

kevins1966
  • 366
  • 2
  • 4
  • 19
  • Can you see the deployment groups, or the group you are trying to register the agent into, with those priviledges? If you are not using a PAT token, you probably need to see the groups. I'm also wondering why the registration targets "My Deployment Group", but error message says "My Deployment Pool" - while I think that the name for deployment groups was deployment pools at some point, I don't think there is a separate agent pool for the deployment group - at least azdo api lists deployment groups and agent pools separately with the corresponding API calls. – JukkaK Feb 15 '23 at 06:58
  • However, as the error message states insufficent priviledges for a pool, I would suggest going to see what priviledges for the deployment pools you have at the organizational level (front page -> organization settings -> deployment pools -> correct pool -> security). At least with agent pools, in order to be able to register a new agent, you'll have to add yourself as an admin on the organization level, the project level is insufficent. So something along these lines: https://developercommunity.visualstudio.com/t/access-denied-user-needs-manage-permissions-for-po/924818 – JukkaK Feb 15 '23 at 07:05
  • Funny that they have the deployment pools in org settings, and deployment groups on project level - this explains a lot, I though that deployment pools are not really a thing any more. Turns out they are. Digging on that, I found this earlier stack overflow post that references an undocumented api for those: https://stackoverflow.com/questions/64393809/how-to-work-with-azure-devops-deployment-pools-via-rest-api – JukkaK Feb 15 '23 at 07:11