Commit d23dce95 authored by David Seaward's avatar David Seaward
Browse files

Include cfg changes from production.


Signed-off-by: David Seaward's avatarDavid Seaward <david.seaward@puri.sm>
parents 3917e42b dba4ac6d
Pipeline #55119 failed with stages
in 2 minutes and 15 seconds
......@@ -10,7 +10,7 @@ dj-database-url = "==0.4.2"
django-agpl = "==4.0.0"
django-auth-ldap = "==1.3.0"
django-crispy-forms = "==1.7.0"
django-extensions = "==1.9.9"
django_extensions = "==2.2.9"
django-ldapdb = "==1.0.0"
django-registration = "==2.4.1"
jinja2-django-tags = "==0.5"
......@@ -33,7 +33,6 @@ matplotlib = "==3.1.2"
[dev-packages]
twine = "==1.12.1"
pylint = "*"
django_extensions = "*"
pydotplus = "*"
flake8 = "*"
volatildap = "*"
......@@ -41,3 +40,7 @@ httmock = "*"
[requires]
python_version = "3"
[packages.e1839a8]
path = "."
editable = true
This diff is collapsed.
......@@ -35,12 +35,38 @@ Models
Model diagram generated with:
./ldh_middleware graph_models --all-applications --group-models \
--verbose-name --output models.png
```
pipenv run keel graph_models --all-applications --group-models \
--verbose-name --output models.png
```
Requires GraphViz (`apt install graphviz`) and dev dependencies
(`pipenv install --dev`).
Operator scripts
----------------
Define operator scripts in an indepedent folder, following
[RunScript](https://django-extensions.readthedocs.io/en/latest/runscript.html)
conventions.
Create a symlink from the Django site to the scripts folder:
```
cd ldh_middleware
ln -sf /path/to/scripts ./scripts
```
Invoke scripts as follows:
```
pipenv run keel runscript hello_world
# invokes the `hello_world` script
```
You can now maintain operator scripts independently of deployments.
Build wheel package (and optionally upload)
-------------------------------------------
......@@ -143,9 +169,9 @@ sudo systemctl stop slapd.service && systemctl status slapd.service
Sharing and contributions
-------------------------
Keel (LDH middleware)
<https://source.puri.sm/liberty/ldh_middleware>
Copyright 2017-2019 Purism SPC
Keel (LDH middleware)
<https://source.puri.sm/liberty/ldh_middleware>
Copyright 2017-2020 Purism SPC
SPDX-License-Identifier: AGPL-3.0-or-later
Shared under AGPL-3.0-or-later. We adhere to the Community Covenant
......
......@@ -2,7 +2,8 @@
import os
import sys
if __name__ == "__main__":
def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "middleware.settings")
try:
from django.core.management import execute_from_command_line
......@@ -20,3 +21,7 @@ if __name__ == "__main__":
)
raise
execute_from_command_line(sys.argv)
if __name__ == "__main__":
main()
import ldap
import strictyaml
import purist.limitmonitor
from decouple import Config, Csv, RepositoryIni
from django_auth_ldap.config import LDAPSearch
import purist.limitmonitor
from .settings_original import *
#
......@@ -71,9 +72,28 @@ INSTALLED_APPS += ["crispy_forms",
AGPL_ROOT = os.path.abspath(os.path.dirname(__file__) + "/..")
# no special exclusions are required, configuration and secrets are not stored in the site folder
# cross-check with .gitignore
AGPL_EXCLUDE_DIRS = [
r'^CVS$',
r'^site_media$',
r'^uploads$',
r'\.git$',
r'\.svn$',
r'\.idea$',
r'\.kdev4$',
r'\scripts$',
]
AGPL_EXCLUDE_FILES = [
r'^site_settings.py$',
r'^local_settings.py$',
r'^\.gitignore$',
r'\.pyc$',
r'\.sql$',
r'\.sqlite$',
r'^categories.json$',
r'^confusables.json$',
]
AGPL_FILENAME_PREFIX = 'middleware'
......
models.png

356 KB | W: | H:

models.png

413 KB | W: | H:

models.png
models.png
models.png
models.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -24,7 +24,7 @@ install_requires =
django-agpl==4.0.0
django-auth-ldap==1.3.0
django-crispy-forms==1.7.0
django-extensions==1.9.9
django-extensions==2.2.9
django-ldapdb==1.0.0
django-registration==2.4.1
django==1.11.20
......@@ -39,6 +39,7 @@ install_requires =
django-simple-captcha==0.5.10
djangorestframework==3.9.2
django-password-reset==2.0
psycopg2-binary==2.8.2
matplotlib ==3.1.2
[options.data_files]
......@@ -53,6 +54,9 @@ config_sample/uwsgi_emperor_vassals =
config_sample/supervisor =
config_sample/supervisord/purist_middleware_monitor.conf
[options.entry_points]
console_scripts =
keel = manage:main
# NOTE: setuptools are deprecating the test command in favor of utilities like tox
[options.extras_require]
......
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