Support for Azure Web Sites

Thanks! I did it. but seems like it’s a workaround.

It took only less than 1 minute to deploy the website using MS Deploy directly from CI (TeamCity)…

It took more than 2 or 3 minutes to deploy it using Octopus + local tentacle + FTP.

I think this is something that Octopus team should look at it…

Hi all,

There is a new step template on the library that uses MS Deploy - you can use it to push to Azure web sites:

http://library.octopusdeploy.com/#!/step-template/actiontemplate-web-deploy-publish-website-(msdeploy)

I’d love if you could try this out and let me know if it falls short anywhere. You’ll still need a Tentacle running on the Octopus server - details here:

Paul

Hi Paul,

I got it working! I used the info on this blogpost : http://michaelcollier.wordpress.com/2012/06/27/windows-azure-web-sites-using-webdeploy-without-the-new-tools/

Teamcity + Octopus + Azure Website is working now!!! See screenshot

Hi Paul,

Thanks! I managed to make it work with FTP for both Azure website and web job.

Hi Saber,

We are not talking about deploying the azure site from Visual Studio. The link that you posted doesn’t mention anything about Octopus.

I know how to deploy the azure website using MSDeploy. (still, we are not going to deploy anything directly from Visual Studio. We are talking about deploying something from CI or Octopus.)

WebDeploy 3 – Error in publishing website to Amazon EC2
http://michaelsync.net/2013/10/29/webdeploy-3-error-in-publishing-website-to-amazon-ec2

Continous Delivery: full script for deploying Azure WebRole and WorkerRole from Powershell
http://michaelsync.net/2013/11/09/continous-delivery-full-script-for-deploying-azure-webrole-and-workerrole-from-powershell

Thanks!

Hi Paul,

Thanks for the template. I don’t want to use git-push for deployment but I may try out your MS deploy template later. As of now, we are using the FTP template for both azure website deployment and azure web job deployment. I shared about it in here http://michaelsync.net/2014/06/10/deploying-the-azure-website-and-azure-webjob-from-octopusdeploy-teamcity Hope someone find it useful.

@mchisync I reacted on Paul’s tip on using the new step template for deploying using MS Deploy. MS Deploy is also used to deploy to Azure Website. So I’m not deploying straight from Visual Studio. I commit/push from VS to a Git repo, Teamcity pulls, debug builds, unit tests, release builds, publishes to nuget repo and creates a new release in octopus. From within Octopus a promote the release to Azure.

Paul,

I’m intermittently getting this error using the Web Deploy step template: No install location found for step: $stepName"

Could this be caused by the deploy step executing before the package step has completed and has an install location? Is there a way we can make this step wait for previous steps to complete?

Thanks,
Tom

Hi Tom,

We have finally been able to find the source of this bug and are working on a fix.
You can track the issue here: https://github.com/OctopusDeploy/Issues/issues/1005
The issue is with child steps not waiting for all the information before starting the next task, and the only current work around is to make all of your steps individual steps and not child steps.

Thanks,
Vanessa

Can someone explain how the MS Deploy step is supposed to work with Azure web sites? It seems like it needs the site already deployed locally and then it does a sync. That’s not very useful in my mind, since I just want to deploy to Azure Web Sites.

How exactly are these library steps run? In what context? For example, are the files from the Nuget package already extracted somewhere? Is the script transferred to the tentacle to do the deployment?

Thanks

Hi Brian,

Thanks for getting in touch!
Like all of our package steps, we extract them to a location do some stuff then move them to a final location (if desired).
The MS Deploy template is no different, you define the previous step name so it knows where to go and grab the files from.
The package step itself is quite powerful, as you can run PowerShell scripts, transforms and variable replacements before we move the files to their final location, so this step template is no different it’s just transferring the files to an Azure website instead after the package step runs.

Hope this helps!
Vanessa

I totally agreed with Brian Vallelunga. I dont think it has to be that complicated. Why can’t we just have a nuget package name that we want to deploy and other info that required by MS deploy? The only thing that is missing in that new template is that the package information instead of “#{WebDeployPackageStepName}” … If you look at the FTP template, there is a section where you can specify the nuget link and package name. It would be helpful if this section includes in new template for MS deploy.

I did get this working by having two steps as was suggested. mchlsync has a point though that this a bit more complicated than it should be. The things that don’t seem simple to me are:

  1. Why do we need a tentacle to deploy to Azure or to FTP files?
  2. Why do some steps such as the FTP template directly work on the package, but others, such as MS Deploy only work on a previously extracted packages?

To address #2, it would be great if library scripts could choose to “inherit” from the master package deployment step. In this way all of the standard options would be there and the script would then be free to gather additional data and perform additional actions needed, such as calling MS Deploy.