Commit b4462f79 authored by David Seaward's avatar David Seaward

use consistent site name

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