What is the best step template for deploying to a Virtual Directory under and Azure website?

I currently use the Web Deploy (https://library.octopusdeploy.com/#!/step-template/actiontemplate-web-deploy-publish-website-(msdeploy)) step template to publish to an Azure Website. But now I would like to publish a separate application to a virtual directory of the Azure Website.
I’m not sure if the Web Deploy template supports this, and if it does, how do I configure it?

Version: Octopus Deploy 2.6.5.1010

Hi Philip,

Thanks for getting in touch! I am sorry to say that the Web Deploy template does not support that scenario. And our changes in 3.0 also won’t support this.
I had a chat with a team mate though, and you could pretty easily deploy it with your current solution in the directory that you want in the same package, but of course that would mean that you would need to deploy them both at the same time.

Sorry it’s not better news.
Vanessa

Thanks for the response Vanessa.

The application in question has a separate life cycle to the parent application and is developed by a different team, I need to be able to deploy them individually.

Currently I am using FTP to do this, but FTP seems to take forever.
WebDeploy supports publishing to a virtual directory, is it a case of the template not providing the functionality I am looking for? Could I modify the template (if I knew what I was doing) to support my requirement, or is this something which simply cannot be done?

Thanks,
Phil

Hi Phil,

We actually aren’t sure, because we haven’t tried or tested the scenario, so our response was mostly ‘maybe?’.
As WebDeploy does support it, if you want to give it a shot and test, we would welcome a PR to add this functionality.

Vanessa

Thanks Vanessa,

I’ll have to learn how to create/edit the step templates and give the PR a go.

I’ve just noticed that FTP isn’t a available as a deployment target in v3.
Is a deployment target different to the FTP Step Template?

I rely on FTP to get the apps into the Azure Virtual Directory, so any guidance or scripts you add to the library will be a huge relief.

Is what I’m doing (deploying to Azure VD) such a weird thing?
I haven’t come across many other people struggling with the same problem.

It looks like the WebDeploy step template does indeed support publishing to Azure Virtual Directories and I was just passing the wrong parameters.

Simply amending the website name to website/directory publishes to the virtual directory.
I was also adding the virtual directory to the publish URL, which is not required and this is why I was running into problems…phew.

Thanks again Vanessa.

Hi Philip,

That is great news! Like I said we had never tested the scenario and are very happy to be wrong in this case!
It means the new Azure feature will also work in this way for 3.0.

Vanessa

It looks like in 3.0 there isn’t a textbox to enter the website/directory name, it is queried from the Azure subscription and provided in a drop down list, however I did read the blog post about reverting the feature back to 2.6 style so maybe it will work like phillip suggested.

nick.l,

I don’t suppose you could link the blog post you refer to?

Thanks,
Phil

Hey Philip,

I’ve attached an image of what the template currently looks like - it has a drop down list for web site so there’s no way to make it deploy to your virtual directory.

Hi Nick and Phil,

Phil is using the web deploy step template which is still available and unchanged from 2.6. And the blog post is referring to the Azure template that we removed, not what is coming in 3.1.
3.1 is more of a hybrid between the two. The pre-release for 3.1 should be out next week.

Vanessa

Thanks for the clarification Vanessa.

Very excited to try it out next week. Currently I have not figured out a way to deploy to a virtual directory in an Azure website using 3.0.

Hi Nick,

So I had a chat to the dev who is working on the Azure changes and it still won’t be possible to use it and use a virtual directory with the 3.1 stuff.
But we do think it’s a valid feature and would mean less customers would need to use the web deploy template.
So I have created an issue you can track: https://github.com/OctopusDeploy/Issues/issues/1914
It might not make it to 3.1 but it might be shortly after.

Vanessa