Add some minimal docs on Supervisor
needed a place to record how XML-RPC setup should go
This commit is contained in:
parent
32fa8dc6fe
commit
adf930b531
|
@ -15,7 +15,7 @@ Base Layer
|
|||
scripts
|
||||
email/index
|
||||
cron
|
||||
supervisor
|
||||
supervisor/index
|
||||
filemon/index
|
||||
mailmon
|
||||
upgrades
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
Supervisord
|
||||
===========
|
||||
|
||||
TODO
|
||||
|
||||
|
||||
Linux Only...
|
||||
-------------
|
||||
|
||||
TODO
|
10
docs/base/supervisor/index.rst
Normal file
10
docs/base/supervisor/index.rst
Normal file
|
@ -0,0 +1,10 @@
|
|||
|
||||
Supervisor
|
||||
==========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
overview
|
||||
setup
|
12
docs/base/supervisor/overview.rst
Normal file
12
docs/base/supervisor/overview.rst
Normal 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.
|
59
docs/base/supervisor/setup.rst
Normal file
59
docs/base/supervisor/setup.rst
Normal 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.
|
Loading…
Reference in a new issue