Azure Devops (VSTS) Different between Agent Pool and Deployment pool - azure

I'm in the process of setting out Azure Devops for our organisation and although I have got things working to an extent, I still dont understand a couple of concepts that I think I should.
I have set up a Deployment Pool (Organization settings > Deployment Pools) and used the script to install and configure the Agents on my Dev, Test and Prod servers, and have been successfully able to deploy code to them
I have been able to build my projects using the Azure Hosted option for now, but I would really like to use the locally hosted option, but when looking at the Agent Pools(Organization settings > Agent Pools) I can only see my Production server and it wont let me use that build with. I clicked the button to "Download Agent" but it downloads the agent I already set up in the Deployment Pool stage using the same powershell command .config.cmd command
So as far as I can tell, there is no difference between an agent in an "Agent pool" vs a "Deployment pool", but I'm obviously missing something here as I cannot see the agent in the Agent pool.
Can anyone help me to understand what I might have missed, and why there are two totally different ways of downloading the same agent?
Many thanks!

Deployment pool are for deployment groups are a special agent configuration that are used specifically in release pipelines. They give some additional options for your release pipelines beyond the regular agents.
Deployment groups:
Specify the security context and runtime targets for the agents. As you create a deployment group, you add users and give them appropriate permissions to administer, manage, view, and use the group.
Let you view live logs for each server as a deployment takes place, and download logs for all servers to track your deployments down to individual machines.
Enable you to use machine tags to limit deployment to specific sets of target servers
It leverages the same pipeline agent but you are just specifying different configuration for the initialization. If you navigate to the Agent Pool page, there is a download link there with the configuration for setting up an agent that you can leverage in a build pipeline or in a release pipeline when you use an Agent Phase instead of a Deployment Group phase.

Related

Azure Deployment Pools vs Agent Pools

I am confused by the difference between deployment group and agent pool.
I understand that Agent poolsarefor building and releasing artifacts in the pipeline.
I assumed Deployment group is for receiving app deployments. They are the target machines of a deployment. Therefore they might have a different agent software.
But this doc says "Every target machine in the deployment group requires an installed build and release agent". Does that mean build and release agent is not just for building & releasing also for accepting deployments?
[MS/Docs/Provisioning Deployment Groups]
Does that mean build and release agent is not just for building & releasing also for accepting deployments?
Yes, you are correct. The agents installed in agent pool and deployment group can be used for building and accepting deployments.
For example, if you only have one server machine you are going to deploy to. You can actually using private agent pool( installing a self-hosted agent on the server machine). You can build and deploy your app using this self-hosted agent in the agent pool. But if you have multiple server machines you need to deploy to. You'd better use deployment groups.
As below is described in the document:
A deployment group is a logical set of deployment target machines that have agents installed on each one. Deployment groups represent the physical environments; for example, "Dev", "Test", "UAT", and "Production". In effect, a deployment group is just another grouping of agents, much like an agent pool.
The main difference of Deployment groups and Agent Pools is where they can be used in the azure pipeline.
Deployment groups can only be used in the Deployment group job in Classic release pipelines. See below screenshot.
Agent pools are available in both the release pipelines and build pipelines, but can only be used in normal agent job(not Deployment group job). See above screenshot.

Azure Devops deployment group auto-configure script fails on Azure VM unable to access: vstsagentpackage.azureedge.net

I need to push a DevOps website from azure to IIS on Amazon or Microsoft (or locally).
When I run the script in the Azure VM, I get the error the domain vstsagentpackage.azureedge.net isn't accessible. I assume this is for advanced internal azure networking reasons.
What is the most appropriate way to publish one DevOps site into one IIS Web(app) site while others are running and perhaps managed by others? I'm currently using this approach.
I'm not sure if you have permission to, but if you do, I'd recommend setting up a deployment group or agent (deployment group for classic pipelines, agent for YAML) on the Windows Server hosting the site.
Once you set up a deployment group/agent, you'll want to configure your release pipeline to be set to use the newly registered agent or deployment group within your pipeline.
If you're using a classic (UI) pipeline, you'll want to add a new Deployment Group Job by clicking the ellipsis to the right of your stage name:
After you've added the deployment group job, you'll want to select the deployment group you've just added:
With that configured, you'll be running your pipeline on the IIS server you're deploying to, and you'll just need to add the IISWebAppDeployemntOnMachineGroup#0 task to your release pipeline and point to the site you're deploying to:

Azure DevOps - Deploy Web application to IIS

Requirement: I am trying to deploy a website in IIS and within the same website in IIS, I am trying to add an application running under the same website. Something as shown in the below screenshot:
I have added a deployment group and a registered a dev server in the group.
I have already created a Release Pipeline and configured the job and task for the IIS deployment.
My website in the IIS now gets configured after I build and deploy it via the release pipeline.
So in order yo achieve my requirement, I need to now add an "Application" in IIS under the same website. So in order to achieve this, I have created a new Release Pipeline and tried configuring jobs and task, but i am not able to see/select any deployment group from the "Deployment group job". Please review screenshot below:
Can anyone suggest how can I see the deployment group for my new release pipeline?
Also, please do suggest if there are any other possible solutions to achieve my requirement.
The issue is resolved there was some security issue that was not allowing me to view/select the deployment group.
It has been resolved.

Azure CI/CD pipeline for Angular 8 APP using Azure Deployment Groups

I have “.Net Core Web Api” and “Angular 8” projects. I am manually deploying these two application on Azure Virtual Machine.
Now I want to use Azure CI/CD pipeline process and deployed above application on IIS present on above Azure Virtual Machine.
Can I achieve above tasks by using Azure Deployment Groups? I am not able to find proper solutions on internet.
Any help will be really appreciated.
I have this link: https://learn.microsoft.com/en-us/azure/devops/pipelines/apps/cd/deploy-webdeploy-iis-deploygroups?view=azure-devops but no use.
Can I achieve above tasks by using Azure Deployment Groups?
Of course sure. Azure virtual machine just the VM which hosted by Azure, there's no more difference with the normal VM.
To deploy application to Azure VMs through IIS tasks and azure devops deployment group, you must pay attention to below 2 prerequisites:
1) As normal, VM is a separated machine. In order to combine them into Azure Devops and use them with CI/CD, to be precise, let the Deployment group manage to these virtual machine, you need to run script to register these VMs to VSTS deployment group.
2) Also, to deploy application to VMs via IIS, you need also ensure that these VMs web servers configured with IIS.
Above 2 is what mentioned in the doc you shared.
Our lab published a blog which describe the very detailed steps on how to Deploying to Azure VM using Deployment Groups. You can follow it to continue your configuration in VSTS pipeline.
Since it is very detailed, I would only point some key to you:
1 To configure Deployment Group agent on each of the virtual machines, firstly, please use Azure Resource Group Deployment task with Configure virtual machine deployment options action and enable prerequisites as Configure with Deployment Group agent:
2 For the configuration of IIS manage and deploy task, including physical path and etc, you can follow this(just ignore its task of start) to finish your configuration.
Note:
Here you must add 2 phases since Azure Resource Group Deployment task need run with agent job, and IIS web app manage/deploy task run with deployment group job
These are the basic steps which could help you achieve what you want.

Azure Devops Releases Agent job's Agent configuration show 'Default (No agents)'

I'm using Azure DevOps pipelines and for 'builds' I can define 'Hosted Ubuntu' agent (in my pipelines.yml file). But for 'releases' there's no way to edit yaml just the UI. The agent pool drop down list shows 'Default (no agents)'. I assume my problem is probably related to project permissions but haven't figured out what controls the visibility. On another account I see all the hosted agent options available.
For the possible security permissions issue
Check that you are part of the group(s) assigned as User to the security of the app pool in question.
If this security operates like other Allow, Deny, NotSet permissions, then your occupation in a group that has less than User permission will revoke that permission, but I haven't seen any documentation about this.
For the use of YAML in release pipelines
Yaml usage in the formal release pipeline hub is not supported. If you want to use yaml for your CD release, you're going to need to enable the new multi-stage pipelines experience.
This allows you to create stages in your .yml file that relate to deployment functions in addition to the classic build functions.
I believe this removes your release tracking from the release hub and integrates it directly into the build hub.
This is still a new concept for Azure DevOps, as is the documentation and writing about it. I found this article to be helpful.
Because this new feature seems to be centered around AKS (or other Kubernetes services) and Docker, I'm not sure if this will help you by allowing you to specify the host in yaml, but you mentioned "release" and "yaml" in the same sentence, so I thought I would address that.

Resources