Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
Keel - LDH Middleware
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
21
Issues
21
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liberty
host
Keel - LDH Middleware
Commits
b4462f79
Commit
b4462f79
authored
Oct 13, 2017
by
David Seaward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use consistent site name
parent
a9c51b91
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
41 deletions
+39
-41
COPYING.md
COPYING.md
+2
-2
README.md
README.md
+8
-8
SETUP.md
SETUP.md
+18
-18
docs/Makefile
docs/Makefile
+2
-2
docs/conf.py
docs/conf.py
+8
-10
docs/index.rst
docs/index.rst
+1
-1
No files found.
COPYING.md
View file @
b4462f79
# Copying notice
Purist s
ervices middleware
<br
/>
https://code.puri.sm/purist/middleware
<br
/>
S
ervices middleware
<br
/>
<https://plan.puri.st/module/middleware>
<br
/>
Copyright 2017 Purism SPC and contributors
<br
/>
SPDX-License-Identifier: AGPL-3.0+
...
...
README.md
View file @
b4462f79
Purist s
ervices middleware
===================
=======
S
ervices 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+
...
...
SETUP.md
100644 → 100755
View file @
b4462f79
...
...
@@ -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`
)
...
...
docs/Makefile
View file @
b4462f79
...
...
@@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS
=
SPHINXBUILD
=
sphinx-build
SPHINXPROJ
=
Puristaccount
site
SPHINXPROJ
=
Servicemiddleware
site
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)
docs/conf.py
View file @
b4462f79
#!/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
=
'
Puristaccount
sitedoc'
htmlhelp_basename
=
'
Servicesmiddleware
sitedoc'
# -- 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.
...
...
docs/index.rst
View file @
b4462f79
...
...
@@ -13,7 +13,7 @@ Welcome to Puri.st account site documentation!
.. autosummary::
:toctree: api/
purist_account
middleware
ldapregister
ldapregister.admin
ldapregister.apps
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment