Ensure "common"/non-tenant steps are executed before and after tenant-dependent steps

Hi!

We have a deployment where we have two common windows services, the common web site, a common database and and individual databases and web applications (using application in IIS) for our tenants. We want to stop the common services, stop the common web site and migrate the common database first. Then we want to migrate all tenants databases and deploy new each new web application for each tenant. When this is finished we’d like to start the common services and finally start the common web site.

How can we achieve this?

Regards,
Stian Solberg

Hi Stian,

Unfortunately there is no simply way to achieve this right now.

Essentially a deployment is either tenanted or un-tenanted, not both.

I would recommend creating multiple projects, one for your common components, and one for you tenanted components. However, your stipulation that the deployments be interleaved (i.e. stopping common components, deploying tenanted components, restarting common components) adds an additional complication.

Without complete knowledge of your scenario, I would encourage you to try and find a way to avoid the requirement to interleave; allowing you to simply have the two projects (common and tenanted), each which could be deployed independently or together. If this is not an option, then you may have to get a little creative. For example, you could have two projects, where one was your tenanted components, and the other was an orchestration project, which could stop the common components, migrate the common database, trigger a deployment of the tenanted project using the Octopus REST API (there is a Step Template in our community library which may assist) , and then start the common components (yes, this would be non-trivial to setup).

Please let me know what you think about these suggestions? Obviously Multi-Tenancy is a new feature, and we are very keen to work with our customers to find the best ways to satisfy their requirements.

Regards,
Michael