iop/apps/control-plane
toki e7e158b113 정리: 프로젝트 이름 참조를 iop로 맞춘다
저장소 디렉터리명이 iop로 정리된 상태와 문서, Docker 빌드 경로, 테스트 fixture의 워크스페이스 표기가 어긋나지 않도록 맞춘다.
2026-05-20 07:27:46 +09:00
..
cmd/control-plane feat: control-plane and hostsetup updates - add main_test.go, hostsetup package, update configs and docs 2026-05-19 22:12:27 +09:00
internal/wire feat: add control-plane, web, and docker-compose 2026-05-18 06:21:48 +09:00
Dockerfile 정리: 프로젝트 이름 참조를 iop로 맞춘다 2026-05-20 07:27:46 +09:00
README.md feat: control-plane and hostsetup updates - add main_test.go, hostsetup package, update configs and docs 2026-05-19 22:12:27 +09:00

control-plane — Control Plane

여러 Edge를 연결하고 관찰하며, Edge 설정 변경과 명령 전달을 담당할 Go 기반 중앙 관리 서버다.

현재 상태: Scaffold

현재 Control Plane은 실행 가능한 최소 서버 스캐폴드 단계다. Node를 직접 등록하거나 직접 스케줄링하는 계층으로 확정하지 않는다. Control Plane은 Edge를 통해 시스템을 제어하고, Edge가 자신의 로컬 런타임 상태와 Node registry를 운영하는 방향을 따른다.

IOP의 프론트엔드는 Control Plane 내부 UI가 아니라 apps/web의 React + Next.js 기반 Web Portal로 둔다. Portal은 별도 Docker 컨테이너로 운영하며, Control Plane과의 주요 통신은 edge-node에서 사용 중인 protobuf-socket을 IOP Wire Protocol 기준으로 확장한다. net/http는 health/readiness/bootstrap 같은 보조 endpoint 용도로만 둔다.

현재 실행 표면

  • GET /healthz
  • GET /readyz
  • protobuf-socket wire endpoint 예약: server.wire_listen
  • Control Plane DB 접속 설정 예약: database.url
  • Control Plane Redis 접속 설정 예약: redis.url, redis.key_prefix

로컬 직접 실행 테스트는 configs/control-plane.yamldatabase.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 제공