How to run tenant-limited deploy step on non tenanted environment?

Hi,

We have a deployment process with the environments Test and Production. Test has 3 tenants, while production is untenanted.

One of the three test tenants should have the full deployment while the other two can make do with a limited install. To facilitate this, we have limited the additional advanced steps by restricting them to the first test tenant. The problem is that we need them to be deployed in the untenanted production environment as well and this does not happen with this approach. I assume this is working as intended, so what is the recommended approach to handling the requirement?

I believe I can solve it using the conditional step execution mentioned here: https://octopusdeploy.uservoice.com/forums/170787-general/suggestions/6594872-allow-the-run-condition-of-a-step-to-be-based-on-a. The purpose of this question is to determine if there is a more standard/elegant way of solving this problem? My main concern with using conditional execution is that it is no longer immediately apparent which steps will get executed on a given tenant/environment. With tenant restriction, we get a nice label making it very explicit.

Regards,
Morten Christiansen

Hi Morten,

Thanks for getting in touch! My preference with this kind of scenario is to actually use create a tenant for Production also.

You’ll end up with three tenants in the Test environment, and one in the Production environment, and all of your deployments will be “tenanted deployments”. This way you don’t need to have any un-tenanted deployments, and the potential complexity and confusion this can add to the mix. It means your releases go through a consistent deployment pipeline, all including tenants. And you end up with a nice clear dashboard, and all of the features tenants bring to the party.

If you like that idea, of going fully tenanted for this project, I would recommend configuring the project so it always requires a tenant for deployments, and also to use this workaround to delete the un-tenanted deployments which will clean up your dashboard: https://github.com/OctopusDeploy/Issues/issues/3169

Hope that helps!
Mike

Hi Mike,

Thanks for the feedback, but this is not an option I want to go with. I have simplified our setup a bit since we also have a Demo environment. Further, since you do not yet support deployment targets which are both tenanted and non-tenanted, we would need to install duplicate tentacles on about a dozen machines (other products use the same deployment targets in non-tenanted setups). I prefer conditional step execution to this.

Regards,
Morten Christiansen

Hi Morten,

Thanks for keeping in touch! When we enable mixed tenanted/non-tenanted deployment targets will my suggestion become your preferred solution also?

One idea would be to use Roles to achieve this perhaps? It would end up meaning you slice your existing roles up into multiple roles, and then you only apply the roles to the deployment targets which actually need that step run on it.

The other approach would be, like you suggested, to use some conditional logic to figure out which steps to skip.

If I come up with any other ideas I’ll get back in touch. :slight_smile:

I would be very interested to see where you land - please do get back to me.

Hope that helps!
Mike

Hi Mike,

The Role approach also sounds sub optimal for us - I find it to be a high priority to keep our overall Octopus Deploy setup as simple as possible, since we have to many different products managed in it. This means that I try to keep the number of environments, roles, etc. to an absolute minimum. Any solution that requires more of these thing wills be a worse choice than using conditional execution, I think. This might change for us in the future, though.

I was hoping for a non-intrusive solution. A nice solution would be a toggle for tenant-limited steps to only apply the limitation in tenanted environments. I can make an official suggestion if you prefer.

Thanks for the ideas, I will keep them in mind and let you know what we land on.

Regards,
Morten Christiansen

Hi Morten,

Thanks for keeping in touch! After re-reading everything, how would you feel about a change to the built-in action conditions?

If that would suit you best in this situation I’ll float it with the rest of the team and see what they think.

Hope that helps!
Mike

Hi Mike,

This seems like a good set of options - certainly more flexible than just a toggle for whether to include non-tenanted environments.

Regards,
Morten Christiansen

Hi Morten,

I’ve added this GitHub issue to track adding this enhancement: https://github.com/OctopusDeploy/Issues/issues/3337

Hope that helps!
Mike