Do you have any suggestions on gracefully handling rebooting a server or restarting the Tentacle service and have the deployment wait until the service is available again? When upgrading the Tentacles, the upgrade process waits. How do we do that from our projects? I’m attempting to set our tentacle services to run as domain account so we can do cross server deployments with some msi’s that we have. If I just restart the service, it causes the deployment to fail. For now, I’m creating a powershell job to restart the service but it’s been inconsistent and would like a more robust way to have the Octopus server wait until the tentacle is responding again.
Thanks for getting in touch. Shane a colleague of mine here at Octopus had this suggestion for another customer, I’ve adapted it for your scenario.
You could have two projects: one will do the initial work and then reboot the machine, the other will do the remainder of the work.
For the the first project that triggers the reboot you will want to ignore “connection errors” so when a machine disappears it doesn’t fail the deployment, we have a good walk through with screenshots of how to do that here: https://octopus.com/docs/guides/elastic-and-transient-environments/deploying-to-transient-targets#Deployingtotransienttargets-Deployingtotargetsthatbecomeunavailableduringadeployment
For the project that does the remainder of the work you could create an auto deploy trigger that fires when the machine becomes healthy. There’s a lot of good info on auto deploy triggers here: https://octopus.com/docs/deploying-applications/automatic-deployment-triggers
So the sequence might look like:
-> Does first set of work -> Reboots machine -> Tentacle becomes "Unavailable"
Machine reboots and comes back online
-> Tentacle becomes "Healthy" -> Second project runs
I hope you can get further with this approach. Do let us know if you’re still having issues.