Deploying multiple roles to the same Azure Cloud Service


Well I stumbled on something new tonight – rather than set up a separate Azure cloud service for each Azure Web Role or Worker Role you want to deploy, you can deploy them all to the same Azure cloud service!

In your .NET project, to add an Azure Worker Role or Web Role you need to add a new Cloud Service project. You can either add a new Cloud Service project for each role you want to build/deploy, or you can add those roles to the same Cloud Service (right click on the Cloud Service you created and choose ‘New Worker Role’ or ‘New Web Role’.

If you add your roles to the same Cloud Service project, they will be deployed to the same Cloud Service in Azure (seems obvious when you put it like that!). If you create a different Cloud Service project for each Azure role, you will have to deploy them individually to their respective Azure Cloud Services.

Well that’s my ‘you learn something new every day’ moment for today!

Posted in Visual Studio, Windows Azure Tagged with: ,

About Maff

Maff Rigby

I'm a certified .Net, Umbraco and AngularJS freelance developer with over 15 years experience in the IT industry. As well as writing code I love to teach; I run a number of workshops and 1-1 coaching sessions on Angular JS and Umbraco, and share what I know and learn here!

I’m social (ish)

Connect with me on LinkedIn, follow me on Twitter, or fail to find me on Facebook.