msa-django-nhn
NHN Cloud 리소스 관리를 위한 통합 API 서비스입니다.
기술 스택
| 분류 |
기술 |
| Framework |
Django 4.2.14 |
| API |
Django REST Framework 3.16.0 |
| Auth |
SimpleJWT 5.5.0 (RS256) |
| Database |
MySQL (mysqlclient 2.2.7) |
| Docs |
drf-yasg 1.21.10 |
| Server |
Gunicorn 20.1.0 |
지원 서비스
- Compute: 인스턴스, Flavor, Keypair, 이미지
- VPC: VPC, 서브넷, Floating IP, 보안 그룹
- NKS: Kubernetes 클러스터, 노드 그룹
- Storage: Object Storage 컨테이너
- DNS Plus: Zone, 레코드셋, GSLB, Pool, 헬스체크
- Load Balancer: LB, 리스너, 풀, 멤버, L7 정책
API 엔드포인트
Token
| Method |
Endpoint |
설명 |
| POST |
/api/nhn/token/ |
토큰 생성 |
Compute
| Method |
Endpoint |
설명 |
| GET |
/api/nhn/compute/instances/ |
인스턴스 목록 |
| POST |
/api/nhn/compute/instances/create/ |
인스턴스 생성 |
| GET |
/api/nhn/compute/instances/<id>/ |
인스턴스 상세 |
| POST |
/api/nhn/compute/instances/<id>/action/ |
인스턴스 액션 |
| GET |
/api/nhn/compute/flavors/ |
Flavor 목록 |
| GET |
/api/nhn/compute/keypairs/ |
Keypair 목록 |
| GET |
/api/nhn/compute/images/ |
이미지 목록 |
VPC/Network
| Method |
Endpoint |
설명 |
| GET/POST |
/api/nhn/vpc/ |
VPC 목록/생성 |
| GET |
/api/nhn/vpc/<id>/ |
VPC 상세 |
| GET/POST |
/api/nhn/subnet/ |
서브넷 목록/생성 |
| GET |
/api/nhn/floatingip/ |
Floating IP 목록 |
| GET |
/api/nhn/securitygroup/ |
보안 그룹 목록 |
NKS (Kubernetes)
| Method |
Endpoint |
설명 |
| GET |
/api/nhn/nks/clusters/ |
클러스터 목록 |
| POST |
/api/nhn/nks/clusters/create/ |
클러스터 생성 |
| GET |
/api/nhn/nks/clusters/<name>/ |
클러스터 상세 |
| GET |
/api/nhn/nks/clusters/<name>/config/ |
kubeconfig |
| GET |
/api/nhn/nks/clusters/<name>/nodegroups/ |
노드 그룹 목록 |
| POST |
/api/nhn/nks/clusters/<name>/nodegroups/create/ |
노드 그룹 생성 |
DNS Plus
| Method |
Endpoint |
설명 |
| GET/POST |
/api/nhn/dns/zones/ |
Zone 목록/생성 |
| GET/POST |
/api/nhn/dns/zones/<id>/recordsets/ |
레코드셋 |
| GET/POST |
/api/nhn/dns/gslbs/ |
GSLB 목록/생성 |
| GET/POST |
/api/nhn/dns/pools/ |
Pool 목록/생성 |
| GET/POST |
/api/nhn/dns/health-checks/ |
헬스체크 |
Load Balancer
| Method |
Endpoint |
설명 |
| GET/POST |
/api/nhn/lb/loadbalancers/ |
LB 목록/생성 |
| GET/POST |
/api/nhn/lb/listeners/ |
리스너 |
| GET/POST |
/api/nhn/lb/pools/ |
풀 |
| GET/POST |
/api/nhn/lb/pools/<id>/members/ |
멤버 |
| GET/POST |
/api/nhn/lb/healthmonitors/ |
헬스 모니터 |
| GET/POST |
/api/nhn/lb/l7policies/ |
L7 정책 |
Async Task
| Method |
Endpoint |
설명 |
| GET |
/api/nhn/tasks/ |
비동기 작업 목록 |
| GET |
/api/nhn/tasks/<id>/ |
작업 상세 |
API 문서
프로젝트 구조
환경 변수
요청 헤더
NHN Cloud API 호출 시 다음 헤더가 필요합니다:
| 헤더 |
설명 |
| X-NHN-Token |
NHN Cloud API 토큰 |
| X-NHN-Region |
리전 (kr1, kr2, jp1) |
| X-NHN-Tenant-ID |
테넌트 ID |
| X-NHN-Appkey |
DNS Plus Appkey (DNS API용) |
실행 방법
개발 서버
Docker