How to implement an Octopus project that keeps runinng after Windows servers have done a reboot?
I’m with the assignment of deploy a routine that will Update Windows Servers until there are not updates available and pending reboot condition is false.
I’ve done all the heavy lifting of the logic that will be executed in every host in powershell (windows services and dependencies pre-checks, store the values in persistent varibles to leave everything when the process is finished, as it was at the beginning, Log all the actions and results of each server, etc…). Thats ok.
My current issue and the reason I’m seeking advice here is how to orchestrate the process to meet a coupe of mandatory requirements:
- To be able to control the order in which the updates logic is executed in each server. eg: first the Domain controllers with odd numbers in the name, then some other server role, then another role wich cannot start the process until the previous one is finished so both are not going to be rebooting at the same time, etc…
- To keep track of the whole process (the order of the servers in the update process, and the process itself in each server) in a centralized manner, in the same way I do with other Octopus projects (critically these other projects desn’t required X reboots along the way…)
So Octopus is my first choice to accomplish it; and so my question:
Is it any recommend way by using Octopus to handle this kind of project?
I could deploy from Octopus the Updates routine script as a Scheduled task in all the servers to be updated, launch the process in a pre-defined order series of steps (eg. first this group of servers, second this other group, third that servers group, etc…, and create a call back from the servers being updated to Octopus (is this possible? how?) so the next group of servers, in their own (the next one) Octopus step, doesn’t start until the proper signal is received.
That way I can have the control over the secuence of execution in each type of server, at the same time it is implemented as steps in an Octopus project, so I have a view of all the process in a sinlge place.
But not really sure if posisble or how to do it.
I’ve looking around here in the forum and found a realted treat (Run script task on tentacle from within Deployment task - #4 by Pawel_Pabich) but not sure to go that way…
Open to any suggestion or advice to accomplish it, even if it is somethign completly diferent from the initial thoughts.
Thank you veery much