Learner account management: - learner-add.sh: create accounts with SSH, plugin skeleton - learner-remove.sh: remove accounts with optional archive - plugin-skeleton template: starter maubot plugin Testing: - flake.nix: add checks output for pre-deploy validation - smoke-test.sh: post-deploy service verification Documentation: - learner-onboarding.md: VS Code Remote-SSH setup guide - learner-admin.md: account management procedures Skills: - code-review.md: multi-lens code review skill - orch, worklog: symlinks to shared skills
2.1 KiB
2.1 KiB
Learner Account Administration
Guide for managing learner accounts on the maubot development server.
Adding a Learner
-
Get the learner's SSH public key (they run
cat ~/.ssh/id_ed25519.pub) -
SSH to the server and run:
sudo /path/to/scripts/learner-add.sh <username> '<ssh-public-key>'Example:
sudo ./scripts/learner-add.sh alice 'ssh-ed25519 AAAAC3... alice@laptop' -
The script will output onboarding instructions - send these to the learner.
What Gets Created
- Unix user account with SSH access
~/plugins/hello_<username>/- starter maubot plugin- The plugin includes a working hello/ping bot
Removing a Learner
sudo ./scripts/learner-remove.sh <username>
With archive (saves home directory before deleting):
sudo ./scripts/learner-remove.sh <username> --archive
Archives are saved to /var/backups/learners/.
Maubot Setup (One-Time)
After adding the first learner, set up the shared test environment:
-
Create a Matrix bot user for learners (via Element or API)
-
In maubot admin (http://localhost:29316):
- Add the bot user as a client
- Learners will create instances using this client
-
Create
#learners-sandboxroom:- Create the room in Matrix
- Invite the bot user
- Give learners the room ID/alias
Monitoring
Check Learner Plugin Status
# See what plugins are loaded
curl -s http://localhost:29316/_matrix/maubot/v1/plugins \
-H "Authorization: Bearer <token>" | jq
View Learner Directories
ls -la /home/*/plugins/
Check Maubot Logs
journalctl -u maubot -f
Troubleshooting
Learner Can't Connect
- Verify user exists:
id <username> - Check SSH key:
cat /home/<username>/.ssh/authorized_keys - Check SSH logs:
journalctl -u sshd | grep <username>
Plugin Won't Load
- Check file permissions:
ls -la /home/<username>/plugins/ - Verify .mbp file structure:
unzip -l /home/<username>/plugins/*/dist/*.mbp
Disk Space
Monitor learner disk usage:
du -sh /home/*/