comparison INSTALL @ 327:6662cc9519cc

updated INSTALL file
author Goffi <goffi@goffi.org>
date Wed, 09 Mar 2016 10:41:38 +0100
parents b76cbf59772b
children e93a9fd329d9
comparison
equal deleted inserted replaced
326:b76cbf59772b 327:6662cc9519cc
1 Requirements 1 Requirements
2 ============ 2 ============
3 3
4 - Twisted >= 8.0.1: 4 - Python 2.7.x
5 - Twisted >= 15.2.0:
5 - Twisted Core 6 - Twisted Core
6 - Twisted Words 7 - Twisted Words
7 - uuid.py (Python 2.5 std. lib. or http://pypi.python.org/pypi/uuid) 8 - Wokkel >= 0.7.1 (http://wokkel.ik.nu/)
8 - Wokkel >= 0.5.0 (http://wokkel.ik.nu/) 9 - A XMPP server that supports the component protocol (XEP-0114),
9 - A Jabber server that supports the component protocol (XEP-0114), 10 and, to enable the micro-blogging feature, Namespace Delegation (XEP-0355)
10 and, to enable the micro-blogging feature, the Namespace Delegation 11 and privileged entity (XEP-0356) are needed.
11 (XEP-0355) and Privileged Entity (XEP-0356) protocols. We recommend 12 We recommend using Prosody with mod_privilege and mod_delegation modules.
12 using Prosody. 13 - SàT backend (http://repos.goffi.org/sat) is currently needed for MAM and RSM handling
13 14
14 For the PostgreSQL backend, the following is also required: 15 For the PostgreSQL backend, the following is also required:
15 16
16 - PostgreSQL (including development files for psycopg2) 17 - PostgreSQL (including development files for psycopg2)
17 - psycopg2 18 - psycopg2
34 35
35 36
36 Configuration 37 Configuration
37 ============= 38 =============
38 39
39 sat_pubsub uses Twisted's twistd command for running its services. Starting with 40 sat_pubsub uses Twisted's twistd command for running its services.
40 Twisted 2.5.0, twistd supports running Twisted Application Plugins directly,
41 without the use of mktap. In Twisted 8.1.0, the use of mktap for configuration
42 is deprecated.
43 41
44 Idavoll, on which sat_pubsub is based, provides two types of storage for the backend: 42 Idavoll, on which sat_pubsub is based, provides two types of storage for the backend:
45 a memory-based storage facility, which is volatile, and a persistent storage facility 43 a memory-based storage facility, which is volatile, and a persistent storage facility
46 using PostgreSQL. For now, sat_pubsub only uses the persistent storage facility. 44 using PostgreSQL. For now, sat_pubsub only uses the persistent storage facility.
47 45
50 sudo -u postgres createuser -d -P `whoami` 48 sudo -u postgres createuser -d -P `whoami`
51 createdb pubsub 49 createdb pubsub
52 psql pubsub < sat_pubsub/db/pubsub.sql 50 psql pubsub < sat_pubsub/db/pubsub.sql
53 51
54 52
55 Your Jabber server must also be configured to accept component connections and, 53 Your XMPP server must also be configured to accept component connections and,
56 to enable the micro-blogging feature, remote roster management. See below for details. 54 to enable the micro-blogging feature, privileged entity and namespace delegation.
55 See below for details.
57 56
58 57
59 Running sat_pubsub 58 Running sat_pubsub
60 ================== 59 ==================
61 60
68 The twistd utility has a fair number of options that might be useful, and 67 The twistd utility has a fair number of options that might be useful, and
69 can be viewed with: 68 can be viewed with:
70 69
71 twistd --help 70 twistd --help
72 71
73 When the service starts, it will connect to the Jabber server at the local 72 When the service starts, it will connect to the XMPP server at the local
74 machine using the component protocol, and assumes the JID 'pubsub'. This 73 machine using the component protocol, and assumes the JID 'pubsub'. This
75 assumes a couple of defaults which can be overridden by passing parameters to 74 assumes a couple of defaults which can be overridden by passing parameters to
76 the twistd plugin. You can get an overview of the parameters and their defaults 75 the twistd plugin. You can get an overview of the parameters and their defaults
77 using: 76 using:
78 77
79 twistd sat_pubsub --help 78 twistd sat_pubsub --help
80 79
81 In particular, the following parameters will be of interest: 80 In particular, the following parameters will be of interest:
82 81
83 --jid: The Jabber ID the component will assume. 82 --jid: The Jabber ID the component will assume.
84 --rport: the port number of the Jabber server to connect to 83 --rport: the port number of the XMPP server to connect to
85 --secret: the secret used to authenticate with the Jabber server. 84 --secret: the secret used to authenticate with the XMPP server.
86 85
87 For example: 86 For example:
88 87
89 twistd sat_pubsub --jid=sat-pubsub.<xmpp_domain> --secret=<password> 88 twistd sat_pubsub --jid=sat-pubsub.<your_xmpp_domain> --secret=<password>
90 89
91 You may also want to provide the --verbose flag to see the traffic flow, 90 You may also want to provide the --verbose flag to see the traffic flow,
92 for example to debug the configuration. Below some specifics for the 91 for example to debug the configuration. Below some specifics for the
93 Prosody XMPP server implementation. 92 Prosody XMPP server implementation.
94 93
95 94
96 Running sat_pubsub with Prosody 95 Running sat_pubsub with Prosody
97 =============================== 96 ===============================
98 97
99 To enable the micro-blogging feature with Prosody XMPP server, you need 98 To enable the micro-blogging feature with Prosody XMPP server, you need
100 the delegation and privilege plugins: 99 the mod_delegation and privileged_entity plugins.
100 Check if the mod_delegation and mod_privilege plugins are already
101 in your Prosody installation:
101 102
102 https://modules.prosody.im/mod_delegation.html 103 cd prosody/plugins
103 https://modules.prosody.im/mod_privilege.html 104 ls mod_delegation.lua
105 ls mod_privilege.lua
104 106
105 Your prosody.cfg.lua file needs to look a bit like that: 107 If you can't see it, download them from http://modules.prosody.im:
106 108
107 [...] 109 wget http://hg.prosody.im/prosody-modules/raw-file/tip/mod_delegation/mod_delegation.lua
108 modules_enabled = { 110 wget http://hg.prosody.im/prosody-modules/raw-file/tip/mod_privilege/mod_privilege.lua
109 [...] 111
110 "delegation"; 112 Edit the prosody.cfg.lua file to add this module:
111 "privilege"; 113
112 } 114 modules_enabled = {
113 [...] 115 [...]
114 VirtualHost "<xmpp_domain>" 116 "delegation";
117 "privilege";
118 [...]
119 }
120
121 In your VirtualHost, add this lines:
122
123 VirtualHost "<your_xmpp_domain>"
115 privileged_entities = { 124 privileged_entities = {
116 ["sat-pubsub.<xmpp_domain>"] = { 125 ["sat-pubsub.<your_xmpp_domain>"] = {
117 roster = "get"; 126 roster = "get";
118 message = "outgoing"; 127 message = "outgoing";
119 }, 128 },
120 } 129 }
121 delegations = { 130 delegations = {
122 ["urn:xmpp:mam:1"] = { 131 ["urn:xmpp:mam:1"] = {
123 filtering = {"node"}; 132 filtering = {"node"};
124 jid = "sat-pubsub.<xmpp_domain>"; 133 jid = "sat-pubsub.<your_xmpp_domain>";
125 }, 134 },
126 ["http://jabber.org/protocol/pubsub"] = { 135 ["http://jabber.org/protocol/pubsub"] = {
127 jid = "sat-pubsub.<xmpp_domain>"; 136 jid = "sat-pubsub.<your_xmpp_domain>";
128 }, 137 },
129 } 138 }
130 139
131 Component "sat-pubsub.<xmpp_domain>" 140 Also add these two lines at the end of the file, adapting them to your XMPP server
132 component_secret = "<password>" 141 domain (virtual host) and selecting a password of your choice:
133 modules_enabled = {"delegation", "privilege"}
134 142
135 Of course, you have to replace <xmpp_domain> and <password> with the good 143 Component "sat-pubsub.<your_xmpp_domain>"
136 values. 144 component_secret = "<password>"
145 modules_enabled = {"delegation", "privilege"}
137 146
138 For a more complete installation and configuration of Prosody to be used 147 For a more complete installation and configuration of Prosody to be used with
139 with sat_pubsub, please report yourself to the Salut à Toi wiki: 148 sat_pubsub, please report yourself to the Salut à Toi wiki:
140 149
141 http://wiki.goffi.org/wiki/Libervia/en#XMPP_server 150 http://wiki.goffi.org/wiki/Libervia/en#XMPP_server