Mercurial > libervia-pubsub
comparison doc/installation.rst @ 476:1092bab8b3f3
doc: update names following global renaming
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 03 Jan 2022 16:45:55 +0100 |
parents | dc53c6f020bc |
children | 0296a2121504 |
comparison
equal
deleted
inserted
replaced
475:9faa902a9cb2 | 476:1092bab8b3f3 |
---|---|
55 $ source pubsub-venv/bin/activate | 55 $ source pubsub-venv/bin/activate |
56 $ pip install -U pip wheel | 56 $ pip install -U pip wheel |
57 | 57 |
58 Then you need to clone the repository:: | 58 Then you need to clone the repository:: |
59 | 59 |
60 $ hg clone https://repos.goffi.org/sat_pubsub && cd sat_pubsub | 60 $ hg clone https://repos.goffi.org/libervia-pubsub && cd libervia-pubsub |
61 | 61 |
62 Now you can install requirements:: | 62 Now you can install requirements:: |
63 | 63 |
64 $ pip install -r requirements.txt | 64 $ pip install -r requirements.txt |
65 | 65 |
105 Once Libervia Pubsub is installed, you'll need to create a PostgreSQL user, and create the | 105 Once Libervia Pubsub is installed, you'll need to create a PostgreSQL user, and create the |
106 database:: | 106 database:: |
107 | 107 |
108 % sudo -u postgres createuser -d -P $(whoami) | 108 % sudo -u postgres createuser -d -P $(whoami) |
109 % createdb pubsub | 109 % createdb pubsub |
110 % cd /tmp && wget https://repos.goffi.org/sat_pubsub/raw-file/tip/db/pubsub.sql | 110 % cd /tmp && wget https://repos.goffi.org/libervia-pubsub/raw-file/tip/db/pubsub.sql |
111 % psql pubsub < pubsub.sql | 111 % psql pubsub < pubsub.sql |
112 | 112 |
113 Update | 113 Update |
114 ------ | 114 ------ |
115 | 115 |
116 If you have updated Libervia Pubsub and the database schema has been changed, you may have a | 116 If you have updated Libervia Pubsub and the database schema has been changed, you may have a |
117 message indicating that your are using an outdated version. | 117 message indicating that your are using an outdated version. |
118 | 118 |
119 To update schema, just apply ``sat_pubsub_update_x_y.sql`` files where ``x`` is your | 119 To update schema, just apply ``libervia_pubsub_update_x_y.sql`` files where ``x`` is your |
120 current version, and ``y`` is the one to update. If you are several versions late, just | 120 current version, and ``y`` is the one to update. If you are several versions late, just |
121 apply updates one by one. | 121 apply updates one by one. |
122 | 122 |
123 For instance, if you have the following message:: | 123 For instance, if you have the following message:: |
124 | 124 |
125 ERROR:root:Bad database schema version (7), please upgrade to 8 | 125 ERROR:root:Bad database schema version (7), please upgrade to 8 |
126 | 126 |
127 Go to ``db`` directory and enter update instruction:: | 127 Go to ``db`` directory and enter update instruction:: |
128 | 128 |
129 $ cd db | 129 $ cd db |
130 $ psql pubsub < sat_pubsub_update_7_8.sql | 130 $ psql pubsub < libervia_pubsub_update_7_8.sql |
131 | 131 |
132 .. note:: | 132 .. note:: |
133 | 133 |
134 Before any update and specially if there is a schema change, you should backup your | 134 Before any update and specially if there is a schema change, you should backup your |
135 database. If anything goes wrong, it will be your best chance to avoid any data loss. | 135 database. If anything goes wrong, it will be your best chance to avoid any data loss. |
237 .. _XEP-0356: https://xmpp.org/extensions/xep-0356.html | 237 .. _XEP-0356: https://xmpp.org/extensions/xep-0356.html |
238 | 238 |
239 Running Libervia PubSub | 239 Running Libervia PubSub |
240 ----------------------- | 240 ----------------------- |
241 | 241 |
242 The minimal example for running sat_pubsub is: | 242 The minimal example for running libervia-pubsub is: |
243 | 243 |
244 % twistd sat-pubsub | 244 % twistd libervia-pubsub |
245 | 245 |
246 This will start the service and run it in the background. It generates a | 246 This will start the service and run it in the background. It generates a |
247 file twistd.pid that holds the PID of the service and a log file twistd.log. | 247 file twistd.pid that holds the PID of the service and a log file twistd.log. |
248 The twistd utility has a fair number of options that might be useful, and | 248 The twistd utility has a fair number of options that might be useful, and |
249 can be viewed with: | 249 can be viewed with: |
268 ``--xmpp_pwd`` | 268 ``--xmpp_pwd`` |
269 the secret used to authenticate with the XMPP server. | 269 the secret used to authenticate with the XMPP server. |
270 | 270 |
271 For example:: | 271 For example:: |
272 | 272 |
273 twistd sat-pubsub --jid=pubsub.<your_xmpp_domain> --xmpp_pwd=<password> | 273 twistd libervia-pubsub --jid=pubsub.<your_xmpp_domain> --xmpp_pwd=<password> |
274 | 274 |
275 You can set your options in ``sat.conf`` which is the same file used as for Salut à Toi | 275 You can set your options in ``libervia.conf`` which is the same file used as for Salut à Toi |
276 ecosystem. Please check backend ``configuration`` section for details. The Libervia PubSub | 276 ecosystem. Please check backend ``configuration`` section for details. The Libervia PubSub |
277 options must be in ``[pubsub]`` section. | 277 options must be in ``[pubsub]`` section. |