Hi Carsten,
Thanks for getting back to me! Sounds to me like you’ve got options to work with and see what suits best.
I agree with what you are saying, theoretically, you could use a suggestion like this reasonably popular UserVoice suggestion to test whether the application files need to be deployed or not: https://octopusdeploy.uservoice.com/forums/170787-general/suggestions/6594872-allow-the-run-condition-of-a-step-to-be-based-on-a
Practically though, it really depends on what you’re trying to avoid by only deploying the application files once.
When you update the bindings of the IIS Web Site, you will be causing a rotation of the Application Pool… We use a package cache and delta compression (in most cases) so you avoid streaming the package multiple times… I guess the main thing you’d save on is the actual unpacking and configuration of the site itself.
One way of achieving this kind of shape right now in Octopus would be something like Set-OctopusVariable('Octopus.Action.SkipRemainingConventions', 'True')
as described here: http://docs.octopusdeploy.com/display/OD/Package+deployment+feature+ordering
You could add the detection to a PreDeploy.*
script and then set this variable to skip the actual web site deployment.
Another idea worth considering, to avoid the first tenant upgrading all the others would be to build your website name based on the Release Version, let Octopus deploy the package as per normal, and then remove the Tenant binding from the old Web Site, and add it to the new Web Site.
A better way to do this might actually be to configure ARR or another reverse proxy in front of IIS. This way you could:
- Ensure the new version of the Web Application is deployed into IIS and bound to localhost and a TCP port
- Change the ARR rules to start redirecting traffic for that tenant to the new application version
Now as you start to deploy to new Tenants, that deployment could use what Nick suggested to skip the web site deployment, avoiding unnecessary rotation, and simply redirect traffic for the tenant to the new location.
Either way this is a fun problem to solve, and I hope you find a palatable solution for your scenario.
Keep me posted because I’ll add it to our list of patterns in our documentation.
Hope that helps!
Mike