Rollback Strategies With Sentinel Files And Package Management
Rollback is a deployment strategy that gets rehearsed less often than it should. A rollback plan that has never been tested is not a rollback plan. For a runnable lab, see the rollback-deployment directory in the IaC repository. It uses a sentinel file to trigger Puppet-driven dpkg rollback. The Sentinel File Pattern A sentinel file marks a failure condition. When it exists, automation triggers a rollback. In a Puppet-based lab: exec { 'rollback-to-v1': command => 'dpkg --force-depends -i /opt/v1/c-app.deb', onlyif => 'test -f /tmp/simulate_failure', } The sentinel file is a teaching proxy. In production, the sentinel would be a health check failure, a metrics threshold breach, or a monitoring alert. ...