mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Adding task04 to fabfile.
This commit is contained in:
parent
c8eed328d4
commit
4bee53f4a4
2 changed files with 10 additions and 9 deletions
|
@ -7,4 +7,5 @@
|
|||
199.15.253.226 db03 db03.newsblur.com
|
||||
199.15.250.231 task01 task01.newsblur.com
|
||||
199.15.250.250 task02 task02.newsblur.com
|
||||
199.15.250.233 task03 task03.newsblur.com
|
||||
199.15.250.233 task03 task03.newsblur.com
|
||||
199.15.252.148 task04 task04.newsblur.com
|
16
fabfile.py
vendored
16
fabfile.py
vendored
|
@ -200,7 +200,7 @@ def setup_common():
|
|||
setup_local_files()
|
||||
setup_libxml()
|
||||
setup_python()
|
||||
setup_psycopg()
|
||||
# setup_psycopg()
|
||||
setup_supervisor()
|
||||
setup_hosts()
|
||||
config_pgbouncer()
|
||||
|
@ -320,7 +320,7 @@ def setup_python():
|
|||
sudo('python setup.py install')
|
||||
|
||||
with settings(warn_only=True):
|
||||
sudo('su -c \'echo "import sys; sys.setdefaultencoding(\\\\"utf-8\\\\")" > /usr/lib/python2.7/sitecustomize.py\'')
|
||||
sudo('su -c \'echo "import sys; sys.setdefaultencoding(\\\\"utf-8\\\\")" > /usr/lib/python/sitecustomize.py\'')
|
||||
|
||||
# PIL - Only if python-imaging didn't install through apt-get, like on Mac OS X.
|
||||
def setup_imaging():
|
||||
|
@ -335,7 +335,7 @@ def setup_hosts():
|
|||
def config_pgbouncer():
|
||||
put('config/pgbouncer.conf', '/etc/pgbouncer/pgbouncer.ini', use_sudo=True)
|
||||
# put('config/pgbouncer_userlist.txt', '/etc/pgbouncer/userlist.txt', use_sudo=True)
|
||||
# sudo('echo "START=1" > /etc/default/pgbouncer')
|
||||
sudo('echo "START=1" > /etc/default/pgbouncer')
|
||||
sudo('/etc/init.d/pgbouncer stop')
|
||||
with settings(warn_only=True):
|
||||
sudo('pkill pgbouncer')
|
||||
|
@ -469,11 +469,11 @@ def setup_db_firewall():
|
|||
sudo('ufw default deny')
|
||||
sudo('ufw allow ssh')
|
||||
sudo('ufw allow 80')
|
||||
sudo('ufw allow from 199.15.250.0/22 to any port 5432 ') # PostgreSQL
|
||||
sudo('ufw allow from 199.15.250.0/22 to any port 27017') # MongoDB
|
||||
# sudo('ufw allow from 199.15.250.0/22 to any port 5672 ') # RabbitMQ
|
||||
sudo('ufw allow from 199.15.250.0/22 to any port 6379 ') # Redis
|
||||
sudo('ufw allow from 199.15.250.0/22 to any port 11211 ') # Memcached
|
||||
sudo('ufw allow from 199.15.250.0/21 to any port 5432 ') # PostgreSQL
|
||||
sudo('ufw allow from 199.15.250.0/21 to any port 27017') # MongoDB
|
||||
# sudo('ufw allow from 199.15.250.0/21 to any port 5672 ') # RabbitMQ
|
||||
sudo('ufw allow from 199.15.250.0/21 to any port 6379 ') # Redis
|
||||
sudo('ufw allow from 199.15.250.0/21 to any port 11211 ') # Memcached
|
||||
sudo('ufw --force enable')
|
||||
|
||||
def setup_db_motd():
|
||||
|
|
Loading…
Add table
Reference in a new issue