4166057abc
test / integration-docker (pull_request) Successful in 17s
test / unit (pull_request) Successful in 50s
lint / lint (push) Failing after 1m0s
test / integration-firecracker (pull_request) Successful in 3m25s
test / coverage (pull_request) Successful in 16s
test / publish-infra (pull_request) Has been skipped
tracker-policy-pr / check-pr (pull_request) Failing after 12m7s
orchestrator/control_plane.py -> orchestrator/server.py. Within the orchestrator package the "control_plane" filename stutters (the orchestrator *is* the control plane), and `orchestrator.server` reads as "the orchestrator's HTTP server", pairing with service.py (domain logic) and matching gateway/supervisor/server.py. Scope is the module name only. The class ControlPlaneServer, the CONTROL_AUTH_HEADER constant, and the "control plane" architectural term (CONTROL_PLANE_PORT, host_control_plane_token, control_plane_url, …) are deliberately unchanged — that's the load-bearing control-plane/data-plane distinction. Test file renamed to match; full unit suite green (2243). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
64 lines
2.3 KiB
Python
64 lines
2.3 KiB
Python
"""Per-host orchestrator service (PRD 0070).
|
|
|
|
A single persistent per-host service that will run the gateway functions
|
|
(egress / git-gate / supervise), coordinate with the console, and broker
|
|
agent launches. This package is being built bottom-up, starting with the
|
|
backend-neutral "consolidation core" that needs no VM packaging:
|
|
|
|
* `registry` — the SQLite runtime-state store + fail-closed
|
|
attribution (source IP + per-bottle identity token).
|
|
* `broker` — the signed, structured launch-request contract + a
|
|
`LaunchBroker` (stub for the harness) that verifies
|
|
provenance before acting.
|
|
* `gateway` — the consolidated per-host gateway: the `Gateway`
|
|
lifecycle contract (idempotent singleton). One
|
|
gateway shared by all bottles instead of one per
|
|
bottle; backend impls live under `backend/*/gateway`.
|
|
* `service` — the `Orchestrator`: owns the registry, brokers the
|
|
launch lifecycle (launch/teardown), manages the
|
|
shared gateway, attributes.
|
|
* `control_plane` — the HTTP control-plane RPC (launch / teardown /
|
|
list / attribute / gateway / health).
|
|
|
|
The actual backend-native launch (a real docker/firecracker broker) and
|
|
the egress/git/supervise data plane land in later slices once this core is
|
|
proven (see the PRD sequencing: plain-process dev-harness -> docker
|
|
orchestrator -> firecracker).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .registry import BottleRecord, RegistryStore, new_identity_token
|
|
from .broker import (
|
|
BrokerAuthError,
|
|
LaunchBroker,
|
|
LaunchRequest,
|
|
StubBroker,
|
|
sign_request,
|
|
verify_request,
|
|
)
|
|
from .docker_broker import DockerBroker, DockerBrokerError
|
|
from ..gateway import Gateway, GatewayError
|
|
from .service import Orchestrator
|
|
from .server import ControlPlaneServer, dispatch, make_server
|
|
|
|
__all__ = [
|
|
"BottleRecord",
|
|
"RegistryStore",
|
|
"new_identity_token",
|
|
"BrokerAuthError",
|
|
"LaunchBroker",
|
|
"LaunchRequest",
|
|
"StubBroker",
|
|
"DockerBroker",
|
|
"DockerBrokerError",
|
|
"Gateway",
|
|
"GatewayError",
|
|
"sign_request",
|
|
"verify_request",
|
|
"Orchestrator",
|
|
"ControlPlaneServer",
|
|
"dispatch",
|
|
"make_server",
|
|
]
|