Targets in Multiple Environments

I realise the following isn’t the best for an environment, but is what I have to work with.

Two environments: Staging and Production

Two applications App1 and App2

Use the same lifecycle: Deploy to Staging => Deploy to Production

Two targets: IIS01and IIS01

For App1 IIS01 is Staging, IIS02 is Prod
For App2 IIS02 is Staging IIS01 is Prod

So both targets are in both environments.

I have the following target roles assigned

IIS01: App1_Stage, App2_Prod
IIS02: App1_Prod, App2_Stage

For App1 Targets in Roles: App1_Stage, App1_Prod
For App2 Targets in Roles: App2_Stage, App2_Prod

But this just deploys to both targets.

How do / can I use target roles to allow this to work?

Hi Dana,
Thanks for getting in touch and sending over your question regarding Targets and Environments.

As a best practice, we suggest not using the environment in the Role name as the Target will be assigned a Role and an Environment when it is created.

Here’s a great article, written by our Customer Success Team, that should provide some additional insight into how Roles work with Targets: How do roles work with deployment targets (servers)?

I hope this helps, and please don’t hesitate to reach out if you have any further questions.

Kind Regards,
Tina

Thanks for the swift response Tina.

Good tip on best practice, we’ll be sure to use that as we go live with our CI.

My real issue is that the actual target machines exist in both staging AND production environments, due to budget restrictions.

We do this to balance load on our IIS boxes.

So, for one app a server may be staging, for another it may be production

We also have a tenanted app where a server may be staging for one tenant, and prod for a different tenant.

I have found a couple of ways of achieving what we need.

  1. Have a separate lifecycle for each app so we can control which servers sit in which environment for each app
  2. For the tenanted app, have two tentacles running on each web server, one effectively being a staging target, the other a prod target.

This works in testing and achieves our aim, all be it with complex config, but begs the question, do two tentacles on a single box count as two targets from a licensing point of view?
Many thanks

Dana Nurse

Hi Dana,
Firstly let me apologize for dropping the ball here. I’m very sorry that I’ve taken so long to get back to you.

Thanks for the detailed description of your environment configuration. To answer your question regarding licensing and Tentacles, Yes eachTarget no matter where it lives will subtract from your License.

Take a look at the additional documentation that I provide above and please let me know if you have any further questions. Once again I’ve very sorry about the delay in getting back to you.

Kind Regards,
Tina