USING PLAYBOOKS FOR COMPLEX ORCHESTRATION

By combining different tasks into a playbook, complex automation can be achieved. As a detailed
example, consider a traditional three-tier web application and its environment consisting of:
• Application servers
• Database servers
• Content servers
• Load balancers
• Plus, a monitoring system connected to an alert system such as a pager notification service
In this example, Ansible can easily be used to implement a complex, cluster-wide rolling update
process that consists of:
• Consulting a configuration/settings repository for information about the involved servers
• Configuring the base OS on all machines and enforcing desired state
• Identifying a portion of the web application servers to update
• Signaling the monitoring system of an outage window prior to bringing the servers off line
• Signaling load balancers to take the application servers out of a load balanced pool
• Stopping the web application server
• Deploying or updating the web application server code, data, and content
• Starting the web application server
• Running appropriate tests on the new server and code
• Signaling the load balancers to put the application servers back into the load balanced pool
• Signaling the monitoring system to resume alerts on any detected issues on those servers
• Repeating this process for remaining application servers in a rolling update process
• Repeating these rolling update processes for other tiers such as database or content tiers
• Sending email reports and logging as desired when updates are complete
By running this playbook across a cluster in groups of machines, an application update can be
achieved with zero downtime.

Leave a Reply

Your email address will not be published. Required fields are marked *