Solawi Suite Platform
Development Key
DO NOT USE IN PRODUCTION!
0x3739d20117be06f317d31bf30296b563e37a1a5ef6299a0e920675288f920627
Use as environment variable during development:
SOLAWI_SUITE_SECRET_KEY=0x3739d20117be06f317d31bf30296b563e37a1a5ef6299a0e920675288f920627
Deployment steps
git submodule update
git submodule foreach --recursive git clean -id
poetry install --without dev
poetry run manage.py migrate
(cd 3rdparty; yarn install)
(cd documentation; poetry run mkdocs build)
poetry run manage.py collectstatic
supervisorctl restart solawi_suite
Important Cron Jobs
MAILTO="administrator@solawi-system"
DJANGO_SETTINGS_MODULE="solawi_platform.production_settings"
SOLAWI_SUITE_SECRET_KEY=file:///path/to/secret_key.hex
PATH=/usr/local/bin
SOLAWI_SUITE_HOME=/path/to/solawi-suite/platform
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * command to be executed
# * * * * * command --arg1 --arg2 file1 file2 2>&1
11 4 * * * (cd $SOLAWI_SUITE_HOME; poetry run manage.py cleanup_burned_otp)
*/7 * * * * (cd $SOLAWI_SUITE_HOME; poetry run manage.py cleanup_forgot_password)
*/9 * * * * (cd $SOLAWI_SUITE_HOME; poetry run manage.py cleanup_pending_registrations)
*/13 * * * * (cd $SOLAWI_SUITE_HOME; poetry run manage.py cleanup_rate_limiter)
33 3 * * * (cd $SOLAWI_SUITE_HOME; poetry run manage.py clearsessions)
Testing
Installation
poetry install --without prod
poetry run rfbrowser init
(cd 3rdparty; yarn install)
(cd documentation; poetry run mkdocs build)
poetry run manage.py collectstatic
Unit Tests
poetry run manage.py test
System Test
poetry run robot -A SystemTest/robot.args.conf SystemTest/TestCases
yarn dlx allure-commandline generate uat-test-results/allure
# or
yarn dlx allure-commandline serve uat-test-results/allure
System Test (parallel)
poetry run pabot --processes 4 --command robot -A SystemTest/robot.args.conf --end-command --output-dir uat-test-results --xunit xunit.xml SystemTest/TestCases
yarn dlx allure-commandline generate uat-test-results/allure
# or
yarn dlx allure-commandline serve uat-test-results/allure
Load Test
TODO: locust
Description
Languages
JavaScript
63.1%
Fluent
22.9%
Python
7.1%
HTML
4.7%
CSS
1.9%
Other
0.2%