deploy-rs icon indicating copy to clipboard operation
deploy-rs copied to clipboard

Custom deployment checks on target node to trigger magic rollback

Open LunNova opened this issue 1 year ago • 3 comments

Is it possible to add custom checks which must succeed or a rollback will happen?

For example, a certain service must be started + a certain IP address must be pingable. I guess a shell script for each check which must run successfully would work.

LunNova avatar Nov 18 '22 19:11 LunNova

What about adding a oneshot systemd service? That should trigger a rollback when unsuccessful and could be hooked into reboots too.

PhilTaken avatar Nov 19 '22 00:11 PhilTaken

You can also just use activate.custom and then add the checks necessary at the end of the script.

balsoft avatar Nov 19 '22 07:11 balsoft

Putting it in activate.custom means that the checks will run on the remote machine, when you probably want them to run from the machine running deploy.

Also, in addition to/separate from custom checks, there should also be an option to interactively prompt for confirmation. This would particularly be useful when deploying to routers, where the deployment might "succeed" but still break the ssh connection deploy is being run from.

quentinmit avatar May 25 '23 19:05 quentinmit