Deploy on load balanced environment but on a grouped servers at a time

Hi there,

I have been researching and reading up about rolling deployments and tenants. However i am still a bit confused on which one would work the best with my scenario.

I have drew a diagram which may illustrate better (file attached)

Basically we have our current setup which works perfectly but this only deploys to CI, QA, UAT/DEMO which does not have load balancer. Now I am trying to set up Octopus to deploy it to Live which is load balanced.

What I would like to do is to deploy the package to one swim lane after it has been drained from connections, then deploy it to the second swim lane.
I was reading about rolling deployments but problem is that it will randomly pick servers in the Live role, am i right?

What is the best way to set this up?

Appreciate in advance and my long post.

Hi Ali,
Thank you for contacting us, I will be happy to assist you in finding the most suited solution to your scenario. My understanding is that you will be performing “blue/green deployments”

You are correct when you say that using a Rolling Deployment will effectively seem random and this is due to the order that targets are given to Octopus Deploy Server from its SQL Database, to my knowledge there is currently no way to specify the order for a rolling deployment.

While it is definitely an option to use tenants, it is possible that they might over complicate your environment in your case.

Have you considered adding a new Environment for each of your swim lanes? For example, you would be able to deploy to “Prod-swim1” and upon completion you would then be able to promote your application to “Prod-swim2”. Using this approach will allow you to logically separate each of the swim lanes.

Another thing I would suggest looking into is the use of a load balancer in your UAT environment so that it mirrors your Live environment better. This practice will allow you to discover any possible issues with load balancing before they make it to production.

If you have any further questions please feel free to let me know

Hi Lawrence,

Thank you for your reply.

I did think of adding two new environments for both swim lanes, but just thought to see if there is another way of doing it. The Octopus deployments will be triggered through Teamcity. I tried using tenants but as you said it was getting complicated because i kept coming back to having the same thing as you would without tenants.

I will go ahead with two new environments for now.

Thank you for your assistance.