WhitehawkVentures/opsworks-cookbooks — pull request #1 by jbrandenburg (2014-10-04 20:32:11+00:00)
Title: master-chef-11.4-jay-maintenance-page

Add the ability to put up a maintenance page.

Maintenance page is static HTML that lives at public/maintenance.html
Maintenance mode flag file lives at /etc/maintenance_mode (existence/nonexistence of the file is the flag). It's outside the source so the maintenance page can remain up after a deploy completes.
Control is via the AWS console, OpsWorks component. To put the page up: Stack -> Run Command -> Execute Recipes -> unicorn::maintenance_mode_on -> Execute Recipes. Same to take the page down, except unicorn::maintenance_mode_off.

NOTE: To get custom recipes propagated and for the nginx/unicorn layer to be running on the configuration set by those custom recipes, the most reliable approach is to start new instances and stop the old ones before using this maintenance page feature for the first time.

WARNING: Our current ELB/Route 53 configuration apparently routes to servers outside the touchofmodern-staging set, so while access to the OpsWorks IP addrs gets the maintenance page, access to staging.touchofmodern.com does not. We need to sort this out before using the maintenance page feature in production.