I am looking for some help from the Octopus Universe to do with an issue that we are currently racking our brains around.
What do we want to do:
Basically, we have an application that we want to deploy (sounds simple ey!), this application comes in three parts (getting complex now!) Web Application layer, Web Service Layer and a Web Admin Layer
Each of these layers exists in its own environment. So the web application has a farm of four servers, the web service layer has a farm of two servers and the web admin layer has another farm of two servers.
We want to be able to do a deployment to these farms, however we want to be able to deploy to 1/2 of each farm, but together rather than separate! ie 2 Web Application, 1 Web Service and 1 Web Admin server, we will call this a Batch
The process flow we want is at a high level:
Drain Batch 1 via Powershell on our Load Balancers
Deploy Web Application, Web Service and Web Admin websites at the same time
Enable Batch 1 via Powershell on our Load Balancers
Then rinse and repeat for Batch 2
Let me know if you have any working examples of this, or any ideas on how to get this done
The first idea that comes to my mind is a combination of Channels + Machine Roles. Lets say you have your machines set up with the following Roles:
TargetName
Role
WebApp1
Batch1
WebApp2
Batch1
WebApp3
Batch2
WebApp4
Batch2
Service1
Batch1
Service2
Batch2
AdminLayer1
Batch1
AdminLayer2
Batch2
Then you could have 2 sets of steps in your deployment process:
The first set of steps would be scoped only to Targets with the Role Batch1. These steps will also be scoped to a channel called Batch1Channel
The second set of steps the same, but for the role Batch2 and the channel Batch2Channel
You’ll basically end up with all the steps duplicated like this:
Deploy Webapp [ for role Batch1]
Deploy Webapp [ for role Batch2]
Deploy Service [ for role Batch1]
Deploy Service [ for role Batch2]
Deploy AdminLayer [ for role Batch1]
Deploy Admin Layer [ for role Batch2]
When you want to deploy to the first batch, you simply do it for the channel Batch1Channel, which will run steps 1,3 & 5 and only hit WebApp1,WebApp2,Service1,AdminLayer1.
Then once you are ready to move on with the next batch, deploy the same to the channel Batch2Channel which will run steps 2,4 & 6 and hit WebApp3,WebApp4,Service2,AdminLayer2