Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
Latest fedmsg config.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Jul 6, 2012
1 parent 2ab14a3 commit 50f6ed5
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 23 deletions.
20 changes: 20 additions & 0 deletions fedmsg.d/base.py
@@ -0,0 +1,20 @@
config = dict(
# Set this to dev if you're hacking on fedmsg or an app.
# Set to stg or prod if running in the Fedora Infrastructure
environment="dev",

# Default is 0
high_water_mark=0,
io_threads=1,

## For the fedmsg-hub and fedmsg-relay. ##

# We almost always want the fedmsg-hub to be sending messages with zmq as
# opposed to amqp or stomp.
zmq_enabled=True,

# When subscribing to messages, we want to allow splats ('*') so we tell the
# hub to not be strict when comparing messages topics to subscription
# topics.
zmq_strict=False,
)
32 changes: 9 additions & 23 deletions fedmsg-config.py → fedmsg.d/endpoints.py
@@ -1,41 +1,27 @@
# This file's extension says .ini indicating it is a config file, but it's
# really a python source file containing the configuration for fedmsg.
import socket
hostname = socket.gethostname()

config = dict(
# This is a dict of possible addresses from which fedmsg can send
# messages. fedmsg.init(...) requires that a 'name' argument be passed
# to it which corresponds with one of the keys in this dict.
endpoints=dict(

# A default bind endpoint. Just here for debugging. All
# services should be named.
default="tcp://*:6543",

endpoints={
# This is the output side of the relay to which all other
# services can listen.
relay_outbound="tcp://*:5432",
"relay_outbound": ["tcp://*:4001"],

# For other, more 'normal' services, fedmsg will try to guess the
# name of it's calling module to determine which endpoint definition
# to use. This can be overridden by explicitly providing the name in
# the initial call to fedmsg.init(...).
bodhi="tcp://*:3001",
fas="tcp://*:3002",
fedoratagger="tcp://*:3003",
),
"fas.%s" % hostname: ["tcp://*:3002"],
},

# 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="tcp://127.0.0.1:2003",


# Set this to dev if you're hacking on fedmsg or an app.
# Set to stg or prod if running in the Fedora Infrastructure
environment="dev",

# Default is 0
high_water_mark=1,

io_threads=1,
)
19 changes: 19 additions & 0 deletions fedmsg.d/ssl.py
@@ -0,0 +1,19 @@
import os
import socket

SEP = os.path.sep
here = os.getcwd()
hostname = socket.gethostname()

config = dict(
sign_messages=True,
validate_signatures=True,
ssldir=SEP.join([here, 'dev_certs']),

certnames={
hostname: "test_cert",
# In prod/stg, map hostname to the name of the cert in ssldir.
# Unfortunately, we can't use socket.getfqdn()
#"app01.stg": "app01.stg.phx2.fedoraproject.org",
},
)

0 comments on commit 50f6ed5

Please sign in to comment.