Ansible playbook to roll a deploy of a java application running on tomcat, on hosts behind AWS ELBs.
This ansible playbook rolls updates to a set of application servers behind an Amazon load balancer (ELB).
The steps are:
- Disable alerts on the monitoring system
- Remove the node from the Elastic Load Balancer
- Disable service supervisor (monit)
- Roll the update
- Reverse previous steps to re-enable services
The application deployment is done through a tomcat role, which takes the following steps:
- Undeploy through Tomcat's scripted manager
- Stop tomcat
- Ensure the application cache is removed
- Download the war file from an HTTP repository
- Startup tomcat
- Before downloading the file double check md5 to verify if a deployment is necessary
- Implement some sort of wait / app check, as when tomcat startups it ussually takes some time before the application is up and running
- User and password to get the application war should be optional