Commit Graph
31 Commits
Author SHA1 Message Date
ayurishchevandClaude Sonnet 5 0e0bcb6af1 Rebuild bin/admin-dashboard for bulk recheck + IPs auto-refresh
Per docs/SETUP.md's documented build recipe. control-api/prober/
validator-agent are unaffected (only internal/dashboard changed) and keep
their existing hashes in bin/SHA256SUMS.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 18:50:10 +03:00
ayurishchevandClaude Sonnet 5 ec44d54ac1 Add bulk recheck and auto-refresh to the IPs dashboard page
"Перепроверить выбранные" joins the existing "Удалить выбранные" / "Очистить
всё" bulk actions, using the checked-row selection the same way delete
already does — no control-api changes needed, since forcing a recheck of a
batch of addresses (new, finished, or already-queued, skipping anything
mid-check) is exactly what POST /api/v1/admin/ips (db.SubmitIPs) already
does, and the dashboard's own SubmitIPs client method already backs both
the top add/recheck form and the single-row recheck button.

The page also now auto-refreshes every 5s (handleIPsFragment + GET
/ips/fragment), mirroring the overview page's existing hx-trigger="every
Ns" polling and reusing the same config-driven interval
(Cfg.OverviewPollIntervalS) rather than adding a duplicate knob. Since the
table now polls itself, each row's selection checkbox gets a stable id
plus hx-preserve so a checked box survives the refresh (its own DOM node
is kept) while the rest of the row still updates live.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 18:47:11 +03:00
ayurishchevandClaude Sonnet 5 6117c044b5 Point rxprod-compose at prebuilt images and its own control-api.yaml/capi-db
docker-compose.yml now runs from prebuilt images (civ-capi/civ-adash/
civ-prober) instead of building from source, mounts this host's own
rxprod-compose/control-api.yaml and capi-db/ (both local, gitignored
except control-api.yaml itself which is now committed), and moves
control-api off port 8080 onto 8081.

rxprod-compose/sources/ carries local copies of the example configs
(admin-dashboard/control-api/prober/validator-agent) plus .env.example,
moved here from rxprod-compose/.env.example, for reference alongside
this specific deployment's docker-compose.yml.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 10:58:00 +03:00
ayurishchevandClaude Sonnet 5 c7710145a1 Add rxprod-compose's real control-api.yaml; ignore local runtime/generated dirs
control-api.yaml is the actual bootstrap config the rxprod-compose stack's
control-api container mounts (per its docker-compose.yml), previously
undocumented/uncommitted — credentials stay out of it entirely (only the
env var names to read them from, per its own header comment).

.gitignore now also excludes rxprod-compose/capi-db/ (the stack's live
SQLite database — runtime state, not source) and graphify-out/ (this
session's /graphify knowledge-graph output — regenerable, not source).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 10:52:42 +03:00
ayurishchevandClaude Sonnet 5 792b7fbb84 Show check-type usage and stats on the target groups dashboard page
Each target group's relationship to the check types that reference it was
previously invisible without cross-referencing /check-types by hand.
handleTargetsPage/renderTargetsTable now resolve that server-side via
loadTargetsPage (group -> referencing check types, enabled or not) and
render it as a status pill per group, plus a stats row (group count,
total targets, check types using them, unused groups) kept live via an
out-of-band swap on every create/update/delete.

Also auto-sizes the targets textarea as you type (targets.html), and
lets the stat-card grid collapse to however many state cards actually
exist instead of leaving empty background where a fixed repeat(6, ...)
had no card to fill.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 10:52:27 +03:00
ayurishchevandClaude Sonnet 5 95f8066eed Retry validator-agent/prober registration; show validator hostname
Both binaries registered with control-api exactly once at startup and
exited (os.Exit(1)) on any failure — including control-api simply not
being up yet (no ordering guarantee between the two at boot/redeploy) or
the admin not having added this validator_id/site_id to the config yet.
Run() now retries registration with capped exponential backoff (3s->30s)
until it succeeds or the process is asked to shut down, instead of
crashing; registerWithRetry is identical in agentcore and probercore
since their Run/register shape already was.

Separately, the admin dashboard's Validators page had no hostname column
even though the agent already reports one on register (mirroring the
prober) and control-api already persists it — only the admin-config read
DTO (validatorDTO in httpapi and dashboard) dropped it before it reached
the template. Added hostname + last_heartbeat_at to that DTO end-to-end
and a Хост/Heartbeat column to validators.html, matching sites.html.

Rebuilt bin/{control-api,admin-dashboard,prober,validator-agent} and
bin/SHA256SUMS per docs/SETUP.md's documented build recipe.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 10:43:00 +03:00
ayurishchevandClaude Sonnet 5 399c64e801 Add a simple, single-file docker-compose for the control-plane/dashboard/prober host
The existing deploy/docker/docker-compose.yml (+ override/prod, Compose
profiles) is flexible but requires understanding profiles and file
layering. For a server that only ever runs these three fixed roles
against a real OpenStack (VK Cloud) deployment, rxprod-compose/ adds a
single flat docker-compose.yml with no profiles — control-api,
admin-dashboard and prober wired together directly, both ports published
on the host (control-api needs to be reachable by validator-agent running
separately on real cloud VMs). OpenStack credentials and the prober's
site_id come from a local .env (gitignored; .env.example is the
template).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NeVbMVEiE7XQAkBd7HQgj6
2026-09-14 23:15:30 +03:00
ayurishchevandClaude Sonnet 5 93c79b63ea Skip the check cycle for a Floating IP already occupied by another port
The cloud is live: the address list submitted as "free" (bootstrap config
or POST /api/v1/admin/ips) can drift by the time the orchestrator claims
it, or an operator can queue an already-occupied address by mistake.
Neutron's floating-IP association is a blind "last write wins" PUT with
no conflict error to catch, so associateFIP now checks the FIP's PortID
(already fetched via GetFloatingIPByAddress) before associating, guarded
against the false-positive of the FIP already belonging to this same
validator's own port.

A match routes the address straight to a new terminal ip_queue.state
("occupied", distinct from failed/fail) via db.MarkFIPOccupied — no
retries, since Neutron won't free it on its own and requeuing would let
it be reclaimed again next tick, starving the rest of the queue — plus a
dedicated fip_occupied audit event. Resubmitting the address later (once
the conflict is resolved) resets it to queued via the existing
POST /api/v1/admin/ips resubmit path (CancelIP/ListExpiredLeases updated
to treat occupied as terminal too). admin-dashboard gets its own "занят"
badge, distinct from fail/partial/cancelled.

Rebuilt bin/{control-api,admin-dashboard,prober,validator-agent} and
bin/SHA256SUMS per docs/SETUP.md's documented build recipe, since
control-api and admin-dashboard source changed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NeVbMVEiE7XQAkBd7HQgj6
2026-09-13 23:54:35 +03:00
ayurishchevandClaude Sonnet 5 2246369b64 Add control/data plane diagrams for microservices deployment to docs
Standalone HTML page (docs/CONTROL_DATA_PLANE.html) showing the
docker-compose deployment topology (hosts, COMPOSE_PROFILES) and the
egress/inbound check traffic, refined through several presentation
review passes. Linked from README.md's docs table and docs/DIAGRAMS.md
alongside the existing Mermaid diagrams.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NeVbMVEiE7XQAkBd7HQgj6
2026-09-13 21:38:51 +03:00
ayurishchevandClaude Sonnet 5 cf5c7fa0e8 Add docker-compose for running all components together
control-api was the only component deployable via a bare Dockerfile alone
(no entrypoint/template, no default mountable config), and there was no
compose file wiring the four services' network, healthcheck ordering, or
DB volume together. Adds a base docker-compose.yml plus dev (override,
auto-loaded) and prod overlays, split by Compose profiles matching the
real deployment topology (control-plane/dashboard/prober/validator), a
ready-to-copy mock config for control-api so `docker compose up` works
out of the box, and the repo's first .gitignore for the local env/config
copies developers create from the committed examples.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NeVbMVEiE7XQAkBd7HQgj6
2026-09-13 15:11:30 +03:00
ayurishchev 200760f390 docker containers for all binaries 2026-08-30 09:56:48 +03:00
ayurishchev 550ce3fec4 Enable SSH and TLS handshake on prober for TCP22 and TCP443 ports 2026-08-26 23:52:31 +03:00
ayurishchev af3453f19f Minor UI fixes 2026-08-26 22:42:19 +03:00
ayurishchev 7a93594e69 Minor UI fixes 2026-08-26 22:19:42 +03:00
ayurishchev 6410273cf8 Added theme switcher 2026-08-26 21:18:58 +03:00
ayurishchev 51402c590a New Admin Dashboard UI 2026-08-26 21:08:18 +03:00
ayurishchev ef24cc9858 New external site management. New external prober heartbeat feature. 2026-08-26 20:47:54 +03:00
ayurishchev 42f584dd3c Manage external site-prober actions va API and Dashboard 2026-08-26 19:45:48 +03:00
ayurishchev f22ad569b6 added FIP Cooldown before start 2026-08-24 10:29:08 +03:00
ayurishchev 291eea3eb8 fix ui build 2026-08-23 23:35:41 +03:00
ayurishchev 50beeb1133 feature: handle delete operation for IPs 2026-08-23 23:25:44 +03:00
ayurishchev f8336740ad feature: handle delete operation for IPs 2026-08-23 22:24:55 +03:00
ayurishchev 4f597505cc UI fix 2026-08-23 21:58:19 +03:00
ayurishchev ee2a29cb36 use bootstrap 5 for UI, compact UI 2026-08-23 21:15:31 +03:00
ayurishchev 37910e410b admin control features and admin dashboard 2026-08-23 20:39:22 +03:00
ayurishchev c630f13c57 make inbound check optional 2026-08-21 11:25:52 +03:00
ayurishchev 67adc6670e fix public ip selfcheck logic 2026-08-21 11:04:49 +03:00
ayurishchev a6f9646da5 fix auth model 2026-08-21 09:59:35 +03:00
ayurishchev 5e3800e9cb fix auth model 2026-08-21 09:58:08 +03:00
ayurishchev f81285b151 diagrams and binaries 2026-08-21 08:11:58 +03:00
ayurishchev 7e44db87b2 repo init 2026-08-21 07:34:45 +03:00