Commit Graph

20 Commits

Author SHA1 Message Date
8c08b4b806 fix(custodian-agent): dedicated playbook, correct working dir
- ansible/playbooks/custodian-agent.yaml: minimal playbook with only
  the custodian_agent role — avoids loading base/sops_agent/etc when
  all we need is key injection
- Makefile: use custodian-agent.yaml in provision targets; remove
  --tags workaround (was fragile; standalone playbook is correct)

Manual invocation (from CoulombCore):
  cd ~/railiance-infra/ansible
  ansible-playbook playbooks/custodian-agent.yaml -u tegwick --limit Railiance01

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 02:20:33 +01:00
30a3f908aa feat(custodian-agent): Ansible role + Makefile for Custodian SSH identity
Establishes a dedicated SSH keypair for the Custodian automation agent:
- ansible/roles/custodian_agent/: authorized_key task (tagged custodian_agent)
- ansible/inventory/group_vars/all.yaml: custodian_agent_user/pubkey vars
- ansible/playbooks/bootstrap.yaml: custodian_agent role added
- Makefile: provision-custodian-agent / provision-custodian-agent-host targets

Keypair generation: cd ~/the-custodian && make custodian-keygen
Then deploy:        cd ~/railiance-infra && make provision-custodian-agent

The private key lives at ~/.ssh/id_custodian_agent — never committed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:21:57 +01:00
0433453806 feat(backup): implement S1 integrated backup (Q3/D4)
tools/cmd/railiance-backup-s1:
  - OS config snapshot: sshd, ufw, fail2ban, hosts, apt sources
  - installed packages list
  - age-encrypted, output: /opt/backup/railiance/infra/
  - requires root, no network dependency

Makefile: add `make backup` target

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 21:18:05 +01:00
558d2d9677 chore(makefile): remove tunnel target (moved to the-custodian state-hub)
The reverse SSH tunnel is State Hub infrastructure, not infra-layer
tooling. Use: cd ~/the-custodian/state-hub && make tunnel HOST=user@host

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 01:19:43 +01:00
703c57d91c chore(rename): railiance-hosts → railiance-infra
Update all operational references to reflect the new repo name per
ADR-003 (OAS S1 Infrastructure Substrate). Historical text in ADRs
and state-hub-inbox files preserved as-is. Gitea remote URL updated
locally (Gitea repo rename is a manual step).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 00:34:18 +01:00
15bb2978cc feat(tunnel): add make tunnel target; complete WP-0001
- Add `make tunnel` to Makefile: reads first host from
  inventory/servers.yaml and opens a reverse SSH tunnel
  forwarding local state-hub (port 8000) to the remote host
- Mark T02 done and close WP-0001 (all tasks complete)
- WP-0002 T01/T02 task IDs backfilled by consistency checker

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 19:53:10 +01:00
6bb953090c feat: datetime reports, auto-commit on verify, register pruning EP
- Include time in TAP report filename (ISO 8601: date + HHmmssZ)
- Add changed_when: false to report write task — verify play now shows
  changed=0 on a clean run (all green recap)
- make verify auto-commits new reports to repo after a passing run;
  exits non-zero before committing if assertions fail
- Register EP-RAIL-001: report pruning extension point for future
  implementation when reports/ accumulates beyond a threshold

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 16:44:06 +00:00
8f5799553e feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
  (packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
  runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
2be5de2a3a feat: add server baseline spec, status command, and test suite workplan
- Fix duplicate `converge` Makefile target (was causing warnings)
- Fix `make status` SSH hardening check (use grep on sshd_config instead
  of sshd -T which fails without hostkeys)
- Add `make status` target with connectivity, UFW, fail2ban, SSH checks
- Add spec/server-baseline.yaml — authoritative target-state spec for
  all managed nodes (firewall, SSH, services, packages, users)
- Add workplan RAIL-HO-WP-0002 for Goss test suite and repo boundary ADR

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 11:10:27 +00:00
6957614fd7 feat: add make targets for convergence 2025-09-14 02:23:03 +00:00
43455a4481 feat: add terraform-providers targets 2025-09-14 01:31:03 +00:00
1da97ad867 build: first successfull plan, apply, destroy of server 2025-09-14 01:20:54 +00:00
94b9bba11d fix: use the apikey 2025-09-14 00:24:48 +00:00
7547513738 fix: apikey loading was broken 2025-09-14 00:11:27 +00:00
59283fff6d fix: load api-key from secrets 2025-09-13 23:57:54 +00:00
17c9963c0f fix: doctor target reports terraform now 2025-09-13 23:37:34 +00:00
77c1323ae5 fix: Makefile target hooks makes precommit work finally 2025-09-13 21:58:19 +00:00
2bcf4d2fda fix: broken inlining of python block moved to script 2025-09-13 23:46:48 +02:00
bde4d85a52 chore: extended makefile with hooks target to set up pre-commit 2025-09-13 23:34:27 +02:00
9860735f82 feat: initial import of RailianceHosts starter 2025-09-13 20:26:11 +02:00