2

Is there a way I can deploy my entire website/webapp to an Azure WebRole without the need of Visual Studio?

Context: We have a test environment where there's an IIS hosted web app where our testers test (of course). The thing is, we want to grab that exact tested web app folder and deploy it "as is" to a WebRole.

Please avoid commenting on our procedure, we have been looking at it and we will eventually change it if we have to, I just need a 'simple' yes(how)/no answer.

sebagomez
  • 9,501
  • 7
  • 51
  • 89
  • http://msdn.microsoft.com/en-us/library/windowsazure/jj156055.aspx – SLaks Mar 11 '14 at 21:29
  • Is it safe to assume that you deploy your application to the test environment using Visual Studio? Secondly, can you please confirm that your application is a Cloud Service (Windows Azure PaaS) and not a Windows Azure Website? – Gaurav Mantri Mar 12 '14 at 02:18
  • No, it is not. We just consolidate to a directory where test environment is set (think of it as if it was php). Yes, it is a WebRole (PaaS) – sebagomez Mar 12 '14 at 12:07

3 Answers3

2

IIS Web Deploy can be used to package/migrate/restore IIS applications. It can be enabled while deploying a web role as described in this article and allows to update the web role with the application as deployed in your test environment.

Be aware that only single instance cloud services are supported and that in case of a maintenance operation by the fabric controller, your service will be rolled back to the state created by the initial azure package deployment. (There once was a tool for syncing between multi-instance web deployments but sadly that did not work out too well and is no longer supported. Do not attempt to use or rebuild it.)

Installing and Configuring Web Deploy shows the steps to get web deploy for your local testing IIS while articles on using web deploy like this one show examples for calling the tool.

Another option to evaluate are azure websites and git deployment. This could provide you with a documented and reproducible form of deployment that is not prone to unwanted rollbacks while allowing the service to scale to multiple instances. This option might not work out if the application it too tied to the web roles infrastructure or contains code not suitable for the more restricted web sites environment.

A third option to look at is using CSPack as presented in this article. You basically create a service definition and package up the webapp manually without building it in Visual Studio or TFS.

Simon Opelt
  • 6,136
  • 2
  • 35
  • 66
  • 1
    Just a caveat on Web Deploy: This only works for single-instance Web Role scenarios. If testing with multiple instances, another technique will be required. – David Makogon Mar 12 '14 at 04:25
  • Good comment, David. I adapted my answer and added git-deployed websites as another option to evaluate. – Simon Opelt Mar 12 '14 at 06:38
  • Ok, let me see if I got it right. I can achieve what I want by enabling WebDeploy, but WebDeploy gets enabled (only?) from Visual Studio. Even if I use WebDeploy, if my instance crashes and another one is started it will NOT have what I added to the instance. So, in order to have the elasticity support of a WebRole, fir up instances, using automatic scaling and so on, I MUST use Visual Studio to create a Cloud Service project and create a package (cspkg). Is that correct? – sebagomez Mar 12 '14 at 12:17
  • For the previously described options, yes. I just added a third option that might work for you. – Simon Opelt Mar 12 '14 at 12:57
  • YES! that third option is exactly what I need! Thanks! – sebagomez Mar 14 '14 at 12:53
  • The article in the first paragraph is down, here is an archived version of it: https://web.archive.org/web/20160201182739/http://blogs.msdn.com/b/cloud/archive/2011/04/19/enabling-web-deploy-for-windows-azure-web-roles-with-visual-studio.aspx – Martin Braun Nov 04 '20 at 12:38
  • 1
    @MartinBraun this topic is so old :D But thanks for the heads up. I included your link and fixed a second one. – Simon Opelt Nov 04 '20 at 15:36
1

Yes - make sure you have enabled Remote Access on your webrole. Then copy your web app from your local IIS folder to F:\sitesroot\0 (NOTE - may be E:\sitesroot\0 on same web roles).

viperguynaz
  • 12,044
  • 4
  • 30
  • 41
0

Yes, you can write a programmatic interface against Web Deploy from your C# code. If you're deploying to Azure Web Sites, you could also use the Windows Azure Management Libraries to spin up new web sites or clouand deploy them.

brady gaster
  • 1,506
  • 1
  • 10
  • 15