Commit Graph
87 Commits
Author SHA1 Message Date
root cd062e7b63 docs(audit): log F6-2 self-service registration implementation 2026-10-13 12:10:41 +03:00
root 5515e26462 feat(f6-2/self-service): implement user registration via Telegram and Authentik
- Added canonical n8n workflow to workflows/n8n/ (SSOT compliance).
- Integrated Telegram Bot API for admin approval/denial via inline keyboards.
- Implemented Authentik Core API integration to dynamically create active users.
- Resolved critical technical constraints for audit compliance:
  * Fixed Telegram 'callback_data' 64-byte limit by optimizing payload format.
  * Resolved Authentik API 405 errors by enforcing trailing slash in endpoint URL.
  * Explicitly defined HTTP headers to prevent n8n import stripping.

Definition of Done (F6-2) Met:
- [x] Test user created via self-service flow.
- [x] Owner received enrollment link and instructions in Telegram.
- [x] Workflow committed to Git (workflows-as-code).

Closes #F6-2
Related: Sprint F6 v2, Phase 4.1 Automation Roadmap
2026-10-13 12:10:36 +03:00
root 2bbcf61803 chore(audit): auto-snapshot and CHANGELOG update 2026-10-13
- LXC running: 0/0
- Alerts (24h):
- Disk PVE: 15%
2026-10-13 09:00:01 +03:00
root dfe3eac57d docs(F6-1): add update-manager runbook and audit report
- Documented safe-update.sh v1.2 workflow
- Documented baseline versions and rollback mechanism
- Marked F6-1 as complete
2026-10-09 16:12:33 +03:00
root 80f2d5e0ab feat(F6-1): safe-update.sh v1.2 with rollback support
- HTTP 401/403 accepted as healthy (auth-required services)
- Support for services without docker-compose (docker pull + restart)
- Native services support (PostgreSQL, Headscale)
- Auto-rollback on healthcheck failure (< 5 min)
- Tested on gitea (CT 140): success
2026-10-09 16:08:33 +03:00
root 4fd21a19bb chore(update): gitea updated successfully
- Type: docker
- CT: 140
- Version: 4c697a48a247
- Snapshot: pre-update-20261009-160526
- Healthcheck: OK (HTTP code accepted)
2026-10-09 16:05:54 +03:00
root 5e3f8f8649 chore(baseline): фиксация текущих версий всех 28 сервисов
- Docker сервисов: 26
- Native сервисов: 2
- Snapshot: 2026-10-09
- Используется для отката при провале обновлений
2026-10-09 16:01:45 +03:00
root 4656f9e419 feat(V-0): VLESS VPN infrastructure deployed on VPS
- Xray 26.3.27 with VLESS + TLS + TCP on port 10443
- Let's Encrypt certificate for git.buryans.ru
- NAT configured for outbound traffic routing
- 5 user profiles with unique UUIDs
- Port 10443 opened in provider firewall
- Runbook and audit report added
2026-10-09 15:33:00 +03:00
root 3c7ecd7e36 chore(audit): auto-snapshot and CHANGELOG update 2026-10-09
- LXC running: 0/0
- Alerts (24h):
- Disk PVE: 15%
2026-10-09 09:00:02 +03:00
root 07dd6dc8a2 plan(F6): Sprint F6 v2 registered - Safe Updates & Self-Service
- F6-2 now: Self-Service Registration via Authentik (owner approval in Telegram)
- Authentik added to update registry as critical service
- Update pipeline: backup -> update -> healthcheck -> fix/auto-rollback
- Proactive monitoring: certs <14d, disks >85%
- Target baseline: v1.4
2026-10-08 22:32:11 +03:00
root d6be429f7f feat(F5-3): OFFICIALLY CLOSED - Retrospective and Baseline v1.3 established
- Documented final state of Phase 5 (Audit & Transparency)
- Defined infrastructure baseline v1.3 metrics and achievements
- All automation, monitoring, and backup goals met
2026-10-08 22:00:39 +03:00
root 1175f112b7 feat(F5-2): OFFICIALLY CLOSED - Weekly audit report automation
- Implemented ops/weekly-report.sh to gather 7-day stats (alerts, commits, uptime, LXC)
- Automated Gitea Issue creation via API with 'weekly-report' and 'audit' labels
- Added webhook placeholder for Matrix/Telegram notifications
- Scheduled weekly execution via cron (Sundays at 20:00)
2026-10-08 21:59:25 +03:00
root 3792b1dfe3 feat(F5-1): OFFICIALLY CLOSED - Automated audit script and CHANGELOG update
- Implemented ops/audit.sh for sub-second system state snapshotting
- Automated CHANGELOG.md updates with daily metrics (LXC, alerts, disk, git)
- Verified auto-commit and auto-push to Gitea main branch
- Scheduled daily execution via cron at 09:00
- Added supporting scripts to version control (audit.sh, backup.sh)
2026-10-08 21:57:11 +03:00
root 811704966b chore(audit): auto-snapshot and CHANGELOG update 2026-10-08
- LXC running: 28/29
- Alerts (24h): 14
- Disk PVE: 15%
2026-10-08 21:52:40 +03:00
root 3db66958ba feat(F4-5): OFFICIALLY CLOSED - node_exporter & postgres_exporter deployed to all CTs
- Automated mass installation script executed successfully across 28+ LXC containers
- node_exporter (port 9100) deployed and enabled via systemd on all CTs
- postgres_exporter (port 9187) deployed on CT 151 with secure socket auth
- Verified metric exposure: Prometheus now has full observability over all infrastructure
2026-10-08 21:50:05 +03:00
root 319c97794d feat(F4-4): OFFICIALLY CLOSED - Grafana to n8n alert webhook tested and working
- Fixed JSON parsing to correctly handle n8n webhook payload wrapping (payload.body)
- Verified end-to-end delivery to Telegram with proper HTML formatting
- Grafana Contact Point configured declaratively via provisioning
2026-10-08 21:42:46 +03:00
root f030e82bb8 feat(F4-4): OFFICIALLY CLOSED - Grafana to n8n alert webhook channel
- Created n8n webhook listener for Prometheus/Grafana alerts
- Implemented smart parsing for both Grafana and Alertmanager payload formats
- Configured Grafana Contact Point declaratively via provisioning
- Alerts are now formatted and sent to Telegram consistently
2026-10-08 21:32:35 +03:00
root f6a3dab695 feat(F4-3): OFFICIALLY CLOSED - Grafana Prometheus datasource configured
- Verified network connectivity between Grafana (CT 113) and Prometheus (CT 134)
- Applied declarative datasource provisioning via pct push
- Restarted Grafana to apply configuration
- Datasource is now set as default and ready for dashboards/alerts
2026-10-08 21:18:33 +03:00
root ad4053db7e feat(F4-1): OFFICIALLY CLOSED - backup.sh implemented and versioned
- Automated pg_dump for buryan_monitoring
- Automated n8n workflows export via CLI
- Cron schedule configured (daily at 03:30)
- Git tracking configured for JSON workflows (SQL ignored)
2026-10-08 21:14:57 +03:00
root 0f07ad3093 feat(F4-2): Restore-drill completed successfully
- Tested SQL dump restoration in isolated sandbox
- Verified data integrity:
  * alert_history: 14 rows restored
  * host_states: 33 rows restored
- Confirmed RTO ≤ 4h is achievable
- Backup process validated end-to-end
2026-10-08 21:13:28 +03:00
root f3dba584ff chore(backup): track n8n workflows JSON in Git
- Added exception to .gitignore for n8n JSON exports
- SQL dumps remain local to prevent repo bloat
- Latest workflows snapshot included
2026-10-08 21:06:38 +03:00
root bd145c8914 chore(backup): add n8n workflows export to version control
- Ignoring heavy .sql dumps in Git to prevent repo bloat
- SQL dumps are safely stored locally in ops/backups/
2026-10-08 21:05:36 +03:00
root 2e0a1722e3 🏆 SPRINT F3 COMPLETE! All 4 tasks done (100%)
- F3-1: Dedup (1 msg vs 153) ✅
- F3-2: Runbooks (60+ services) ✅
- F3-3: Bug fixes (4 bugs) ✅
- F3-4: SEV:1 escalations ✅

System is production-ready!
2026-10-08 20:55:55 +03:00
root 79ffdbf7af docs(F3-3): Add bugfix report and sprint status update
- Documented fixes for Unknown Monitor, Telegram duplicates, and queue clearing
- Added SPRINT-F3-STATUS.md for overall tracking
- F3-1, F3-2, F3-3 are now DONE. F3-4 is next.
2026-10-08 20:07:58 +03:00
root 5a62124410 feat(F3-2): Complete infrastructure audit & auto-generated runbooks
- Created comprehensive audit script (ops/audit-infrastructure.sh)
- Scanned all LXC containers and nested Docker services
- Generated infrastructure-inventory.json with full service map
- Auto-created runbook templates for all discovered services

Each runbook includes:
- LXC CT ID and Docker container name
- Port mappings and network info
- 5-step procedures (status, health, logs, restart, troubleshooting)

This provides complete operational documentation for the entire Buryan Hub infrastructure.
2026-10-08 18:04:18 +03:00
root 33bd9bf9e6 feat(F2-5, F3-1): Matrix Sprint + Dedup Layer
F2-5 - Matrix Integration:
- Added comprehensive runbook for Synapse/Coturn administration
- Added healthcheck script for Matrix API monitoring
- Added pre-audit design for Matrix-TG Bridge (Task 6-1)
- Deferred Bridge implementation to future sprint

F3-1 - Alert Deduplication:
- Implemented symptom-key based deduplication in Alert Queue Processor
- Added Gitea issue checking: create new or add comment to existing
- Grouped alerts by host (host_ip) to reduce spam
- Added automated queue cleanup after processing
- Integrated HTTP Telegram API (via VPS proxy) for reliability

Known Issues:
- Alert Queue Processor may send duplicate Telegram messages (2 instead of 1)
  when multiple hosts are affected. Documented in ops/KNOWN_ISSUES.md
  Fix planned in F3-3.

Technical Details:
- DB: buryan_monitoring (CT 151)
- Gitea: http://192.168.1.140:3000/root/buryan-hub
- Telegram: via https://193.233.210.184/tg-api/ proxy
2026-10-08 17:55:09 +03:00
root df25de8adf docs(audit): add pre-audit design document for Task 6-1 Matrix-TG Bridge
- Defined architecture (mautrix-telegram)
- Outlined prerequisites, implementation steps, and acceptance criteria
- Documented risks (E2EE, rate limiting) and next steps for future sprint
2026-10-07 21:56:47 +03:00
root 7a3e292c86 feat(F2-5): finalize Matrix Sprint integration
- Added runbook for Synapse/Coturn administration
- Added healthcheck script for Matrix API monitoring
- Documented completion of F2-5, deferred Bridge to future sprint
2026-10-07 21:52:44 +03:00
root 72c48ded12 docs: add F2-3 Remediation API post-mortem and audit report
- Documented architecture, artifacts, and success metrics
- Noted LXC+Docker cgroup locking behavior for future fix (Variant B)
- Formalized the completion of the secure agent control channel
2026-10-07 20:14:52 +03:00
root 3f35fd5b47 docs: auto-generate runbooks for all discovered services from services_map.json 2026-10-07 19:33:20 +03:00
root 269a237cc2 feat: commit final working comms-agent code (F2-2, F2-4)
- Added base64-decoding for Gitea API runbook reading
- Implemented 30s heartbeat to agent_registry (PG CT 151)
- Strictly excluded .env and __pycache__ from version control
- Fulfills 'Everything as Code' principle from MASTER-PLAN
2026-10-07 19:33:20 +03:00
root b2dd85782e Merge pull request 'Monitoring Sprint: 53 monitors + self-healing + push-notifications' (#22) from sprint/matrix-2026-09 into main 2026-10-07 14:01:12 +00:00
root 5f86ad4200 docs: add initial runbook for matrix service (CT 104) 2026-10-07 16:52:27 +03:00
root 15b79e0b5b feat: formalize comms-agent and initialize agent_registry (F2-1)
- Populated agents/REGISTRY.md with 8 planned agents
- Created first agent charter: CHARTER-comms-agent.md (Telegram Bot)
- Added SQL init script for agent_registry table in PG (CT 151)
- Registered comms-agent as 'active' in the database
2026-10-07 12:38:50 +03:00
root eee86a73e5 docs: establish core infrastructure policies (F1-2)
- Added issue-schema.md (YAML frontmatter, deduplication rules)
- Added change-management.md (Git-only changes, version pinning)
- Added backup-policy.md (RPO/RTO targets, mandatory restore-drill)
- Added secret-policy.md (Vaultwarden only, 90-day rotation, no secrets in Git)
2026-10-07 12:30:40 +03:00
root 694912984a chore: establish canonical repo structure and clean up Gitea spam (F1-1, F1-3)
- Created canonical directories: services/comms, agents, audit, workflows/n8n, policies
- Moved Telegram Admin Bot source to services/comms/telegram-admin-bot/
- Added base policy stubs and agent REGISTRY.md
- Bulk-closed and labeled 'auto:spam' all 'AUTO-FIX: Unknown Monitor DOWN' issues in Gitea
- .env strictly excluded from version control
2026-10-07 12:20:32 +03:00
root dc7efe3dd9 feat: add Telegram Admin Bot for infra monitoring and escalation
- Deployed on VPS (direct-emerald) with local danted SOCKS5 proxy
- Integrated read-only access to PostgreSQL (CT 151, host_states)
- Integrated read-only access to Gitea API (CT 140, issues)
- Foundation for F3-4 (Escalations) and F2 (Swarm Agents communication)
- .env strictly excluded from version control
2026-10-07 12:13:32 +03:00
root 7021b69c8a feat: add Telegram Admin Bot for infra monitoring and Gitea tracking
- Added async Python bot (aiogram 3.x) with /start, /status, /issues commands
- Integrated PostgreSQL (CT 151) and Gitea API (CT 140) read access
- Configured secure local SOCKS5 proxy (danted) for Telegram API access
- Excluded .env from version control for security best practices
2026-10-07 12:10:57 +03:00
root 8a30960d8e docs: explicitly note Gitea SQLite state and future Database Sprint
- Documented that CT 140 (Gitea) is currently on SQLite for stability
- Formalized the plan for a dedicated 'Database Sprint' for clean PG migration
- Ensures this technical context is not lost for future planning
2026-10-06 22:46:27 +03:00
root b77fa2dc6f chore: officially close Phase 1 (SSOT + Hygiene) in audit
- Documented completion of core policies and repo structure
- Formalized deferral of deep security hardening to dedicated sprint
- System baseline is now stable and ready for functional expansion
2026-10-06 22:43:45 +03:00
root a234ae3ff9 chore: officially close Phase 1 (SSOT + Hygiene) in audit
- Documented completion of core policies and repo structure
- Formalized deferral of deep security hardening to dedicated sprint
- System baseline is now stable and ready for functional expansion
2026-10-06 22:43:45 +03:00
root 7091b7af6d chore: defer SEC-4/5 to dedicated Security Hardening sprint
- Prioritizing functional stability and agent swarm deployment
- Security hardening (Vaultwarden integration) will be addressed in a future dedicated sprint
2026-10-06 22:42:25 +03:00
root 3654a33e4a chore(phase1): F1-3 progress - generated SEC-1 rotation passwords and mautrix audit
- Verified no duplicate workflows in n8n DB
- Generated cryptographically strong passwords for Matrix, Mealie, Authentik
- Documented mautrix token revocation steps
- Updated CHANGELOG.md with SEC-debts status
2026-10-06 22:39:56 +03:00
root 1a242878f9 feat(phase1): initial repo structure and core policies
- Added policies: issue-schema, change-mgmt, backup, secret
- Added agents/CHARTER-template.md
- Added audit/CHANGELOG.md

Ref: Epic #150, Phase 1 (SSOT + Hygiene)
2026-10-06 22:38:23 +03:00
root bb6d0bf4d5 audit: Gitea recovery report (rollback to stable SQLite)
- Diagnosed broken SQLite->PostgreSQL migration from 02.10
- Rolled back to stable gitea.db.migrated
- Created change request for clean PG migration in Phase 1 (Epic #150)
- Gitea API is now fully operational (HTTP 200)
2026-10-06 22:35:21 +03:00
root e0c08457bc audit: Gitea cleanup report (Phase 0 completed)
- Closed ~59 spam issues with label auto:spam
- Analyzed 44 historical spam issues
- Preserved 15 Matrix Sprint tasks
- Created audit report

Ref: MASTER-PLAN.md v1.2 §4 Phase 0
2026-10-06 21:41:36 +03:00
root d2ecee05bc feat(n8n): workflows-as-code — 4 canonical workflows under Git control
Closes Phase 0 of Foundation & Swarm sprint (#null).

Workflows:
- Buryan Health Monitor (webhook → host_states)
- Alert Queue Processor (cron 15min → Telegram)
- Uptime Kuma Self-Healing (webhook → Gitea issue)
- Gitea Task Dispatcher (webhook → Agent Swarm)

All workflows cleaned (del shared/activeVersion/versionId) for portability.

Ref: MASTER-PLAN.md v1.2 §4 Phase 0
2026-10-06 21:40:26 +03:00
root c2aae95ffb docs: Autonomous Infrastructure Swarm sprint report (Q4 2026) 2026-10-01 16:31:51 +03:00
root 5b23ea5b6e docs: final Matrix Sprint audit (bulk close confirmed tasks) 2026-10-01 16:24:35 +03:00
root 32c31d3c7e docs: Matrix Sprint report (final, 9/19 tasks closed, workflow deactivated) 2026-10-01 16:17:21 +03:00
root e13811b27b fix: correct Matrix Sprint report (9/19 tasks) + deactivate spam workflow 2026-10-01 16:15:40 +03:00
root 4f8684d2af docs: Matrix Sprint report (9/19 tasks, 47.4%) + cleanup AUTO-FIX spam 2026-10-01 16:13:36 +03:00
root f3e24bb7a8 docs: layered self-healing architecture 2026-09-28 16:54:40 +03:00
root c43c60a9cb Monitoring Sprint: 53 monitors + self-healing (end-to-end verified) + push-notifications 2026-09-28 14:38:08 +03:00
root f1b1d33972 docs: закрыть задачи #3, #4, #5, #21 (Matrix E2EE и Telegram мост работают) 2026-09-27 11:14:21 +03:00
root 2382814f45 auto-sync 2026-09-26-0400 2026-09-26 04:00:09 +03:00
root 9208a3a93e docs: TURN через VPS (AGENTS.md, backlog) — закрыто, порт 3479, Headscale DNAT 2026-09-25 21:35:59 +03:00
root bc9399a2b5 scripts: vps-turn-proxy-setup.sh (iptables DNAT+MASQUERADE для TURN через Headscale) 2026-09-25 21:35:09 +03:00
root 5d98b314a1 deploy-matrix-v3: TURN через VPS (external-ip PUBLIC/TAILSCALE, relay-ip, min/max-port, port 3479) 2026-09-25 21:33:30 +03:00
root 45643a5693 deploy-matrix-v3: fix built-in commands (command -v, test -f) for pct exec 2026-09-25 20:40:12 +03:00
root ee33c226e3 deploy-matrix-v3: full stack (Synapse, Coturn, Element, LiveKit), idempotent 2026-09-25 20:36:07 +03:00
root 3b68249a66 docs: mark DR plan v1 as done 2026-09-25 20:18:15 +03:00
root 16f6c0484c docs: add DR plan v1 (4 scenarios: CT155, CT151, VPS, pve) 2026-09-25 20:17:00 +03:00
root 21719d5dfa docs: add Matrix backlog 2026-09-25 20:14:44 +03:00
root cadabd31da docs: add Matrix sprint runbook 2026-09-25 20:14:38 +03:00
root 007cfcf414 AGENTS.md: full infra guide with Matrix TURN diagnostics, deploy scripts, updated priorities 2026-09-25 20:13:50 +03:00
root 30f2b33b5d gitignore: исключить secrets-master-catalog.sh и ops/inventory-*/ целиком 2026-09-25 17:45:51 +03:00
root 1830fe7340 gitignore: исключить secrets-master-catalog.sh 2026-09-25 17:44:44 +03:00
root 2ae43a044f AGENTS.md: Vaultwarden port 8081, SSO-схема без oauth2-proxy, актуализация секретов 2026-09-25 17:40:17 +03:00
root d964307be3 Sprint B: Vaultwarden SSO fix — report and closure
- Root cause: два OIDC-контура, nginx 8001→8081, provider не привязан к Application, issuer trailing slash
- Fix: нативный SSO Vaultwarden, oauth2-proxy отключён, Authentik Application создан
- Отчёт: ops/sprintB/vault-sso-fix-report.md
- Closes #1
2026-09-25 17:38:51 +03:00
root f69a88e0dc Matrix Sprint: fix public_baseurl for SSO (task #20) 2026-09-25 15:09:14 +03:00
root 497fc0aa85 Element Web: документация security опций для LXC 2026-09-25 14:08:04 +03:00
root 29a37fc90e Matrix Sprint: Element Web deployment (task #19) 2026-09-25 13:56:34 +03:00
root 086cc8f90f Matrix Sprint: nginx config for matrix.buryans.ru (task #18) 2026-09-25 13:52:54 +03:00
root 6855f3e4df Add AGENTS.md + infrastructure locator (reliable) 2026-09-25 13:46:03 +03:00
root 44034904d4 gitignore: add secrets catalog patterns 2026-09-25 13:09:57 +03:00
root bc6a7f9196 Sprint B: data registry + gitea cleanup report 2026-09-25 12:48:26 +03:00
root ed00735097 Gitea cleanup complete + data registry created 2026-09-25 12:10:54 +03:00
root 68ceb859d9 Sprint A: vault nginx rewrite (clean config, oauth2-proxy port 8001) 2026-09-25 11:17:49 +03:00
root cc020fbcd2 Sprint A: 15 monitors + fixes (vault cert, headscale 404, port types) 2026-09-25 11:01:51 +03:00
root c8fae14875 Sprint A: 15 monitors for all infrastructure services 2026-09-25 10:48:54 +03:00
root 6700f759f7 Sprint 1: monitoring pipeline scripts (kuma->n8n->gitea->telegram) 2026-09-25 10:30:29 +03:00
root b700344dc6 auto-sync 2026-09-24-0400 2026-09-24 04:00:08 +03:00
root 83c66e7d5a Add Xray VLESS+WS+TLS config (fallback from REALITY due to DPI blocking) 2026-09-23 20:01:18 +03:00
root f5268e2bab auto-sync 2026-09-23-1617 2026-09-23 16:17:40 +03:00
root 74c8f32a90 auto-sync 2026-09-23-1609 2026-09-23 16:09:29 +03:00
root e9de479e49 Infrastructure: nginx/headscale configs + docs + DR script + auto-sync 2026-09-23 16:09:15 +03:00