Commit b4462f79 authored by David Seaward's avatar David Seaward

use consistent site name

parent a9c51b91
# Copying notice
Purist services middleware <br />
https://code.puri.sm/purist/middleware <br />
Services middleware <br />
<https://plan.puri.st/module/middleware> <br />
Copyright 2017 Purism SPC and contributors <br />
SPDX-License-Identifier: AGPL-3.0+
......
Purist services middleware
==========================
Services middleware
===================
[project] | [code] | [tracker] | *snippets*
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.
A middleware application for managing private, account-based services,
including resource management and user-facing registration. Tailored for
*Purist services* offered by Purism SPC, but deployable anywhere.
Follows an opinionated installation process (specifically expecting
one-instance-per-server), but also includes a number of configuration
......@@ -44,7 +43,7 @@ Prerequisites
* SSH access to an OpenVPN server with `create_new_ovpn_config`
* Typically, the Nginx user (`www-data`) will need SSH access
* Test with `sudo -u www-data ssh -p PORT REMOTE_USER@HOSTNAME`
* The user needing access can be changed in `purist_account_monitor.conf`
* The user needing access can be changed in `purist_middleware_monitor.conf`
Other versions and alternatives may work but are untested.
......@@ -59,7 +58,8 @@ Usage
Sharing
-------
Purist services middleware <br />
Services middleware <br />
<https://plan.puri.st/module/middleware> <br />
Copyright 2017 Purism SPC and contributors <br />
SPDX-License-Identifier: AGPL-3.0+
......
......@@ -3,28 +3,28 @@ Setup
* Install Debian packages (`apt install libsasl2-dev libldap2-dev...`)
* Create installation folders:
* `/opt/purist/account/` (code)
* `/opt/purist/account_virtualenv/` (Python environment)
* `/etc/opt/purist/account/` (configuration)
* `/var/opt/purist/account/static/` (data and static web files)
* `/var/log/purist/account/` (logs)
* `/opt/purist/middleware/` (code)
* `/opt/purist/middleware_virtualenv/` (Python environment)
* `/etc/opt/purist/middleware/` (configuration)
* `/var/opt/purist/middleware/static/` (data and static web files)
* `/var/log/purist/middleware/` (logs)
* Populate brand data (if it doesn't already exist):
* Create `/var/opt/purist/brand/` (shared data and static web files)
* Populate `brand` folder
* `chown --recursive www-data:www-data /var/opt/purist`
* Copy project code:
* Copy code into `/opt/purist/account/`
* Copy code into `/opt/purist/middleware/`
* `chown --recursive www-data:www-data /opt/purist`
* Set up virtualenv:
* Create virtualenv (`virtualenv /opt/purist/account_virtualenv --python=python3`)
* `cd /opt/purist/account`
* Create virtualenv (`virtualenv /opt/purist/middleware_virtualenv --python=python3`)
* `cd /opt/purist/middleware`
* Activate virtualenv (`source ../account_virtualenv/bin/activate`)
* Install Python packages (`pip install --requirement requires/requirements.txt`)
* Confirm packages by comparing `pip freeze` output with `requires/requirements.txt`
* Deactivate virtualenv (`deactivate`)
* Complete Django settings:
* `cp ./conf/etc/config.ini /etc/opt/purist/account/`
* `cp ./conf/etc/secret.ini /etc/opt/purist/account/`
* `cp ./conf/etc/config.ini /etc/opt/purist/middleware/`
* `cp ./conf/etc/secret.ini /etc/opt/purist/middleware/`
* Fill in settings
* Run initial setup:
* Activate virtualenv (`source ../account_virtualenv/bin/activate`)
......@@ -35,16 +35,16 @@ Setup
account manager
* Deactivate virtualenv (`deactivate`)
* Hook up Nginx:
* `cp ./config/nginx/purist_account /etc/nginx/available_sites/`
* `cp ./config/nginx/purist_middleware /etc/nginx/available_sites/`
* Update `server_name` value
* `cd /etc/nginx/sites-enabled`
* `ln --symbolic ../sites-available/purist_account`
* `ln --symbolic ../sites-available/purist_middleware`
* Hook up uWSGI:
* `sudo apt install uwsgi uwsgi-emperor uwsgi-plugin-python3`
* `cp ./conf/uwsgi_emperor_vassals/purist_account.ini /etc/uwsgi-emperor/vassals/`
* `cp ./conf/uwsgi_emperor_vassals/purist_middleware.ini /etc/uwsgi-emperor/vassals/`
* Hook up Supervisor (supervisord):
* `sudo apt install supervisor`
* `cp ./conf/supervisord/purist_account_monitor.conf /etc/supervisor/conf.d/`
* `cp ./conf/supervisord/purist_middleware_monitor.conf /etc/supervisor/conf.d/`
* Restart services:
* `sudo service rabbitmq-server restart`
* `sudo service uwsgi-emperor restart`
......@@ -52,11 +52,11 @@ Setup
* `sudo service supervisor restart`
* Check logs:
* `/var/log/uwsgi/emperor.log`
* `/var/log/uwsgi/app/purist_account.log`
* `/var/log/uwsgi/app/purist_middleware.log`
* `/var/log/nginx/error.log`
* `/var/log/nginx/access.log`
* `/var/log/supervisor/supervisord.log`
* `/var/log/purist/account/beat.log`
* `/var/log/purist/middleware/beat.log`
For more options and details see
<https://docs.djangoproject.com/en/1.11/#the-development-process>
......@@ -66,8 +66,8 @@ Update
* Stop site
* Update packages with `apt update && apt upgrade`
* Update code in `/opt/purist/account/`
* Update settings in `/etc/opt/purist/account/`
* Update code in `/opt/purist/middleware/`
* Update settings in `/etc/opt/purist/middleware/`
* Update virtualenv:
* Activate virtualenv (`./bin/activate.py`)
* Update Python packages (`pip install --requirement requires/requirements.txt`)
......
......@@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = Puristaccountsite
SPHINXPROJ = Servicemiddlewaresite
SOURCEDIR = .
BUILDDIR = _build
......@@ -17,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
\ No newline at end of file
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Purist account site documentation build configuration file, created by
# Services middleware site documentation build configuration file, created by
# sphinx-quickstart on Tue Mar 7 16:17:28 2017.
#
# This file is execfile()d with the current directory set to its
......@@ -56,7 +56,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = 'Purist account manager'
project = 'Services middleware'
copyright = '2017 Purism SPC and contributors'
author = 'Purism SPC and contributors'
......@@ -110,7 +110,7 @@ html_static_path = ['_static']
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'Puristaccountsitedoc'
htmlhelp_basename = 'Servicesmiddlewaresitedoc'
# -- Options for LaTeX output ---------------------------------------------
......@@ -137,7 +137,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Puristaccountsite.tex', 'Purist account manager documentation',
(master_doc, 'Servicesmiddlewaresite.tex', 'Services middleware documentation',
'Purism SPC and contributors', 'manual'),
]
......@@ -147,7 +147,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'puristaccountsite', 'Purist account manager documentation',
(master_doc, 'servicesmiddlewaresite', 'Services middleware documentation',
[author], 1)
]
......@@ -158,13 +158,11 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Puristaccountsite', 'Purist account manager documentation',
author, 'Puristaccountsite', 'Account registration and management for '
'Purist services.', 'Miscellaneous'),
(master_doc, 'Servicesmiddlewaresite', 'Services middleware documentation',
author, 'Servicesmiddlewaresite', 'Middleware for account registration and '
'services management.', 'Miscellaneous'),
]
# -- Options for Epub output ----------------------------------------------
# Bibliographic Dublin Core info.
......
......@@ -13,7 +13,7 @@ Welcome to Puri.st account site documentation!
.. autosummary::
:toctree: api/
purist_account
middleware
ldapregister
ldapregister.admin
ldapregister.apps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment