summaryrefslogtreecommitdiffstats
path: root/roles/fedmsg/base/templates/relay.py.j2
blob: 79733297bd7b855899212a041e12b3ec15d22376 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{% if env == 'staging' %}
suffix  = 'stg.phx2.fedoraproject.org'
non_phx_suffix = 'stg.fedoraproject.org'
{% else %}
suffix = 'phx2.fedoraproject.org'
non_phx_suffix = 'fedoraproject.org'
{% endif %}

# This is just an extension of fedmsg.d/endpoints.py.  This dict
# will get merged in with the other.
config = dict(
    endpoints={
        # This is the output side of the relay to which all other
        # services can listen.
        "relay_outbound": [
            # Messages emerge here
            "tcp://busgateway01.%s:3999" % suffix,
        ],
    },
    # This is the address of an active->passive relay.  It is used for the
    # fedmsg-logger command which requires another service with a stable
    # listening address for it to send messages to.
    # It is also used by the git-hook, for the same reason.
    # It is also used by the mediawiki php plugin which, due to the oddities of
    # php, can't maintain a single passive-bind endpoint of it's own.
    relay_inbound=[
        {% if 'persistent-cloud' in group_names or 'jenkins-master' in group_names %}

        # Stuff from the cloud has to go through our external proxy first..
        #"tcp://hub.fedoraproject.org:9941",

        # ...and normally, we'd like them to go through round-robin, but we're
        # not getting messages in from proxies across the vpn.  So, only use
        # proxy01 for now.
        "tcp://209.132.181.16:9941",
        {% elif 'fedmsg-qa-network' in group_names %}

        # We want the retrace (and other) boxes to talk to the *internal* IP of
        # proxy01, because otherwise the RHIT firewall blocks them.
        "tcp://proxy01.phx2.fedoraproject.org:9941",

        {% elif 'fedmsg-qa-network-stg' in group_names %}

        "tcp://proxy01.stg.phx2.fedoraproject.org:9941",

        {% else %}

        # Primarily, scripts from inside phx2 connect here.
        # Furthermore, scripts from outside (coprs, secondary arch koji) connect
        # here via haproxy.
        "tcp://busgateway01.%s:9941" % suffix,

        # Scripts from the vpn (people03, anitya) connect here
        "tcp://busgateway01.vpn.fedoraproject.org:3998",

        {% endif %}
    ],
)