Search code examples
azureazure-web-rolesazure-cloud-services

Microsoft Azure: Can You Deploy Web Role To 2 Different Cloud Services At The Same Time?


does anyone know if it is possible to deploy a web role from e.g. VisualStudio 2015 cloud project to two different cloud services at the same time?

What I mean by "at the same time" is that when you go through publishing wizard.

Alternatively using any other method?

Rather than going through the publishing wizard 2 times and each time targetting a different cloud service.


Solution

  • A role definition is within a VS Cloud Service solution. When you deploy, you deploy a single solution, which comprises one or more roles (with each role having 1 or more instances).

    The only way you'd be able to deploy the same web role to two cloud services is to share that role's project with two solutions. But VS won't be able to deploy two solutions in parallel. You'd need to do your own deployment script for that.