Multiple Project Deployment Across a Server Pool

Good morning,

We have a set of micro-projects we are working on that are currently deployed individually to two separate targets that are in a pool. During the deployment process we remove one server from the pool, deploy the project to it then bring it back in and repeat the process to the second server. This process works as expected when deploying one project at a time.

What we are in need of is a way to chain these projects together in a single deployment where each project will be deployed to one target then each project will be deployed to the second target. We still need to keep the ability to deploy each of the micro-targets independently when needed.

I have created a parent project and added some child projects to test with. One of the first steps is to take a server out of the pool and then start the deployment process of the first child project. This works as expected but the problem we are having is that the child project will try to deploy to both targets instead of the one we pull out of the pool.

Is there any way to tell the child projects to only deploy to a single target?

Thank you,
Christopher Kuiper
Fire Mountain Gems and Beads
DevOps Engineer

Hi @kuiperc,

Thanks for reaching out and welcome to the Octopus Community, that’s a great question!

I believe you are looking for our Rolling Deployments feature, which allows a WindowSize variable to be set to limit the number of targets executing simultaneously. Rolling Deployment Child Steps can also be scoped to a specific variable value so it can be perfect for adding servers back into a webfarm for example.

Alternatively the same variable the Rolling Deployment feature uses can be set manually to limit the number of parallel targets a step runs against, Octopus.Action.MaxParallelism. To scope it to a specific step, the step’s name can be used:
Octopus.Action["Run a Script"].MaxParallelism

Hope that helps but feel free to reach out if you have any questions about it or would like some further clarification at all!

Best Regards,

Hello @finnian.dempsey,

Thank you for getting back to me. I was able to find a community step template called Chain Deployment that allows me to disable steps in the project that it wraps around, thus I can deploy a group of micro-projects disabling the steps for each project that removes the targets from the server pool. In my Canary test deployment project I have four micro-projects and for each one the steps have been disabled as expected.

Thank you again,

Christopher Kuiper
Fire Mountain Gems and Beads
DevOps Engineer

2 Likes