Blame doc/install_evs.rst

Pierre-Yves Chibon df708b
Installing pagure's EventSource server
Pierre-Yves Chibon df708b
======================================
Pierre-Yves Chibon df708b
Pierre-Yves Chibon df708b
Eventsource or Server Sent Events are messages sent from a server to a web
Sergio Durigan Junior 7fae95
browser. It allows one to refresh a page "live", ie, without the need to reload
Pierre-Yves Chibon df708b
it entirely.
Pierre-Yves Chibon df708b
Pierre-Yves Chibon df708b
Pierre-Yves Chibon df708b
Configure your system
Pierre-Yves Chibon df708b
---------------------
Pierre-Yves Chibon df708b
Pierre-Yves Chibon df708b
The eventsource server is easy to set-up.
Pierre-Yves Chibon df708b
Pierre-Yves Chibon 18e5d3
* Install the required dependencies
Pierre-Yves Chibon 36036e
Pierre-Yves Chibon df708b
::
Pierre-Yves Chibon df708b
Pierre-Yves Chibon df708b
    python-redis
Pierre-Yves Chibon df708b
    python-trollius
Pierre-Yves Chibon df708b
    python-trollius-redis
Pierre-Yves Chibon df708b
Pierre-Yves Chibon b6a8b2
.. note:: We ship a systemd unit file for pagure_milter but we welcome patches
Pierre-Yves Chibon 18e5d3
        for scripts for other init systems.
Pierre-Yves Chibon 9fdcc8
Pierre-Yves Chibon df708b
Pierre-Yves Chibon df708b
* Install the files of the SSE server as follow:
Pierre-Yves Chibon df708b
Pierre-Yves Chibon df708b
+----------------------------------------+-----------------------------------------------------+
Pierre-Yves Chibon df708b
|              Source                    |                   Destination                       |
Pierre-Yves Chibon df708b
+========================================+=====================================================+
Pierre-Yves Chibon df708b
| ``ev-server/pagure-stream-server.py``  | ``/usr/libexec/pagure-ev/pagure-stream-server.py``  |
Pierre-Yves Chibon df708b
+----------------------------------------+-----------------------------------------------------+
Pierre-Yves Chibon 18e5d3
| ``ev-server/pagure_ev.service``        | ``/etc/systemd/system/pagure_ev.service``           |
Pierre-Yves Chibon df708b
+----------------------------------------+-----------------------------------------------------+
Pierre-Yves Chibon df708b
Pierre-Yves Chibon 9fdcc8
The first file is the script of the SSE server itself.
Pierre-Yves Chibon 9fdcc8
Pierre-Yves Chibon 9fdcc8
The second file is the systemd service file.
Pierre-Yves Chibon 9fdcc8
Pierre-Yves Chibon 9fdcc8
Pierre-Yves Chibon df708b
* Finally, activate the service and ensure it's started upon boot:
Pierre-Yves Chibon 36036e
Pierre-Yves Chibon df708b
::
Pierre-Yves Chibon df708b
Pierre-Yves Chibon 33cc04
    systemctl enable redis
Pierre-Yves Chibon 33cc04
    systemctl start redis
Pierre-Yves Chibon df708b
    systemctl enable pagure_ev
Pierre-Yves Chibon df708b
    systemctl start pagure_ev