|
Bogdan Timofte
authored
a day 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.
|
|
|
17
|
- Deploy application code with `scripts/deploy_to_jumper.sh`.
|
|
|
18
|
- Do not deploy `config/` unless the user explicitly asks to replace runtime registry data.
|
|
|
19
|
- Treat `config/hosts.yaml`, `config/local-hosts.tsv`, and `config/work-orders.yaml` as operational data that may be changed by the live app.
|
|
|
20
|
- Do not install npm, pip, or CPAN packages directly on hosts. Distribution packages are acceptable when needed.
|
|
|
21
|
- Perl from the distribution and core/distribution modules are allowed.
|
|
|
22
|
- CPAN dependencies must come from the audited local repository if they become necessary.
|
|
|
23
|
- Secrets live outside git, mainly under `/etc/xdev/host-manager.env` on jumper.
|
|
|
24
|
|
|
|
25
|
Before code changes:
|
|
|
26
|
|
|
|
27
|
```bash
|
|
|
28
|
git status --short
|
|
|
29
|
```
|
|
|
30
|
|
|
|
31
|
Before deployment:
|
|
|
32
|
|
|
|
33
|
```bash
|
|
|
34
|
perl -c scripts/host_manager.pl
|
|
|
35
|
scripts/deploy_to_jumper.sh --dry-run --allow-dirty
|
|
|
36
|
```
|
|
|
37
|
|
|
|
38
|
Normal deployment after a committed change:
|
|
|
39
|
|
|
|
40
|
```bash
|
|
|
41
|
scripts/deploy_to_jumper.sh
|
|
|
42
|
```
|
|
|
43
|
|
|
|
44
|
After deployment, verify:
|
|
|
45
|
|
|
|
46
|
```bash
|
|
|
47
|
ssh jumper.madagascar.xdev.ro 'systemctl is-active host-manager && curl -fsS http://127.0.0.1:8088/healthz >/dev/null'
|
|
|
48
|
```
|