README.md 2.23 KB
Newer Older
1 2
Purist services middleware
==========================
3

4
[project] | [code] | [tracker] | *snippets*
5

6 7 8 9 10 11 12 13 14 15 16 17 18
A middleware application for managing Purist accounts and services,
including resource management and user-facing registration. Account
registration creates an LDAP user, which is used for authentication by
other services.

Follows an opinionated installation process (specifically expecting
one-instance-per-server), but also includes a number of configuration
options.

[project]: https://plan.puri.st/module/middleware
[code]: https://code.puri.sm/purist/middleware
[tracker]: https://code.puri.sm/purist/middleware/issues
[snippets]: https://code.puri.sm/purist/snippets/src/master/middleware
19 20 21 22

Prerequisites
-------------

23 24
* Debian 9
* Python 3.5
25
* Django 1.11 (included in Python packages below)
26
* Nginx
David Seaward's avatar
David Seaward committed
27
* RabbitMQ server
28
    * Must be accessible at `amqp://guest:guest@localhost:5672//`
David Seaward's avatar
David Seaward committed
29
    * This can be achieved with just `apt install rabbitmq-server`
David Seaward's avatar
David Seaward committed
30
* Additional dependencies (Debian package names):
31 32 33 34
    * `libsasl2-dev`
    * `libldap2-dev`
    * `libssl-dev`
    * `python3-dev`
35
    * `supervisor`
David Seaward's avatar
David Seaward committed
36 37 38
    * `uwsgi`
    * `uwsgi-emperor`
    * `uwsgi-plugin-python3`
David Seaward's avatar
David Seaward committed
39 40
    * `virtualenv`
* Python/Django dependencies: see `requires/requirements.txt`
41 42 43
* External resources:
    * LDAP database
    * WooCommerce instance (REST API)
David Seaward's avatar
David Seaward committed
44
    * SSH access to an OpenVPN server with `create_new_ovpn_config`
45
      * Typically, the Nginx user (`www-data`) will need SSH access
David Seaward's avatar
David Seaward committed
46 47
      * Test with `sudo -u www-data ssh -p PORT REMOTE_USER@HOSTNAME`
      * The user needing access can be changed in `purist_account_monitor.conf`
48

49
Other versions and alternatives may work but are untested.
50 51 52 53

Usage
-----

54 55
* Install by following the instructions [SETUP.md](SETUP.md) to install.
* Start Django site as a system service, or with `./manage.py runserver`
56
* Visit <https://example.com/account> and follow login and/or
57
  registration links.
58

59
Sharing
60 61
-------

62
Purist services middleware <br />
63
Copyright 2017 Purism SPC and contributors <br />
64
SPDX-License-Identifier: AGPL-3.0+
65

66 67
Shared under AGPLv3-or-later, see [COPYING.AGPL.md](COPYING.AGPL.md)
for details. Contributions under the same terms are welcome.
68

69 70
Contributions and license notices from other sources are listed in
[COPYING.md](COPYING.md)