LocalAuthority / agents.md
Newer Older
59 lines | 2.517kb
Bogdan Timofte authored a week ago
1
# Agent Notes
2

            
3
Madagascar Local Authority is the local authority application for the Madagascar network.
4

            
5
Start with these documents:
6

            
7
- [README.md](README.md) - current repository, deployment model, runtime paths, GitPrep remote.
Bogdan Timofte authored 4 days ago
8
- [.doc/database.md](.doc/database.md) - SQLite runtime store schema, seed rules, backup and restore.
Bogdan Timofte authored a week ago
9
- [.doc/host-manager.md](.doc/host-manager.md) - application behavior, OTP, Work Orders, local CA, registry rules.
10
- [.doc/local-hosts.md](.doc/local-hosts.md) - local DNS rules, resolver sync, source priority.
11
- [.doc/development-log.md](.doc/development-log.md) - scope and architecture decisions over time.
12

            
13
Operational rules:
14

            
15
- Develop in this checkout: `/Users/bogdan/Documents/Workspaces/Xdev/Madagascar/LocalAuthority`.
16
- Canonical git remote is GitPrep: `git@192.168.2.102:repositories/bogdan/LocalAuthority.git`.
17
- Jumper is the runtime/deployment target, not the primary editing location.
Bogdan Timofte authored 4 days ago
18
- Development work must be committed locally before testing or archiving; do not leave useful changes as forgotten dirty working-tree state.
19
- Push committed code to `jumper-runtime` for live testing on jumper.
20
- Push committed code to `origin`/GitPrep for archival/canonical history.
21
- `scripts/deploy_to_jumper.sh` is available for explicit rsync deploys, but the normal development loop is commit plus push.
Bogdan Timofte authored 4 days ago
22
- Runtime registry and Work Orders live in `var/host-manager.sqlite` on jumper.
23
- Do not deploy `config/` unless the user explicitly asks to replace seed/snapshot/export files.
24
- Treat `config/hosts.yaml`, `config/local-hosts.tsv`, and `config/work-orders.yaml` as compatibility exports/seeds, not the live source of truth.
Bogdan Timofte authored a week ago
25
- Do not install npm, pip, or CPAN packages directly on hosts. Distribution packages are acceptable when needed.
26
- Perl from the distribution and core/distribution modules are allowed.
Bogdan Timofte authored 4 days ago
27
- CPAN modules are allowed only after requesting an audit and RPM packaging for the local audited repository.
Bogdan Timofte authored a week ago
28
- Secrets live outside git, mainly under `/etc/xdev/host-manager.env` on jumper.
29

            
30
Before code changes:
31

            
32
```bash
33
git status --short
34
```
35

            
36
Before deployment:
37

            
38
```bash
39
perl -c scripts/host_manager.pl
Bogdan Timofte authored 4 days ago
40
perl -c scripts/mdns_host_seed.pl
Bogdan Timofte authored a week ago
41
```
42

            
Bogdan Timofte authored 4 days ago
43
Normal live-test deployment after a committed change:
Bogdan Timofte authored a week ago
44

            
45
```bash
Bogdan Timofte authored 4 days ago
46
git push jumper-runtime HEAD:main
47
```
48

            
49
Archive/canonical push:
50

            
51
```bash
52
git push origin main
Bogdan Timofte authored a week ago
53
```
54

            
55
After deployment, verify:
56

            
57
```bash
58
ssh jumper.madagascar.xdev.ro 'systemctl is-active host-manager && curl -fsS http://127.0.0.1:8088/healthz >/dev/null'
59
```