1

Does anyone know of an automated way to deploy a web role to Azure with the "Enable Web Deploy" option enabled? We have an automated acceptance test process that deploys to Azure using Web Deploy to save time. But we would also like to automate the full deployment of the web role so that it could run off-hours on a less frequent basis.

We are currently using the WAPPSCmdlets module to automate full Azure deployments. However, neither this nor the newer official Azure Powershell cmdlets seem to expose a way to enable Web Deploy in new deployments.

ktam33
  • 1,217
  • 12
  • 22

1 Answers1

2

What you'll need to do is create a startup task that does the following:

  1. Download and install Web Deploy
  2. Configure Web Deploy with PowerShell. You might want to start with this article: PowerShell scripts for automating Web Deploy setup

Keep in mind that this startup task should only run for CI deployments and not for your production deployments, so this might be something you need to take care of in your build process (you can use different Cloud projects in Visual Studio for example).

Sandrino Di Mattia
  • 24,739
  • 2
  • 60
  • 65
  • Wow, this seems so painful for something that is a checkbox in the Publish dialog. Thanks though for the answer! – ktam33 Sep 25 '12 at 16:17
  • And why not simply create the web role manually with web deploy enabled and have your CI deployment simply deploy through web deploy? (You can use the VS Tools For Windows Azure to enable web deploy: http://blogs.msdn.com/b/cloud/archive/2011/04/19/enabling-web-deploy-for-windows-azure-web-roles-with-visual-studio.aspx) – Sandrino Di Mattia Sep 25 '12 at 16:48
  • That's exactly our current solution. I guess I was hoping there would be a straightforward way to automate it so that any changes that require full deployments could be pushed via our CI tool. – ktam33 Sep 25 '12 at 17:47