Mercurial > libervia-pubsub
annotate INSTALL @ 266:560b6cdc50b2 0.1.0
fix the backend and storage tests
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 22 Feb 2014 08:05:03 +0100 |
parents | 86e767dc6abb |
children | b757c29b20d7 |
rev | line source |
---|---|
155 | 1 Requirements |
2 ============ | |
3 | |
193 | 4 - Twisted >= 8.0.1: |
5 - Twisted Core | |
6 - Twisted Words | |
168
e2c2c2baf483
Fix use of uuid module now shipping with Python 2.5.
Ralph Meijer <ralphm@ik.nu>
parents:
167
diff
changeset
|
7 - uuid.py (Python 2.5 std. lib. or http://pypi.python.org/pypi/uuid) |
212
edabaa535476
These files also belong to the Idavoll 0.9.0 release.
Ralph Meijer <ralphm@ik.nu>
parents:
207
diff
changeset
|
8 - Wokkel >= 0.5.0 (http://wokkel.ik.nu/) |
264 | 9 - A Jabber server that supports the component protocol (XEP-0114), |
10 and, to enable the micro-blogging feature, the remote roster | |
11 management protocol (XEP-0321). We recommend using Prosody. | |
155 | 12 |
13 For the PostgreSQL backend, the following is also required: | |
14 | |
15 - PostgreSQL | |
264 | 16 - Psycopg 2 |
155 | 17 |
193 | 18 |
155 | 19 Installation |
20 ============ | |
21 | |
264 | 22 sat_pubsub uses setuptools for package building and installing. |
23 To build from the source run: | |
193 | 24 |
25 python setup.py build | |
26 | |
27 Then, to install run the following, possibly as root: | |
155 | 28 |
29 python setup.py install | |
30 | |
193 | 31 See the setuptools documentation for further information on changing |
32 installation locations. | |
33 | |
34 | |
155 | 35 Configuration |
36 ============= | |
37 | |
264 | 38 sat_pubsub uses Twisted's twistd command for running its services. Starting with |
193 | 39 Twisted 2.5.0, twistd supports running Twisted Application Plugins directly, |
40 without the use of mktap. In Twisted 8.1.0, the use of mktap for configuration | |
264 | 41 is deprecated. |
193 | 42 |
264 | 43 Idavoll, on which sat_pubsub is based, provides two types of storage for the backend: |
44 a memory-based storage facility, which is volatile, and a persistent storage facility | |
45 using PostgreSQL. For now, sat_pubsub only uses the persistent storage facility. | |
193 | 46 |
264 | 47 For using the PostgreSQL backend, create a database (for example named pubsub): |
193 | 48 |
264 | 49 sudo -u postgres createuser -d -P `whoami` |
50 createdb pubsub | |
51 psql pubsub < sat_pubsub/db/pubsub.sql | |
193 | 52 |
53 | |
264 | 54 Your Jabber server must also be configured to accept component connections and, |
55 to enable the micro-blogging feature, remote roster management. See below for details. | |
56 | |
193 | 57 |
264 | 58 Running sat_pubsub |
59 ================== | |
193 | 60 |
264 | 61 The minimal example for running sat_pubsub is: |
193 | 62 |
264 | 63 twistd sat_pubsub |
193 | 64 |
65 This will start the service and run it in the background. It generates a | |
66 file twistd.pid that holds the PID of the service and a log file twistd.log. | |
67 The twistd utility has a fair number of options that might be useful, and | |
68 can be viewed with: | |
69 | |
70 twistd --help | |
71 | |
72 When the service starts, it will connect to the Jabber server at the local | |
73 machine using the component protocol, and assumes the JID 'pubsub'. This | |
74 assumes a couple of defaults which can be overridden by passing parameters to | |
75 the twistd plugin. You can get an overview of the parameters and their defaults | |
76 using: | |
77 | |
264 | 78 twistd sat_pubsub --help |
193 | 79 |
80 In particular, the following parameters will be of interest: | |
155 | 81 |
82 --jid: The Jabber ID the component will assume. | |
83 --rport: the port number of the Jabber server to connect to | |
84 --secret: the secret used to authenticate with the Jabber server. | |
85 | |
264 | 86 For example: |
87 | |
88 twistd sat_pubsub --jid=sat-pubsub.<xmpp_domain> --secret=<password> | |
193 | 89 |
90 You may also want to provide the --verbose flag to see the traffic flow, | |
91 for example to debug the configuration. Below some specifics for the | |
264 | 92 Prosody XMPP server implementation. |
193 | 93 |
155 | 94 |
264 | 95 Running sat_pubsub with Prosody |
96 =============================== | |
155 | 97 |
264 | 98 To enable the micro-blogging feature with Prosody XMPP server, you need |
99 the remote_roster plugin. Check if the remote_roster plugin is already | |
100 in your Prosody installation: | |
155 | 101 |
264 | 102 cd prosody/plugins |
103 ls mod_remote_roster.lua | |
104 | |
105 If you can't see it, download it from here: | |
155 | 106 |
264 | 107 wget http://prosody-modules.googlecode.com/hg/mod_remote_roster/mod_remote_roster.lua |
108 | |
109 You need to patch the file (commenting two lines to make all contacts available): | |
110 | |
111 wget http://paste.debian.net/download/12106 | |
112 patch -p2 < paste_1206 | |
155 | 113 |
264 | 114 Edit the prosodi.cfg.lua file to add this module: |
155 | 115 |
264 | 116 modules_enabled = { |
117 [...] | |
118 "remote_roster"; | |
119 [...] | |
120 } | |
155 | 121 |
264 | 122 Also add these two lines at the end of the file, adapting them to your XMPP server |
123 domain (virtual host) and selecting a password of your choice: | |
155 | 124 |
264 | 125 Component "sat-pubsub.<xmpp_domain>" |
126 component_secret = "<password>" | |
155 | 127 |
264 | 128 For a more complete installation and configuration of Prosody to be used with |
129 sat_pubsub, please report yourself to the Salut à Toi wiki: | |
130 | |
131 http://wiki.goffi.org/wiki/Libervia/en#XMPP_server |