Sequencing Tenanted Deployments

Hi,

  1. Is there any way to specify a specific Tenant to be run first / last? Or to specify the sequence for the Tenants?
  2. Is there a way to specify a specific step to be Un-Tenanted? (For example: sending consolidated email that Deployment has started)

Thanks,
Bhavanari

Hi Bhavanari,

Thanks for getting in touch! It sounds like you’re progressing with your deployment automation using tenants. :slight_smile:

To answer your questions specifically:

  1. No, there is no automatic way to ensure a specific Tenanted deployment runs first/last. The best choice you would have is to manually deploy so a person controls the order, or find another way to model your deployments so you aren’t dependent on specific ordering.

  2. No. When you create a deployment, it is of a Release to an Environment for a Tenant (where the Tenant can be null in the un-tenanted case). Let’s say you’re deploying a release to the Production environment for 30 tenants - this will result in 30 x Tenanted Deployments, one for each tenant.

From the questions you’re asking, it seems like you would like to start a deployment of a release to all your tenants, and have a single email sent at the beginning, and another email sent at completion?

I think the best way to achieve this would be to write a script/program which coordinates your tenanted deployments. For example:

Deploy-Release -Project MyProject -Version 1.5.8 -Tenants *

  1. First this script would query the Octopus Server API to find the Project + Release and all the Tenants
  2. Next it would send a consolidated email indicating the start of the batch
  3. Next it would work through all the deployments checking their status
  4. Finally it could send a consolidated email indicating the status of all the deployments

Automating things with the Octopus API and/or octo.exe is not too difficult, and in my experience at this point, it’s your best option to achieve your goal.

Hope that helps!
Mike

Thank you, Mike.