diff --git a/inventory/group_vars/bodhi-backend b/inventory/group_vars/bodhi-backend index 608746f9c5..f2de683654 100644 --- a/inventory/group_vars/bodhi-backend +++ b/inventory/group_vars/bodhi-backend @@ -20,6 +20,14 @@ virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }} --network=bridge=br0,model=virtio --network=bridge=br1,model=virtio --autostart --noautoconsole +# These are for fedmsg publication from the bodhi backend. +# If you change these iptables rules, you also need to changes the endpoints +# list in roles/fedmsg/base/templates/endpoints-bodhi.py +tcp_ports: [ + 3000, 3001, 3002, 3003, 3004, + 3005, 3006, 3007, 3008, 3009, +] + # With 16 cpus, theres a bunch more kernel threads nrpe_procs_warn: 900 nrpe_procs_crit: 1000 diff --git a/inventory/group_vars/bodhi-backend-stg b/inventory/group_vars/bodhi-backend-stg index 696a808a16..4135756b7b 100644 --- a/inventory/group_vars/bodhi-backend-stg +++ b/inventory/group_vars/bodhi-backend-stg @@ -19,6 +19,14 @@ virt_install_command: virt-install -n {{ inventory_hostname }} -r {{ mem_size }} --network=bridge=br0,model=virtio --network=bridge=br1,model=virtio --autostart --noautoconsole +# These are for fedmsg publication from the bodhi backend. +# If you change these iptables rules, you also need to changes the endpoints +# list in roles/fedmsg/base/templates/endpoints-bodhi.py +tcp_ports: [ + 3000, 3001, 3002, 3003, 3004, + 3005, 3006, 3007, 3008, 3009, +] + # With 16 cpus, theres a bunch more kernel threads nrpe_procs_warn: 900 nrpe_procs_crit: 1000 diff --git a/roles/fedmsg/base/tasks/main.yml b/roles/fedmsg/base/tasks/main.yml index 4221d7fee5..74d5b2dc4b 100644 --- a/roles/fedmsg/base/tasks/main.yml +++ b/roles/fedmsg/base/tasks/main.yml @@ -84,6 +84,7 @@ - endpoints-summershum.py - endpoints-fedimg.py - endpoints-bugzilla2fedmsg.py + - endpoints-bodhi.py - relay.py - logging.py - base.py diff --git a/roles/fedmsg/base/templates/endpoints-bodhi.py.j2 b/roles/fedmsg/base/templates/endpoints-bodhi.py.j2 new file mode 100644 index 0000000000..7ff1d4b2f4 --- /dev/null +++ b/roles/fedmsg/base/templates/endpoints-bodhi.py.j2 @@ -0,0 +1,21 @@ +{% if env == 'staging' %} +suffix = 'stg.phx2.fedoraproject.org' +{% else %} +suffix = 'phx2.fedoraproject.org' +{% endif %} + + +config = dict( + endpoints={ + "bodhi.bodhi-backend01.%s" % suffix: [ + "tcp://bodhi-backend01.%s:30%0.2i" % (suffix, i) + for i in range(10) + ], + {% if env != 'staging' %} + "bodhi.bodhi-backend01.%s" % suffix: [ + "tcp://bodhi-backend01.%s:30%0.2i" % (suffix, i) + for i in range(10) + ], + {% endif %} + } +)