Enabling emergency mode in production

Go to the following location in the TIS-DEVOPS repo file structure:

TIS-DEVOPS/ansible/tasks

Then run the following playbook against the prod environment

ansible-playbook -i ../inventory/prod emergency-green-only-procedure.yml

If Apache is already running on the blue server you will be prompted for how many hours would you want to silence the alerts for:

after you have selected the number of hours (numbers only) and hit enter the rest of the script will continue. When it has finished the server will be out of the loadbalancer and you will be able to work on it without impacting the end users 

With the caveat of hitting the database! if you are planning anything that will cause a lot of database transactions to occur, this will have a knock on effect to green as well!!!

When you want to return prod-blue to the load balancer all you have to do is rerun the same playbook and it will reinsert the server back into the pool and make it live.

If you need to add further silences you can run the following command:

ansible-playbook -i ../inventory/prod emergency-green-only-procedure.yml --tags stop

and you will be prompted for another silence duration.