Commit Graph

63 Commits

Author SHA1 Message Date
c84ccf4360 tasks(NEXT_SESSION): session-close — bookva LIVE на bookseller + wiki ingest
7/7+minio+cutover done в одну сессию. bookva tenant LIVE на bookseller.kzntsv.site
(10 stacks active, login-gate, ES reindexed 920k docs). Auto-deploy tenant=all
активирован. 3 wiki concepts ingested (gitea-reserved-secret-prefix, mongo-wt-
format-major-version-incompat, portainer-per-stack-depends-on-pitfall).

Open треки: books-api-shutdown (~2026-05-27/28), bookva-ozon-mcp-image-build,
optional bookva-minio HTTPS DNS. bookva-tenant-cutover task не понадобилась —
de-facto cutover произошёл сегодня.

Auto-push grant был session-only — следующая session требует нового grant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 13:26:51 +03:00
974afa1e52 tasks(NEXT_SESSION): refresh after 7/7+minio closure
Forward-looking: bookva-tenant-cutover ready (4 infra stacks active —
db/mongo/es/minio с данными, 6 stopped — restart at cutover signal),
books-api shutdown ~2026-05-27/28, bookva-ozon-mcp image build, optional
bookva-minio HTTPS DNS, slovo-overlay parity audit, bookva-minio creds
rotation. Memory updates: separate-container vs bucket-split decision,
DNS wildcard на 94.19.247.14 (Windows IIS), port-bind pattern для external.

External admin endpoints:
- bookva-db: 89.253.255.133:33306 (MariaDB 10.6.26)
- bookva-minio: http://89.253.255.133:9001 (S3 API)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 11:59:01 +03:00
b7696aacb3 tasks(NEXT_SESSION): refresh after bookva-tenant-cutover-prep closed 6/7
Forward-looking: bookva-tenant-cutover next (when user скажет), books-api
shutdown micro-task (24-48h soak ends ~2026-05-27/28), bookva-ozon-mcp
image build, slovo-overlay parity audit. Memory updates: Portainer
per-stack model + depends_on issue, POST+stop pattern, Mongo WT format
compat 4→5/6/7, bookva plaintext passwords + auth code TODO, Gitea
GITEA_* prefix reserved, Portainer Env Vars format.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 10:59:45 +03:00
b430bce111 tasks(NEXT_SESSION): refresh after bookva-tenant-cutover-prep 4/7 progress
Forward-looking: MW slot needed для stateful-split-volume-copy + Step 2/4,
books-api shutdown decision (24-48ч soak ends ~2026-05-27/28), Step 6
timing question. Memory updates: Gitea reserved GITEA_* prefix, token
creation requires basic auth, Portainer PUT atomic compose+env, embed-api
auth matches books-api 1:1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 10:09:05 +03:00
7ae20c2d9f tasks(NEXT_SESSION): refresh after iis-migration close 2026-05-25 12:54:46 +03:00
d746d3bd29 tasks(NEXT_SESSION): refresh handoff after ES migration commit 2026-05-25 11:34:11 +03:00
97757b89ad tasks(NEXT_SESSION): finalize handoff at session close
Recent-commits hash for 86c44c3d filled in; session-end snapshot captures:
- 6-stack Portainer migration closed
- backup pipeline verification pending next 06:00 MSK
- auto-push grant session-only (next session = ask-mode again)
- candidates next session: stateful-split-volume-copy, infra-inventory, iis-migration-to-ruvds

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 10:29:31 +03:00
86c44c3db9 tasks(books-vds-stacks-to-portainer): close 🟢 — 6 stacks migrated SSH-compose → Portainer
Phase 2 ladder executed 2026-05-25 (~10min end-to-end, lowest → highest blast radius):
  proxy-chain (id 28) → imgproxy (29) → minio (30) → mongo (31) → books-db (32) → elasticsearch (33)

All 6 smoked green. books-api + books-task-runner reconnected transparently through
mongo + books-db recreate windows. ES snapshot repo `kreknin` preserved through bind.

Phase 3:
- created .wiki/concepts/portainer-stack-management-books-vds.md (pattern application + diffs from vds-kzntsv)
- entity books-vds.md: 6 stacks flipped SSH-managed → Portainer-managed
- index.md: new concept entry

Pre-flight quirks documented (CentOS 7 yum dead, no jq, no docker login).

Acceptance: 4/5 verified, backup pipeline (#5) verified by inspection (bind paths
preserved) — full pipeline run pending next 06:00 MSK.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 10:27:23 +03:00
141efe9759 scripts(books-vds-portainer-migration): Phase 1 adapter ready
Clone-adapted from .wiki/concepts/portainer-stack-management-vds.md § Migration script.

Diffs from VDS-infra version:
- PORTAINER_URL = portainer.kzntsv.site
- Auth via X-API-Key (PAT works, no JWT fallback needed)
- DIR prefix /usr/docker/<stack> (not /opt/stacks/<stack>)
- Down step via `docker rm -f` by compose-project label
  (bypasses docker-compose v1 ContainerConfig bug entirely; no compose binary on path required)
- Refuses traefik/portainer migration (management plane)

Idempotent: delete-then-create against existing stack by name on endpoint 1. Re-runs are safe.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 10:16:10 +03:00
3769e83640 tasks(NEXT_SESSION): refresh handoff after this session's commits
- Note ntfy + email verified ✓ by user
- Reflect books-vds-stacks-to-portainer  added
- Carry pending push decision (fe41ee44 + 439da3ce)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 09:49:10 +03:00
fe41ee4422 backup(books-vds): daily 06:00 MSK pipeline to kreknin live 🟢
- scripts/books-vds-backup-daily-kreknin/ — run.sh + .env.example + README
- ES path.repo bootstrap (one-time stack edit, snapshot repo 'kreknin' registered)
- curl smtps://yandex:465 email (CRLF + Date headers, no msmtp dep on CentOS 7)
- StrictHostKeyChecking=yes + pre-populated known_hosts (CentOS 7 no accept-new)
- cron /etc/cron.d/books-vds-backup live, initial sync 4.87 GB in 13m28s, ntfy push sent
- wiki: entities/books-vds.md + sources/books-vds-backup-daily-kreknin-2026-05-25.md created
- wiki: concepts/books-ssh-access → vds-kzntsv-ssh-access (was lying about books on vds-kzntsv)
- .tasks/books-vds-backup-daily-kreknin.md closed 🟢 pending phone-side verify

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 09:37:16 +03:00
838f51daa8 tasks(unify-backup-notifications): close 🟢 — unified push+email across VDS/RUVDS/windows-host
Acceptance:
- 3 scripts (VDS bash + RUVDS ps1 + windows-host ps1) синхронизированы под
  unified push + email format (commit 73ad6dd0).
- VDS deployed + smoke ntfy+email ✓.
- RUVDS deployed + smoke ntfy+email ✓.
- windows-host smoke + deploy — closed-by-inspection per user direction
  «все ок»: parser-check достаточно, deploy.ps1 готов для self-deploy
  elevated PS у user'а. Без deploy сегодня ночью 03:00 MSK прогон в
  STAROM format'е (cosmetic, не functional regression).

Также атомарный revert (`.bak-pre-unify` на каждом хосте) задокументирован
в .tasks/unify-backup-notifications.md § Closed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 07:30:30 +03:00
73ad6dd06a scripts(backup-notifications): unify push + email format across VDS/RUVDS/windows-host
3 host-pipelines (VDS bash, RUVDS+windows-host ps1) had drifted formats:
ntfy title `VDS backup OK $D` vs `RUVDS backup OK ($D)`, tags
`white_check_mark` vs `green_circle`, email subject `[VDS] backup OK` vs
`RUVDS backup -- SUCCESS`. Phone-side фильтрация и desktop reading
ломались за счёт inconsistency.

Unified to:
- ntfy push: title `<HOST> backup OK <date>`, body
  `<duration_human>, size=<>, snapshots=<>, dest=kreknin:<>`,
  tags `green_circle` (OK) / `red_circle` (FAILED).
- email: subject `[<HOST>] backup <STATUS> <date>` (STATUS=OK|FAILED),
  body — structured Date/Duration/Size/Snapshots/Source/Dest/Components/Log.
  Failure body extends with `Tail (last 40 lines)`.

Also imports VDS `run.sh` into repo as `scripts/vds-backup-rsync-kreknin/`
— closes drift из общего `scripts/<slug>/` pattern (RUVDS+windows-host
уже жили там; VDS жил только на /opt/stacks/backup/scripts/).

Deploy status:
- VDS: deployed via scp + sudo install, sha256=27b09ca272bb, smoke ntfy+email ✓
- RUVDS: deployed via scp + Move-Item, sha256=f3bb57a86af5, smoke ntfy+email ✓
- windows-host: deploy.ps1 + smoke-notify.ps1 готовы в scripts/, **pending
  elevated PS у user'а** (ACL=SYSTEM+Administrators, не пишется без UAC).

Spec + decisions + completed: .tasks/unify-backup-notifications.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 07:19:15 +03:00