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
Pierre-Yves Chibon df708b
browser. It allows 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 df708b
* Installed the required dependencies
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
    systemd
Pierre-Yves Chibon df708b
Pierre-Yves Chibon 9fdcc8
Pierre-Yves Chibon df708b
..note: This last one is necessary if you want to use the service file provided.
Pierre-Yves Chibon df708b
        Otherwise, you will have to write your own.
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 df708b
| ``ev-server/pagure_ev.service``        | ``/usr/lib/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 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