How to deploy only a work / website role in Azure

If you have a website and a working role in the Azure solution, all the expectations of publishing a service pack, uploading it to the cloud storage waiting for the package to be deployed can be exhausting, a lot of time waste. How to download / deploy only the working or web role of Microsoft Azure Solution , which contains both roles, and save both Internet traffic and time?

+7
source share
2 answers

There is no way to build a package for only one of two roles, but if you have limited bandwidth or traffic and want to save loading time (which can be quite a big part if you have a lot of static content: See an example here ).

As you know, a package created in Visual Studio for deployment (cspkg file) is nothing more than an archive. Suppose you want to update only the WORKER role. Steps:

  • Create the service pack as usual
  • Open it with the best archive manager (7zfm)
  • Inside, in addition to other files, there are 2 'cssx' files - one for each role. Delete the unnecessary cssx file.
  • Upload to Azure Blob storage (optional)
  • Update instances from the Azure management portal using 'local' or 'storage' source as usual
  • In the Role drop-down list, select only the role that you want to upgrade
  • Click OK :)

Hope this helps.

+7
source

It is much easier to add two more cloud projects to your solution. In one project, refer only to your web role. In another project, refer only to your working role.

You can save the cloud project, which refers to both roles, and use it for local debugging, but when the time comes for deployment, right-click the cloud project, which refers only to the role that you want to deploy, and click Publish

Ultimately, you will support configuration files for each cloud project, but that sounds a lot easier than manually editing the package file every time.

+4
source

All Articles