diff --git a/inventory/group_vars/bodhi b/inventory/group_vars/bodhi index cdf09d1b60..f533c83190 100644 --- a/inventory/group_vars/bodhi +++ b/inventory/group_vars/bodhi @@ -9,10 +9,15 @@ num_cpus: 2 # for systems that do not match the above - specify the same parameter in # the host_vars/$hostname file -tcp_ports: [ 80, 443, - # These 16 ports are used by fedmsg. One for each wsgi thread. - 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, - 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015] +# Definining these vars has a number of effects +# 1) mod_wsgi is configured to use the vars for its own setup +# 2) iptables opens enough ports for all threads for fedmsg +# 3) roles/fedmsg/base/ declares enough fedmsg endpoints for all threads +wsgi_fedmsg_service: bodhi +wsgi_procs: 4 +wsgi_threads: 1 + +tcp_ports: [ 80 ] # Neeed for rsync from log01 for logs. custom_rules: [ '-A INPUT -p tcp -m tcp -s 10.5.126.13 --dport 873 -j ACCEPT', '-A INPUT -p tcp -m tcp -s 192.168.1.59 --dport 873 -j ACCEPT' ] diff --git a/inventory/group_vars/bodhi-stg b/inventory/group_vars/bodhi-stg index 329ad6aa04..7809f37164 100644 --- a/inventory/group_vars/bodhi-stg +++ b/inventory/group_vars/bodhi-stg @@ -10,10 +10,15 @@ num_cpus: 2 # for systems that do not match the above - specify the same parameter in # the host_vars/$hostname file -tcp_ports: [ 80, 443, - # These 16 ports are used by fedmsg. One for each wsgi thread. - 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, - 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015] +# Definining these vars has a number of effects +# 1) mod_wsgi is configured to use the vars for its own setup +# 2) iptables opens enough ports for all threads for fedmsg +# 3) roles/fedmsg/base/ declares enough fedmsg endpoints for all threads +wsgi_fedmsg_service: bodhi +wsgi_procs: 4 +wsgi_threads: 1 + +tcp_ports: [ 80 ] # Neeed for rsync from log01 for logs. custom_rules: [ '-A INPUT -p tcp -m tcp -s 10.5.126.13 --dport 873 -j ACCEPT', '-A INPUT -p tcp -m tcp -s 192.168.1.59 --dport 873 -j ACCEPT' ] diff --git a/roles/bodhi/base/tasks/main.yml b/roles/bodhi/base/tasks/main.yml index 40c6780699..e704028d56 100644 --- a/roles/bodhi/base/tasks/main.yml +++ b/roles/bodhi/base/tasks/main.yml @@ -31,7 +31,7 @@ - bodhi - name: setup basic /etc/httpd/conf.d/ bodhi contents - copy: > + template: > src="bodhi-app.conf" dest="/etc/httpd/conf.d/bodhi.conf" owner=root diff --git a/roles/bodhi/base/files/bodhi-app.conf b/roles/bodhi/base/templates/bodhi-app.conf similarity index 92% rename from roles/bodhi/base/files/bodhi-app.conf rename to roles/bodhi/base/templates/bodhi-app.conf index 3f44964bab..3bf84c9f05 100644 --- a/roles/bodhi/base/files/bodhi-app.conf +++ b/roles/bodhi/base/templates/bodhi-app.conf @@ -3,7 +3,7 @@ Alias /updates/static /usr/share/bodhi/static WSGISocketPrefix run/wsgi WSGIRestrictSignal Off -WSGIDaemonProcess bodhi user=bodhi group=bodhi display-name=bodhi processes=4 threads=1 +WSGIDaemonProcess bodhi user=bodhi group=bodhi display-name=bodhi processes={{wsgi_procs}} threads={{wsgi_threads}} WSGIPythonOptimize 1 WSGIScriptAlias /updates /usr/share/bodhi/bodhi.wsgi/updates diff --git a/roles/bodhi2/base/tasks/main.yml b/roles/bodhi2/base/tasks/main.yml index 8991a42549..592ad395fd 100644 --- a/roles/bodhi2/base/tasks/main.yml +++ b/roles/bodhi2/base/tasks/main.yml @@ -59,7 +59,7 @@ - name: setup basic /etc/httpd/conf.d/ bodhi contents - copy: > + template: > src="bodhi-app.conf" dest="/etc/httpd/conf.d/bodhi.conf" owner=root diff --git a/roles/bodhi2/base/files/bodhi-app.conf b/roles/bodhi2/base/templates/bodhi-app.conf similarity index 91% rename from roles/bodhi2/base/files/bodhi-app.conf rename to roles/bodhi2/base/templates/bodhi-app.conf index a1ae36d45a..b266ef5566 100644 --- a/roles/bodhi2/base/files/bodhi-app.conf +++ b/roles/bodhi2/base/templates/bodhi-app.conf @@ -1,6 +1,6 @@ Alias /static /usr/lib/python2.7/site-packages/bodhi/static/ -WSGIDaemonProcess bodhi user=bodhi group=bodhi display-name=bodhi processes=2 threads=2 +WSGIDaemonProcess bodhi user=bodhi group=bodhi display-name=bodhi processes={{wsgi_procs}} threads={{wsgi_threads}} WSGISocketPrefix run/wsgi WSGIRestrictStdout On WSGIRestrictSignal Off diff --git a/roles/bodhi2/base/templates/production.ini.j2 b/roles/bodhi2/base/templates/production.ini.j2 index c16940a3ff..d6147b80b7 100644 --- a/roles/bodhi2/base/templates/production.ini.j2 +++ b/roles/bodhi2/base/templates/production.ini.j2 @@ -23,7 +23,7 @@ libravatar_enabled = True libravatar_dns = False # Set this to True in order to send fedmsg messages. -#fedmsg_enabled = True +fedmsg_enabled = True # Captcha - if 'captcha.secret' is not None, then it will be used for comments diff --git a/roles/bodhi2/base/templates/staging.ini.j2 b/roles/bodhi2/base/templates/staging.ini.j2 index 222977db3a..408e888c40 100644 --- a/roles/bodhi2/base/templates/staging.ini.j2 +++ b/roles/bodhi2/base/templates/staging.ini.j2 @@ -29,7 +29,7 @@ libravatar_enabled = True libravatar_dns = False # Set this to True in order to send fedmsg messages. -#fedmsg_enabled = True +fedmsg_enabled = True # Captcha - if 'captcha.secret' is not None, then it will be used for comments