Target deployment order

Lars Uppheim's Avatar

Lars Uppheim

09 Feb, 2018 10:11 AM

There are a few reasons to be able to control the the target order in a rolling deploy. As I understand this order is now random, and with no possibility to control this.

One example where this would be useful is a situation we have experienced a couple of times:

Deployment steps look like this:
1. Disable webserver in Load Balancer (2 webservers in farm)
2. Deploy package
3. Warmup and test
4. Enable server in LB

So step 2 or 3 fails, and of course the server is not enabled in LB again. The reason for the error is corrected by the developer, and a new deploy is started. But now Octopus decides to start with the other webserver and disables that too in the LB (the first one is already disabled from the first run). Now both webservers are disabled and the site is basically down.

The developers don't have access to the LB and can't see or do anything about this.

If I somehow could tell Octopus to deploy using the same target order every time this situation would not occur.

Is it possible for me to achive this in any way, or do you have another solution for this?

  1. Support Staff 1 Posted by Pawel Pabich on 12 Feb, 2018 02:09 AM

    Pawel Pabich's Avatar

    Hi Lars,

    Thanks for getting in touch! At the moment the order is not deterministic and I created an issue to make it more explicit.

    That being said I can see two approaches that can solve your problem in the meantime:

    1. You could create a new project which you would run when the main project fails. This new project would add all servers back to the load balancer.
    2. You can Exclude/Include specific targets when you deploy your main project so that the last live server is not affected (have a look at the screenshot).

    Please let me know how you go.



  2. 2 Posted by Lars Uppheim on 12 Feb, 2018 01:12 PM

    Lars Uppheim's Avatar

    Thanks for the reply!

      1. If the deploy fails on a server that's out of the LB, it's not an option to include it again
      2. This is of course possible (I didn't know about this), but it's still a manual step.

    I endorse your issue "Make target order in rolling deployments deteministic"


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac