Skip to content

Commit e83c0c7

Browse files
committed
Add new incident.fail_to_mirror task
This explicitly turns off Puppet and Nginx on the cache nodes, enabling the site to fail to edge and mirror instead.
1 parent cddef0a commit e83c0c7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

fabfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import apt
1717
import cache
1818
import es
19+
import incident
1920
import licensify
2021
import logstream
2122
import mongo

incident.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from fabric.api import *
2+
from nginx import kill as nginx_kill
3+
from puppet import disable as puppet_disable
4+
5+
@task
6+
@roles('class-cache')
7+
def fail_to_mirror():
8+
"""Fails the site to the mirror"""
9+
puppet_disable()
10+
nginx_kill()
11+
print("Disabled Puppet and stopped Nginx, remember to re-enable these")

0 commit comments

Comments
 (0)