Skip to content

Phase 4 — US 리전 및 Autoscaler 구현 요약

Ref: implementation plan §6.

구현된 항목

기획서 항목구현
P4-1 Pulumi us 스택prego-pulumi/Pulumi.us.yaml, REGION_CONFIG.us (config/region.py) 이미 ash-dc3 정의됨
P4-2 GitHub Actionspulumi-preview matrix region: [sg, us]; pulumi-up / pulumi-destroy에서 region별 HCLOUD_TOKEN_US / HCLOUD_TOKEN_SG 설정
P4-3 resolveRegion()config/region.py: Enterprise + requested_region=us → ‘us’ 반환 (이미 구현)
P4-5 / P4-6D1 0006 nodes·node_metrics_rollups·scaling_events 사용. workers/autoscaler: Cron 10분, Health Score (§9.7), 2+ 패널티 시 ScaleOut → scaling_events INSERT, 선택적 workflow_dispatch

GitHub Secrets (Phase 4)

  • HCLOUD_TOKEN_US: US(Ashburn) 리전용 Hetzner 토큰. Preview/Up/Destroy에서 region=us 일 때 사용.
  • production-us Environment (선택): workflow_dispatch로 region=us 실행 시 Required Reviewers 적용하려면 생성.

Autoscaler Worker (workers/autoscaler)

  • Cron: */10 * * * * (10분마다).
  • D1: nodes (Active), node_metrics_rollups (최근 10분 윈도우), scaling_events INSERT.
  • Health Score: CPU/Mem/Disk/Latency/Error/Density 패널티 (§9.7). 2개 이상 임계 초과 + score < 50 → ScaleOut 이벤트 및 Pulumi Up 트리거(설정 시).
  • Scale In: Draining 노드에 대해 scaling_events (ScaleIn) 기록.
  • 전제: node_metrics_rollups는 별도 메트릭 수집기(에이전트/Worker)로 채워져야 함.

미구현·팀 보완

  • P4-4 Cloudflare Load Balancing: sg-pool, us-pool, Health Check 30초 — CF 대시보드 또는 Terraform/Pulumi로 별도 구성.
  • P4-7 US E2E: Control Plane에서 Enterprise + requested_region=us 시 provision_jobs.region=us, workflow_dispatch region=us 호출되도록 연동 확인. Ansible·Zuplo가 US 호스트 대상으로 동작하는지 검증.

§6.9 첫 US 프로비저닝 전 점검

§6.5 완료 기준, resolveRegion(Enterprise, us), Ansible·Zuplo US 대상, (선택) 테스트 구독 E2E.

Help