Currently, rolling back a production deployment is an error-prone, manual process, non-atomic involving deleting symlinks and re-creating them on all three web servers. With an Ansible playbook this could be automated and executed in a small time frame on the server.
Acceptance Criteria
- A playbook is added for rolling back to a previous release on the servers
- Add documentation in wmde/fundraising-infrastructure
Implementation notes
- The playbook should receive a variable called target_deployment, containing the release-YYYMMDDHHMM directory name of the deployment the user wants to roll back to. It should also receice a variable called environment, running it either on test or production (automatically selecting the right path on the server).
- Show a list of release directory names
- store ls output to variable
- use message command to output the variable
- Prompt user to pick a release to roll back to
- Fail if the target_deployment directory does not exist in the path
- Change the symlink target of current-release-htdocs to the target_deployment path