NLB deployments

marchenko.alexandr's Avatar

marchenko.alexandr

11 Oct, 2017 07:03 AM

Hello, did not find any docs about deployments made to NLB enabled cluster of machines. In our case we have 3 on premise servers hosting few mission critical web sites and need to build CI/CD solution around this. Seems that at moment there is no way we will be able to switch into WebFarm or nginx proxy, so going to workaround what we have.

After searching docs and forums did not found anything related. So before trying to investigate it further wondering is there any recommended approaches for this to work or not?

  1. Support Staff 1 Posted by Tom Peters on 12 Oct, 2017 12:36 AM

    Tom Peters's Avatar

    Hi,
    Thanks for getting in touch.

    I don't know anything specific about NLB, but the general pattern of deploying to a set of servers behind a load balancer is usually the same, regardless of which type of load balancer you are using.

    The idea is that you create a step which is responsible for deploying to a server. This step consists of three actions:

    1. Remove the server from the load balancer
    2. Run your deployment for the server (this could actually be multiple actions, depending on your process)
    3. Add the server back to the load balancer.

    If you configure this step to run on targets that have a specific role, then Octopus will take care of running these actions for each machine in your cluster.

    You can read more about this on our Rolling Deployments documentation.

    Hope that helps. Let me know how you go :)
    Tom

  2. 2 Posted by marchenko.alexa... on 12 Oct, 2017 05:49 AM

    marchenko.alexandr's Avatar

    Hi Tom, thank you for suggestion but there might be NLB related problem.

    NLB is a server level balancer not site, yes you can turn off server from it with all its sites as result. So imagine that you have two sites and two servers, then what will happen if both sites are deploying same time but first will turn off first server from NLB and second will turn off second server from NLB - then inside NLB will be 0 servers and nothing at all will work

    To me it seems that reasonable way might be deploying in specified order always and only if there is no other deployment running at moment in this scenarion - wondering can it be achieved or should it be scripted by hands

  3. Support Staff 3 Posted by Tom Peters on 13 Oct, 2017 12:21 AM

    Tom Peters's Avatar

    Hi,

    I see the problem you are facing. Because NLB is a server level balancer, you might want to consider separating out your two sites so that they are not sharing the same load balancer. This would mean you could easily deploy both sites independently, even if they are on the same servers.

    If that is not a viable solution then yes, you will need to do something more complex to manage the deployments, probably involving custom scripting.

    Regards,
    Tom

  4. 4 Posted by marchenko.alexa... on 13 Oct, 2017 08:06 AM

    marchenko.alexandr's Avatar

    Thank you for advice will try to find workaround without heavy scripting

    At least at this stage we can try to remove access to "green button" from everyone except one person who will be responsible for "button click" :) at least it might be a short term solution resolving possible issues with cross fire deployments

  5. 5 Posted by marchenko.alexa... on 20 Oct, 2017 10:49 AM

    marchenko.alexandr's Avatar

    Is there a way to configure octopus to not allow simultanuous deployments to be run on any server?

    I mean that if I as a user will try to press "green button" octopus will say to me that I need to wait until another deployment will finish

    It might be kind of solution at least for someone

  6. Support Staff 6 Posted by Tom Peters on 23 Oct, 2017 12:55 AM

    Tom Peters's Avatar

    Hi,

    If you have a single Octopus Server node, you can change the Task Cap to 1. Releases are deployed using the Task system in Octopus, so setting this to 1 means that only 1 deployment can occur at once.

    This will mean that you can click the green Deploy button while another deployment is running, but it will be enqueued in the Task queue and not run immediately.

    I should warn you that this is not something we would usually recommend as it can have adverse performance implications for your Octopus server. There are other operations that Octopus performs that use the Task queue, so having long running deployments will block these system tasks. Similarly, these system tasks may block deployments from running. An example of one of these tasks is the Tentacle health check task.

    So if you do make this change, keep in mind that it might cause performance problems later on. I would carefully monitor the Octopus Task log to get a good understanding of what is happening on your Octopus server.

    Regards,
    Tom

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

Generic

? 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