deploy-rs
deploy-rs copied to clipboard
Custom deployment checks on target node to trigger magic rollback
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.
What about adding a oneshot systemd service? That should trigger a rollback when unsuccessful and could be hooked into reboots too.
You can also just use activate.custom
and then add the checks necessary at the end of the script.
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.