This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
packages:fedmsg [2015-11-11 20:02] glen [testing] |
packages:fedmsg [2016-03-19 16:50] glen [Gateway] |
||
---|---|---|---|
Line 3: | Line 3: | ||
[[http://www.fedmsg.com/|fedmsg]] (Fedora-Messaging) is a Python package and API used around Fedora Infrastructure to send and receive messages to and from applications. | [[http://www.fedmsg.com/|fedmsg]] (Fedora-Messaging) is a Python package and API used around Fedora Infrastructure to send and receive messages to and from applications. | ||
- | ===== testing ===== | + | ===== Relay ===== |
Quick setup from [[http://www.fedmsg.com/en/latest/development/|here]]: | Quick setup from [[http://www.fedmsg.com/en/latest/development/|here]]: | ||
- | - install yourself ''fedmsg-relay'' package, start the service. | + | - install yourself ''fedmsg-relay'' package |
+ | - add to endpoint: <code python /etc/fedmsg.d/endpoints.py> | ||
+ | endpoints={ | ||
+ | "__main__.HOSTNAME": [ | ||
+ | "tcp://127.0.0.1:4320", | ||
+ | ] | ||
+ | </code> the **HOSTNAME** is your local host name, see ''hostname(1)'' | ||
+ | - start ''fedmsg-relay'' service. | ||
- tail the relay messages: ''%%fedmsg-tail --really-pretty & %%'' | - tail the relay messages: ''%%fedmsg-tail --really-pretty & %%'' | ||
- | - issue a message: ''echo "Hello, world" | fedmsg-logger'' | + | - issue a message: ''%%echo "Hello, world" | fedmsg-logger%%'' |
+ | |||
+ | |||
+ | ===== Gateway ===== | ||
+ | |||
+ | To have endpoint where to listen all messages, need ''fedmsg-gateway'' daemon. | ||
+ | |||
+ | Install ''fedmsg-gateway'' package, no configuration needed. | ||
+ | |||
+ | Now you can define in your ''endpoints.py'' to listen for pld messages: | ||
+ | <code python endpoints.py> | ||
+ | endpoints={ | ||
+ | "pld-relay": [ | ||
+ | "tcp://ep09.pld-linux.org:9940", | ||
+ | ], | ||
+ | </code> | ||
+ | |||
+ | |||
+ | ===== Incoming requests ===== | ||
+ | |||
+ | To configure accepting incoming messages on ''tcp/2003'', install ''fedmsg-relay'' package and configure ''relay.py'': | ||
+ | |||
+ | <code python relay.py> | ||
+ | relay_inbound=[ | ||
+ | "tcp://ep09.pld-linux.org:2003", | ||
+ | ], | ||
+ | </code> | ||
===== anitya ===== | ===== anitya ===== |