comparison doc/installation.rst @ 468:445a2f67be4a

doc: update following renaming and delegation changes
author Goffi <goffi@goffi.org>
date Fri, 15 Oct 2021 15:54:15 +0200
parents 67da33212b2b
children dc53c6f020bc
comparison
equal deleted inserted replaced
467:d86e0f8a1405 468:445a2f67be4a
1 ============ 1 ============
2 Installation 2 Installation
3 ============ 3 ============
4 4
5 This are the instructions to install SàT Pubsub. 5 This are the instructions to install Libervia Pubsub.
6 6
7 .. note:: 7 .. note::
8 8
9 SàT PubSub is not released yet and this documentation is work in progress 9 Libervia PubSub is not released yet and this documentation is work in progress
10 10
11 .. note:: 11 .. note::
12 12
13 /!\\ Beware, if you're installing SàT Pubsub on a server already running in production, 13 /!\\ Beware, if you're installing Libervia Pubsub on a server already running in production,
14 it will replace your legacy Pubsub service, meaning that everything stored there won't 14 it will replace your legacy Pubsub service, meaning that everything stored there won't
15 be available anymore (this includes, and is not limited to, bookmarks, encryption 15 be available anymore (this includes, and is not limited to, bookmarks, encryption
16 keys, blogs, etc.). 16 keys, blogs, etc.).
17 17
18 Be sure to save everything from your legacy Pubsub service before switching to SàT 18 Be sure to save everything from your legacy Pubsub service before switching to Libervia
19 Pubsub. 19 Pubsub.
20 20
21 Migration scripts are not yet available, help is welcome to write them. 21 Migration scripts are not yet available, help is welcome to write them.
22 22
23 23
43 First install system requirements. On a Debian system or derivative, you can use following 43 First install system requirements. On a Debian system or derivative, you can use following
44 instructions:: 44 instructions::
45 45
46 sudo apt-get install postgresql python3-dev python3-venv python3-wheel mercurial 46 sudo apt-get install postgresql python3-dev python3-venv python3-wheel mercurial
47 47
48 Now go in a location where you can install SàT Pubsub, for instance your home directory:: 48 Now go in a location where you can install Libervia Pubsub, for instance your home directory::
49 49
50 $ cd 50 $ cd
51 51
52 You'll need to create and activate a Python virtual environment:: 52 You'll need to create and activate a Python virtual environment::
53 53
77 Installation From Sources 77 Installation From Sources
78 ------------------------- 78 -------------------------
79 79
80 .. note:: 80 .. note::
81 81
82 until the release of SàT Pubsub ``0.4.0`` it is recommended to install dev version 82 until the release of Libervia Pubsub ``0.4.0`` it is recommended to install dev version
83 with instructions above 83 with instructions above
84 84
85 To install SàT PubSub we'll work in a virtual environment. On Debian and derivatives you 85 To install Libervia PubSub we'll work in a virtual environment. On Debian and derivatives you
86 should easily install dependencies with this:: 86 should easily install dependencies with this::
87 87
88 sudo apt-get install postgresql python3-dev python3-venv python3-wheel mercurial 88 sudo apt-get install postgresql python3-dev python3-venv python3-wheel mercurial
89 89
90 Now go in a location where you can install SàT Pubsub, for instance your home directory:: 90 Now go in a location where you can install Libervia Pubsub, for instance your home directory::
91 91
92 $ cd 92 $ cd
93 93
94 And enter the following commands:: 94 And enter the following commands::
95 95
105 install .`` instead. 105 install .`` instead.
106 106
107 Post Installation 107 Post Installation
108 ----------------- 108 -----------------
109 109
110 Once SàT Pubsub is installed, you'll need to create a PostgreSQL user, and create the 110 Once Libervia Pubsub is installed, you'll need to create a PostgreSQL user, and create the
111 database:: 111 database::
112 112
113 % sudo -u postgres createuser -d -P $(whoami) 113 % sudo -u postgres createuser -d -P $(whoami)
114 % createdb pubsub 114 % createdb pubsub
115 % cd /tmp && wget https://repos.goffi.org/sat_pubsub/raw-file/tip/db/pubsub.sql 115 % cd /tmp && wget https://repos.goffi.org/sat_pubsub/raw-file/tip/db/pubsub.sql
116 % psql pubsub < pubsub.sql 116 % psql pubsub < pubsub.sql
117 117
118 Update 118 Update
119 ------ 119 ------
120 120
121 If you have updated SàT Pubsub and the database schema has been changed, you may have a 121 If you have updated Libervia Pubsub and the database schema has been changed, you may have a
122 message indicating that your are using an outdated version. 122 message indicating that your are using an outdated version.
123 123
124 To update schema, just apply ``sat_pubsub_update_x_y.sql`` files where ``x`` is your 124 To update schema, just apply ``sat_pubsub_update_x_y.sql`` files where ``x`` is your
125 current version, and ``y`` is the one to update. If you are several versions late, just 125 current version, and ``y`` is the one to update. If you are several versions late, just
126 apply updates one by one. 126 apply updates one by one.
143 .. _prosody_configuration: 143 .. _prosody_configuration:
144 144
145 Prosody Configuration 145 Prosody Configuration
146 --------------------- 146 ---------------------
147 147
148 SàT PubSub can work with any XMPP server (which supports components), but if you want to 148 Libervia PubSub can work with any XMPP server (which supports components), but if you want to
149 use it as your PEP service, you need a server which supports `XEP-0355`_ and `XEP-0356`_. 149 use it as your PEP service, you need a server which supports `XEP-0355`_ and `XEP-0356`_.
150 150
151 Below you'll find the instruction to use SàT PubSub as a PEP service with Prosody: 151 Below you'll find the instruction to use Libervia PubSub as a PEP service with Prosody:
152 152
153 - add these two lines at the end of your ``prosody.cfg.lua`` file, adapting them to your XMPP 153 - add these two lines at the end of your ``prosody.cfg.lua`` file, adapting them to your XMPP
154 server domain (virtual host) and selecting a password of your choice: 154 server domain (virtual host) and selecting a password of your choice:
155 155
156 .. sourcecode:: lua 156 .. sourcecode:: lua
210 delegations = { 210 delegations = {
211 ["urn:xmpp:mam:2"] = { 211 ["urn:xmpp:mam:2"] = {
212 filtering = {"node"}; 212 filtering = {"node"};
213 jid = "pubsub.<xmpp_domain>"; 213 jid = "pubsub.<xmpp_domain>";
214 }, 214 },
215 ["http://jabber.org/protocol/pubsub"] = { 215 ["http://jabber.org/protocol/pubsub"] = {
216 jid = "pubsub.<xmpp_domain>"; 216 jid = "pubsub.<xmpp_domain>";
217 }, 217 },
218 ["http://jabber.org/protocol/pubsub#owner"] = { 218 ["http://jabber.org/protocol/pubsub#owner"] = {
219 jid = "pubsub.<xmpp_domain>"; 219 jid = "pubsub.<xmpp_domain>";
220 }, 220 },
221 ["https://salut-a-toi/protocol/schema:0"] = { 221 ["https://salut-a-toi/protocol/schema:0"] = {
222 jid = "pubsub.<xmpp_domain>"; 222 jid = "pubsub.<xmpp_domain>";
223 }, 223 },
224 ["http://jabber.org/protocol/disco#items:*"] = { 224 ["https://salut-a-toi.org/spec/pubsub_admin:0"] = {
225 jid = "pubsub.<xmpp_domain>"; 225 jid = "pubsub.<xmpp_domain>";
226 }, 226 },
227 ["https://salut-a-toi.org/spec/pubsub_admin:0"] = { 227 ["urn:xmpp:delegation:2:bare:disco#info:*"] = {
228 jid = "pubsub.<xmpp_domain>";
229 },
230 ["urn:xmpp:delegation:2:bare:disco#items:*"] = {
228 jid = "pubsub.<xmpp_domain>"; 231 jid = "pubsub.<xmpp_domain>";
229 }, 232 },
230 } 233 }
231 234
232 Component "pubsub.<xmpp_domain>" 235 Component "pubsub.<xmpp_domain>"
236 Of course, you still have to replace and adapt to your own settings. 239 Of course, you still have to replace and adapt to your own settings.
237 240
238 .. _XEP-0355: https://xmpp.org/extensions/xep-0355.html 241 .. _XEP-0355: https://xmpp.org/extensions/xep-0355.html
239 .. _XEP-0356: https://xmpp.org/extensions/xep-0356.html 242 .. _XEP-0356: https://xmpp.org/extensions/xep-0356.html
240 243
241 Running SàT PubSub 244 Running Libervia PubSub
242 ------------------ 245 -----------------------
243 246
244 The minimal example for running sat_pubsub is: 247 The minimal example for running sat_pubsub is:
245 248
246 % twistd sat-pubsub 249 % twistd sat-pubsub
247 250
273 For example:: 276 For example::
274 277
275 twistd sat-pubsub --jid=pubsub.<your_xmpp_domain> --xmpp_pwd=<password> 278 twistd sat-pubsub --jid=pubsub.<your_xmpp_domain> --xmpp_pwd=<password>
276 279
277 You can set your options in ``sat.conf`` which is the same file used as for Salut à Toi 280 You can set your options in ``sat.conf`` which is the same file used as for Salut à Toi
278 ecosystem. Please check backend ``configuration`` section for details. The SàT PubSub 281 ecosystem. Please check backend ``configuration`` section for details. The Libervia PubSub
279 options must be in ``[pubsub]`` section. 282 options must be in ``[pubsub]`` section.
280