0
votes

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://docs.microsoft.com/en-us/azure/devops/pipelines/apps/cd/deploy-webdeploy-iis-deploygroups?view=azure-devops but no use.

1
Just want to confirm if you can deploy angular app to azure VM successfully by following answer? If not or has any confusing about it, free to comment below:-) - Merlin Liang - MSFT

1 Answers

0
votes

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:

enter image description here

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

enter image description here


These are the basic steps which could help you achieve what you want.