Blame doc/install_webhooks.rst
|
Pierre-Yves Chibon |
4cbf47 |
Installing pagure's web-hooks notification system
|
|
Pierre-Yves Chibon |
4cbf47 |
=================================================
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
Web-hooks are a notification system upon which a system makes a http POST
|
|
Pierre-Yves Chibon |
4cbf47 |
request with some data upon doing an action. This allows notifying a system
|
|
Pierre-Yves Chibon |
4cbf47 |
that an action has occured.
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
If you want more information feel free to check out the corresponding page
|
|
Pierre-Yves Chibon |
4cbf47 |
on wikipedia: `https://en.wikipedia.org/wiki/Webhook
|
|
Pierre-Yves Chibon |
4cbf47 |
<https: en.wikipedia.org="" webhook="" wiki="">`_.</https:>
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
Configure your system
|
|
Pierre-Yves Chibon |
4cbf47 |
---------------------
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
* Install the required dependencies
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
::
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
python-redis
|
|
Pierre-Yves Chibon |
4cbf47 |
python-trollius
|
|
Pierre-Yves Chibon |
4cbf47 |
python-trollius-redis
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
b6a8b2 |
.. note:: We ship a systemd unit file for pagure_webhook but we welcome patches
|
|
Pierre-Yves Chibon |
4cbf47 |
for scripts for other init systems.
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
* Install the files of the web-hook server as follow:
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
+----------------------------------------------+----------------------------------------------------------+
|
|
Pierre-Yves Chibon |
4cbf47 |
| Source | Destination |
|
|
Pierre-Yves Chibon |
4cbf47 |
+==============================================+==========================================================+
|
|
Pierre-Yves Chibon |
4cbf47 |
| ``webhook-server/pagure-webhook-server.py`` | ``/usr/libexec/pagure-webhook/pagure-webhook-server.py`` |
|
|
Pierre-Yves Chibon |
b6a8b2 |
+----------------------------------------------+----------------------------------------------------------+
|
|
Pierre-Yves Chibon |
4cbf47 |
| ``webhook-server/pagure_webhook.service`` | ``/etc/systemd/system/pagure_webhook.service`` |
|
|
Pierre-Yves Chibon |
b6a8b2 |
+----------------------------------------------+----------------------------------------------------------+
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
The first file is the script of the web-hook server itself.
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
7d3eae |
The second file is the systemd service file.
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
* Activate the service and ensure it's started upon boot:
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
::
|
|
Pierre-Yves Chibon |
4cbf47 |
|
|
Pierre-Yves Chibon |
4cbf47 |
systemctl enable redis
|
|
Pierre-Yves Chibon |
4cbf47 |
systemctl start redis
|
|
Pierre-Yves Chibon |
4cbf47 |
systemctl enable pagure_webhook
|
|
Pierre-Yves Chibon |
4cbf47 |
systemctl start pagure_webhook
|