Deploying a child project once when many parents are deploying simultaneously

I have 4 target roles: Server1, Server2, Server3 & Server4.

I have dozens of projects that are scoped to each deploy to one of the target roles.
To make deployment easier, I have 4 parent projects, 1 per target role, which contain ‘Deploy a Release’ steps for the child projects.

In some rare cases, I have projects that target all 4 roles e.g. FooApp.

How do I let a deployment of FooApp target all 4 roles (needed for CI reasons), whilst limiting a simultaneous deployment of the parent 4 projects to deploying only once per target role?

a) Is there a way to specify that deploying the Server1 parent project only deploys FooApp to Server1 role instead of all the target roles?

b) Is there a way to ensure only 1 child deployment of FooApp happens when all 4 parent projects are deployed? I know you can do that by changing the deployment condition to “If the selected release is not the current in the environment”, however, it means I can’t redeploy the same release repeatedly, so hoping there’s a more elegant deployment condition I haven’t thought of.

c) Is there another way I haven’t thought of?

Thanks in advance!

Hi Henry,

Before jumping into the solution, I have a few clarification questions if you don’t mind.

You mention you have 4 target roles, Server1, Server2, Server3, and Server4, and you have dozens of projects scoped to deploy to one of these target roles.

If I am understanding that correctly, your project/role/app configuration looks something like this:

  • Server1
    • ProjectA - AppA
    • ProjectB - AppB
    • ProjectC - AppC
    • ProjectD - AppD
  • Server2
    • ProjectE - AppA
    • ProjectF - AppB
    • ProjectG - AppC
    • ProjectH - AppD
  • Server3
    • ProjectI - AppA
    • ProjectJ - AppB
    • ProjectK - AppC
    • ProjectL - AppD
  • Server4
    • ProjectM - AppA
    • ProjectN - AppB
    • ProjectO - AppC
    • ProjectP - AppD

Is that above tree correct? Or, did I completely misunderstand your setup?

Assuming that the above tree is correct, is there any difference between your servers? Are they all web servers?

Sorry Bob, let me clarify:

Server1

  • ProjectA - AppA
  • ProjectB - AppB
  • ProjectC - AppC
  • ProjectFoo - AppFoo

Server2

  • ProjectE - AppE
  • ProjectF - AppF
  • ProjectG - AppG
  • ProjectFoo - AppFoo

Server3

  • ProjectI - AppI
  • ProjectJ - AppJ
  • ProjectK - AppK
  • ProjectFoo - AppFoo

Server4

  • ProjectM - AppM
  • ProjectN - AppN
  • ProjectO - AppO
  • ProjectFoo - AppFoo

The common Foo project is a helper service that I want deployed to all the 4 target roles, regardless of whether it’s web or app tier. I’d like to have 13 (in reality there’s more) child projects so I can CI deploy them, and 4 parent projects so I can bulk deploy them (in parallel) to higher environments.

Thanks for looking into this! I suspect I’m stretching the bounds of Octopus.

Ah, I think I’m picking up what you are putting down then.

Have you had a chance to try out adding a new role to all four servers?

Server-AppFoo

ProjectFoo would target Server-AppFoo and would deploy to all of them at the same time.