Is it possible to deploy to different target roles in child steps within a rolling deployment in Octopus Deploy?

deployment-config
rolling-deployment
(Mark Harrison) #1

I’m new to Octopus and I have been tasked with making our existing websites be deployed with zero downtime. I have two websites and each is hosted on the same 3 servers.

I saw that Octopus supports rolling deployments, and I can see that you can configure a rolling deployment to “run on target roles”.

My question is - is it possible to select different roles to be used in each child step as part of a rolling deployment?

I’d like the rolling deployment to look like this:

Window Size = 1

  • Remove Server from Load Balancer
  • Deploy Website 1 with the role of website-role1
  • Deploy Website 2 with the role of website-role2
  • Add Server from Load Balancer
(Mark Harrison) #2

Unfortunately there isn’t currently an option in Octopus to run child steps on target roles that differ from the ones applied to the parent step.

When you configure a rolling deployment in Octopus, it is possible to select multiple target roles but the roles chosen will apply to all of the child steps in the rolling deployment.

This is also true for the Window Size selected by the parent step too.

Split out each deployment into separate rolling deployments

One alternative to the desired solution would be to split out each of the website deployments into their own set of child steps.

  • Website1 would have one set of child-steps set as a rolling deployment using target role website1
  • Website2 would have one set of child-steps set as a rolling deployment using target role website2.

In that scenario, the deployment process would look like this:

You could run both parent steps in parallel if you wanted to kick off deployments to both websites at the same time by adjusting the Start Trigger for the Deploy Website2 step to Run in parallel with the previous step:

(Mark Harrison) listed #3