Search code examples
publishazure-worker-roles

How to deploy Worker Role in a Resource Group?


Based on my research on Stack Overflow I did not find an answer to my question. How do you deploy a Worker Role project from Visual Studio 2015 to an Azure Resource Group which already exist.

We've been able to publish a Web API 2 to the resource group but the Worker Role have different settings request when deploying which doesn't ask for a Resource Group.

First the Publish doesn't use the profile system but need to be triggered from a right click on the worker role in the solution and click Publish. From there I don't see any way to push the worker role in an existing Resource Group.


Solution

  • Azure Resource Groups is part of the Azure Resource Model (ARM). Cloud Services uses the older Azure Service Model (ASM), therefore Cloud Services cannot be deployed to a Resource Group.

    In the Azure Portal, this is often recognized with the suffix (Classic) to the resources that lives in the ASM world. E.g. A VM can either be provisioned in ARM (Resource Manager) or ASM (Classic).

    Some services bridge the ARM/ASM world with specific features. One is VNETs where VNET peering can be done across ARM and ASM:

    From: https://azure.microsoft.com/en-us/documentation/articles/virtual-network-peering-overview/

    A virtual network that uses the Resource Manager deployment model can be peered with another virtual network that uses this model, or with a virtual network that uses the classic deployment model. However, virtual networks that use the classic deployment model can't be peered to each other.

    -Mikkel