Add some minimal docs on Supervisor

needed a place to record how XML-RPC setup should go
This commit is contained in:
Lance Edgar 2022-10-31 20:36:40 -05:00
parent 32fa8dc6fe
commit adf930b531
5 changed files with 82 additions and 12 deletions

View file

@ -15,7 +15,7 @@ Base Layer
scripts
email/index
cron
supervisor
supervisor/index
filemon/index
mailmon
upgrades

View file

@ -1,11 +0,0 @@
Supervisord
===========
TODO
Linux Only...
-------------
TODO

View file

@ -0,0 +1,10 @@
Supervisor
==========
.. toctree::
:maxdepth: 2
:caption: Contents:
overview
setup

View file

@ -0,0 +1,12 @@
Overview
========
`Supervisor`_ is a generic process control system, which may be used
to manage Rattail daemons in a standard way on the Linux server.
While not technically required, it's generally recommended and some
Rattail docs may assume its presence.
.. _Supervisor: http://supervisord.org/
See :doc:`setup` for installation and configuration.

View file

@ -0,0 +1,59 @@
.. highlight:: sh
=======
Setup
=======
Basic install of Supervisor itself::
sudo apt install supervisor
Adding a Process [Group]
========================
TODO
User Access
===========
By default only the ``root`` user can control Supervisor, e.g.::
sudo supervisorctl status
TODO: describe how to give e.g. ``rattail`` user access as well
Configuring XML-RPC
===================
Supervisor can provide a XML-RPC interface, with which Rattail can
communicate "directly" instead of invoking shell commands.
To enable this interface, create a file at
e.g. ``/etc/supervisor/conf.d/supervisor.conf`` and in it put:
.. code-block:: ini
[inet_http_server]
port = 127.0.0.1:8127
username = myuser
password = mypass
Choose whichever credentials you like for the above; use the same ones
in the remaining steps.
Once the above file is in place, restart::
sudo systemctl restart supervisor
Now within your Rattail config, set the Supervisor URL:
.. code-block:: ini
[rattail]
supervisorctl_url = http://myuser:mypass@localhost:8127/RPC2
You may need to restart the Rattail app(s) as well.