| .. | ||
| cmd/control-plane | ||
| internal/wire | ||
| Dockerfile | ||
| README.md | ||
control-plane — Control Plane
여러 Edge를 연결하고 관찰하며, Edge 설정 변경과 명령 전달을 담당할 Go 기반 중앙 관리 서버다.
현재 상태: Scaffold
현재 Control Plane은 실행 가능한 최소 서버 스캐폴드 단계다. Node를 직접 등록하거나 직접 스케줄링하는 계층으로 확정하지 않는다. Control Plane은 Edge를 통해 시스템을 제어하고, Edge가 자신의 로컬 런타임 상태와 Node registry를 운영하는 방향을 따른다.
IOP의 프론트엔드는 Control Plane 내부 UI가 아니라 Flutter-first Client로 둔다. Client의 기준 구현은 apps/client의 Flutter 앱이고, web 배포는 apps/client/Dockerfile이 빌드한 Flutter Web 산출물을 compose web 서비스에서 nginx로 정적 서빙한다. Client-Control Plane 통신은 proto-socket WebSocket/WSS를 우선하고, Control Plane-Edge 통신은 edge-node에서 사용 중인 proto-socket 흐름을 IOP Wire Protocol 기준으로 확장한다. net/http는 health/readiness/bootstrap 같은 보조 endpoint 용도로만 둔다.
운영 경계
Control Plane은 상시 운영, multi-edge 관찰/명령, 정책/감사 UX의 계획된 기본 운영면이다. Edge-local bootstrap, bundle-local config, env/config 진단, node 등록 command 발급, smoke, 단일 Edge 유지보수 fallback은 iop-edge CLI에 남긴다.
Control Plane-Edge wire protocol은 Edge가 소유한 operation을 원격 운영면으로 소비한다. Edge 상태 조회, node 및 후속 agent 등록 상태 조회, command 전달, event 수신, run/cancel/status, bootstrap 발급 상태처럼 CLI와 Control Plane에 모두 필요한 작업은 Edge 내부의 표면 중립 service/operation boundary로 수렴시키고, Control Plane에서 Edge-local registry, run dispatch, stream relay 구현을 복제하지 않는다.
현재 실행 표면
GET /healthzGET /readyz- protobuf-socket wire endpoint 예약:
server.wire_listen - Control Plane DB 접속 설정 예약:
database.url - Control Plane Redis 접속 설정 예약:
redis.url,redis.key_prefix
로컬 직접 실행 테스트는 configs/control-plane.yaml의 database.url, redis.url, redis.key_prefix를 사용한다. Postgres 기본 DB명은 iop-control-plane-local이고 Redis는 code-server-redis의 DB 1과 iop:control-plane:local: key prefix를 사용한다. dev compose 환경은 IOP_DATABASE_URL, IOP_REDIS_URL, IOP_REDIS_KEY_PREFIX 환경변수로 override하고 Postgres 기본 DB명을 iop-control-plane-dev, Redis DB를 2와 iop:control-plane:dev: key prefix로 둔다.
계획된 기능
- Go 단일 바이너리 운영 제어 서버
- 여러 Edge 연결 관리
- Edge 상태 조회
- Edge 설정 변경
- Edge 명령 전달
- Edge 이벤트 수신
- Policy/Config, Job/Worker, Audit, Metrics/Event API 제공