LocalAuthority / agents.md
Newer Older
58 lines | 2.415kb
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.
8
- [.doc/host-manager.md](.doc/host-manager.md) - application behavior, OTP, Work Orders, local CA, registry rules.
9
- [.doc/local-hosts.md](.doc/local-hosts.md) - local DNS rules, resolver sync, source priority.
10
- [.doc/development-log.md](.doc/development-log.md) - scope and architecture decisions over time.
11

            
12
Operational rules:
13

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

            
29
Before code changes:
30

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

            
35
Before deployment:
36

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

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

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

            
48
Archive/canonical push:
49

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

            
54
After deployment, verify:
55

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