Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Seaward
Keel - LDH Middleware
Commits
d23dce95
Commit
d23dce95
authored
May 07, 2020
by
David Seaward
Browse files
Include cfg changes from production.
Signed-off-by:
David Seaward
<
david.seaward@puri.sm
>
parents
3917e42b
dba4ac6d
Pipeline
#55118
failed with stages
in 2 minutes and 28 seconds
Changes
7
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Pipfile
View file @
d23dce95
...
...
@@ -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
Pipfile.lock-Debian_stable
deleted
100644 → 0
View file @
3917e42b
This diff is collapsed.
Click to expand it.
README.md
View file @
d23dce95
...
...
@@ -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-20
19
Purism SPC
Keel (LDH middleware)
<https://source.puri.sm/liberty/ldh_middleware>
Copyright 2017-20
20
Purism SPC
SPDX-License-Identifier: AGPL-3.0-or-later
Shared under AGPL-3.0-or-later. We adhere to the Community Covenant
...
...
manage.py
View file @
d23dce95
...
...
@@ -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
()
middleware/settings.py
View file @
d23dce95
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
View replaced file @
3917e42b
View file @
d23dce95
356 KB
|
W:
|
H:
413 KB
|
W:
|
H:
2-up
Swipe
Onion skin
setup.cfg
View file @
d23dce95
...
...
@@ -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]
...
...
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