infra:services:hula
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| infra:services:hula [2025/12/28 12:47] – atluxity_idp.hackeriet.no | infra:services:hula [2026/07/21 16:16] (current) – atluxity_idp.hackeriet.no | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Hacker-hula ====== | ====== Hacker-hula ====== | ||
| + | |||
| + | |||
| + | ==== Adding a new member user ===== | ||
| + | |||
| + | Hula is a Django application. New users are added through the Django admin. | ||
| + | |||
| + | The practical admin flow is: | ||
| + | |||
| + | - Open the Hula Django admin. | ||
| + | - Go to users and click add user. | ||
| + | - Set the username. | ||
| + | - Set a temporary password. | ||
| + | - Exchange the temporary password with the user out-of-band and tell them to change it after logging in. | ||
| + | - Set the e-mail address. This is important: Hacker-ID / IDP enrollment depends on the user having an e-mail address in Hula. | ||
| + | - Fill required fields. At the moment address is required even when we do not have a useful address; the current workaround is to put '' | ||
| + | - Save the user. | ||
| + | |||
| + | After the Hula user exists, the member can start Hacker-ID onboarding from: | ||
| + | |||
| + | * https:// | ||
| + | |||
| + | === RFID / door access card === | ||
| + | |||
| + | If the new member should get door access through the door system Hula controls: | ||
| + | |||
| + | - Get an RFID card from the safe. | ||
| + | - Watch the door daemon logs while presenting the card to the door reader: | ||
| + | |||
| + | < | ||
| + | ssh bac-door1.hackeriet.no "sudo journalctl -u doord -f" | ||
| + | </ | ||
| + | |||
| + | - The door system logs continuously while it looks for card information. | ||
| + | - Present the unregistered card to the door lock. | ||
| + | - Look for the '' | ||
| + | - Put that card number into the Hula Django field named '' | ||
| + | - Save the user/member record. | ||
| Line 9: | Line 46: | ||
| Go to the checkout as `hackerhula` via `root` | Go to the checkout as `hackerhula` via `root` | ||
| - | < | + | < |
| sudo su - | sudo su - | ||
| su - hackerietweb -s /bin/bash | su - hackerietweb -s /bin/bash | ||
| Line 17: | Line 54: | ||
| If you've made migrations, run this | If you've made migrations, run this | ||
| - | < | + | < |
| poetry run ./manage.py migrate | poetry run ./manage.py migrate | ||
| </ | </ | ||
| If you've changed static files, run this | If you've changed static files, run this | ||
| - | < | + | < |
| Back to root we go | Back to root we go | ||
| - | < | + | < |
| Restart the appserver | Restart the appserver | ||
| - | < | + | < |
| and bob's your uncle | and bob's your uncle | ||
| Line 48: | Line 85: | ||
| | | | | | | ||
| | Hackeriet bank account | | | Hackeriet bank account | | ||
| - | | (Cultura) | + | | (Cultura) |
| | | | | | | ||
| +-----------+------------+ | +-----------+------------+ | ||
| Line 78: | Line 115: | ||
| === How to perform an API export to JSON file for sync of payment status === | === How to perform an API export to JSON file for sync of payment status === | ||
| - | < | + | |
| - | atluxity@hostname: | + | See also https:// |
| - | atluxity@hostname: | + | |
| - | atluxity@hostname: | + | The Fiken API token is stored in the password manager. `hackerpass fiken/ |
| - | atluxity@hostname: | + | To avoid storing the token in plaintext in `.env`, pipe it directly into the vault helper: |
| - | (env) atluxity@hostname: | + | |
| - | (env) atluxity@hostname: | + | < |
| + | atluxity@hostname: | ||
| + | atluxity@hostname: | ||
| + | atluxity@hostname: | ||
| + | atluxity@hostname: | ||
| + | (env) atluxity@hostname: | ||
| + | (env) atluxity@hostname: | ||
| + | Encryption password: | ||
| + | Confirm encryption password: | ||
| + | Updated .env with FIKEN_API_VAULT | ||
| + | (env) atluxity@hostname: | ||
| </ | </ | ||
| - | You now have a json file! Next step is possible. | + | You now have a json file! Next step is possible. TAKE CARE, there is currently too much PII in the file. Do not leave it unattented. |
| === How to Import to Hula DB via manual script === | === How to Import to Hula DB via manual script === | ||
| + | |||
| + | See also https:// | ||
| < | < | ||
| Line 95: | Line 144: | ||
| hackerietweb@blade: | hackerietweb@blade: | ||
| hackerietweb@blade:/ | hackerietweb@blade:/ | ||
| - | (hackerhula-py3.11) | + | (hackerhula-py3.11) |
| + | (hackerhula-py3.11) hackerietweb@blade:/ | ||
| + | atluxity@blade: | ||
| + | </ | ||
| + | |||
| + | TAKE CARE, the json file has too much PII etc, do not leave it unattended. | ||
| + | |||
| + | === Reporting on payments stored in Hula === | ||
| + | To sanity check, or whatever, a small stats command was created to be run in the same way as the sync command above. | ||
| + | < | ||
| + | (hackerhula-py3.11) hackerietweb@blade:/ | ||
| + | usage: manage.py payments_stats [-h] [--from DATE_FROM] [--to DATE_TO] [--last-months LAST_MONTHS] [--last-1-months] [--last-3-months] [--last-6-months] [--last-12-months] | ||
| + | [--format {text, | ||
| + | [--skip-checks] | ||
| + | |||
| + | Report payment statistics from the database | ||
| + | |||
| + | options: | ||
| + | -h, --help | ||
| + | --from DATE_FROM | ||
| + | --to DATE_TO | ||
| + | --last-months LAST_MONTHS | ||
| + | Last N months (e.g. --last-months 3) | ||
| + | --last-1-months | ||
| + | --last-3-months | ||
| + | --last-6-months | ||
| + | --last-12-months | ||
| + | --format {text, | ||
| + | --version | ||
| + | -v {0,1,2,3}, --verbosity {0,1,2,3} | ||
| + | Verbosity level; 0=minimal output, 1=normal output, 2=verbose, 3=very verbose | ||
| + | --settings SETTINGS | ||
| + | --pythonpath PYTHONPATH | ||
| + | A directory to add to the Python path, e.g. "/ | ||
| + | --traceback | ||
| + | --no-color | ||
| + | --force-color | ||
| + | --skip-checks | ||
| </ | </ | ||
/srv/hackeriet-wiki/dokuwiki/data/attic/infra/services/hula.1766926076.txt.gz · Last modified: by atluxity_idp.hackeriet.no