@bifos/nhncloud-cli 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +137 -4
- package/dist/index.js +1056 -18
- package/package.json +1 -1
- package/skills/nhncloud-cli/SKILL.md +21 -5
- package/skills/nhncloud-cli/references/loadbalancer.md +237 -0
- package/skills/nhncloud-cli/references/ncs.md +43 -1
package/README.md
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
[](https://github.com/jon890/nhncloud-cli/blob/main/LICENSE)
|
|
7
7
|
|
|
8
8
|
NHN Cloud 서비스를 AWS CLI 방식으로 호출하는 통합 CLI.
|
|
9
|
-
현재
|
|
10
|
-
`configure`, `commands`, `logncrash search/send/export`, `deploy`, `instance`, `network`, `volume`, `floatingip
|
|
9
|
+
현재 147개 command catalog 항목을 지원한다.
|
|
10
|
+
`configure`, `commands`, `logncrash search/send/export`, `deploy`, `instance`, `network`, `volume`, `floatingip` 명령을 지원한다.
|
|
11
|
+
`loadbalancer`, `ncr`, `nks`, `ncs` 명령으로 NHN Cloud 서비스를 조회·운영할 수 있다.
|
|
11
12
|
`skills`/`doctor` 로 Claude Code 스킬 설치와 상태 진단을 지원한다.
|
|
12
13
|
|
|
13
14
|
## 설치
|
|
@@ -269,6 +270,14 @@ root와 주요 service group의 `--help`에는 짧은 agent hint가 포함된다
|
|
|
269
270
|
| `volume create` | 단일 volume 객체 |
|
|
270
271
|
| `floatingip list` | floating IP 배열 |
|
|
271
272
|
| `floatingip create` | 단일 floating IP 객체 |
|
|
273
|
+
| `loadbalancer list` | Load Balancer 배열 |
|
|
274
|
+
| `loadbalancer get` | 단일 Load Balancer 객체 |
|
|
275
|
+
| `loadbalancer ipacl list` | IP ACL 그룹 배열 |
|
|
276
|
+
| `loadbalancer ipacl get` | 단일 IP ACL 그룹 객체 |
|
|
277
|
+
| `loadbalancer ipacl target list` | IP ACL 대상 배열 |
|
|
278
|
+
| `loadbalancer ipacl create/delete` | 작업 상태와 IP ACL 그룹 UUID 객체 |
|
|
279
|
+
| `loadbalancer ipacl target add/remove` | 대상 UUID와 재바인딩 결과 객체 |
|
|
280
|
+
| `loadbalancer set-ipacl/clear-ipacl` | 작업 상태와 Load Balancer UUID·그룹 UUID 객체 |
|
|
272
281
|
| `ncr list` | `registries` 래퍼를 언랩한 registry 배열 |
|
|
273
282
|
| `ncr get` | `registry` 래퍼를 언랩한 단일 registry 객체 |
|
|
274
283
|
| `ncr images` | repository 배열 |
|
|
@@ -553,6 +562,106 @@ nhncloud floatingip delete <floatingip-id> --yes
|
|
|
553
562
|
> **associate**: `floatingip associate <floatingip-id> <instance-id>` 는 instance→port_id 매핑 경로 미확정으로 보류 중.
|
|
554
563
|
> 실측으로 경로가 확정되면 후속 task 에서 추가한다.
|
|
555
564
|
|
|
565
|
+
### Load Balancer와 IP ACL
|
|
566
|
+
|
|
567
|
+
Load Balancer와 IP ACL 그룹·대상을 조회하고 관리한다.
|
|
568
|
+
`loadbalancer` 명령군은 `network`와 같은 `iaas` 자격증명·Keystone 토큰·network endpoint를 공유한다.
|
|
569
|
+
|
|
570
|
+
자동화에서는 profile과 region을 명시하고 `--json`으로 조회한다.
|
|
571
|
+
|
|
572
|
+
```bash
|
|
573
|
+
# Load Balancer 목록과 단건 조회
|
|
574
|
+
nhncloud loadbalancer list --profile <profile> --region <region> --json
|
|
575
|
+
nhncloud loadbalancer get <loadbalancer> --profile <profile> --region <region> --json
|
|
576
|
+
|
|
577
|
+
# IP ACL 그룹 목록과 단건 조회
|
|
578
|
+
nhncloud loadbalancer ipacl list --profile <profile> --region <region> --json
|
|
579
|
+
nhncloud loadbalancer ipacl get <group> --profile <profile> --region <region> --json
|
|
580
|
+
|
|
581
|
+
# 그룹에 속한 IP ACL 대상 조회
|
|
582
|
+
nhncloud loadbalancer ipacl target list <group> \
|
|
583
|
+
--profile <profile> \
|
|
584
|
+
--region <region> \
|
|
585
|
+
--json
|
|
586
|
+
|
|
587
|
+
# IP ACL 그룹 생성과 삭제
|
|
588
|
+
nhncloud loadbalancer ipacl create \
|
|
589
|
+
--name <group-name> \
|
|
590
|
+
--action ALLOW \
|
|
591
|
+
--description <description> \
|
|
592
|
+
--profile <profile> \
|
|
593
|
+
--region <region> \
|
|
594
|
+
--json
|
|
595
|
+
nhncloud loadbalancer ipacl delete <group> \
|
|
596
|
+
--profile <profile> \
|
|
597
|
+
--region <region> \
|
|
598
|
+
--yes \
|
|
599
|
+
--json
|
|
600
|
+
|
|
601
|
+
# Load Balancer의 IP ACL 그룹 전체 교체와 전체 해제
|
|
602
|
+
nhncloud loadbalancer set-ipacl <loadbalancer> \
|
|
603
|
+
--group <group> \
|
|
604
|
+
--group <other-group> \
|
|
605
|
+
--profile <profile> \
|
|
606
|
+
--region <region> \
|
|
607
|
+
--yes \
|
|
608
|
+
--json
|
|
609
|
+
nhncloud loadbalancer clear-ipacl <loadbalancer> \
|
|
610
|
+
--profile <profile> \
|
|
611
|
+
--region <region> \
|
|
612
|
+
--yes \
|
|
613
|
+
--json
|
|
614
|
+
|
|
615
|
+
# IP ACL 대상 추가와 삭제
|
|
616
|
+
nhncloud loadbalancer ipacl target add <group> \
|
|
617
|
+
--cidr <ip-or-cidr> \
|
|
618
|
+
--profile <profile> \
|
|
619
|
+
--region <region> \
|
|
620
|
+
--yes \
|
|
621
|
+
--json
|
|
622
|
+
nhncloud loadbalancer ipacl target remove <target-id> \
|
|
623
|
+
--profile <profile> \
|
|
624
|
+
--region <region> \
|
|
625
|
+
--yes \
|
|
626
|
+
--json
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
`<loadbalancer>`와 `<group>`에는 이름 또는 UUID를 넣는다.
|
|
630
|
+
UUID가 정확히 일치하면 바로 선택하고, 이름은 정확히 하나만 일치해야 한다.
|
|
631
|
+
같은 이름이 여러 개면 오류에 표시되는 후보 UUID를 사용한다.
|
|
632
|
+
|
|
633
|
+
기본 테이블의 Load Balancer 목록 컬럼은 `id`, `name`, `vip_address`, `provisioning_status`, `operating_status`, `ipacl_group_action`이다.
|
|
634
|
+
IP ACL 그룹 목록 컬럼은 `id`, `name`, `action`, `ipacl_target_count`, `loadbalancer_count`다.
|
|
635
|
+
IP ACL 대상 목록 컬럼은 `id`, `cidr_address`, `description`, `ipacl_group_id`다.
|
|
636
|
+
`--json`은 응답 래퍼를 제거한 객체 또는 배열을 stdout에 출력하고, `--quiet`는 리소스 UUID만 한 줄에 하나씩 stdout에 출력한다.
|
|
637
|
+
진행 상황, 운영 경고, 오류는 stderr로 분리된다.
|
|
638
|
+
|
|
639
|
+
쓰기 명령은 대화형 확인을 열지 않는다.
|
|
640
|
+
삭제, 연결 교체, 대상 변경에는 `--yes`가 필수다.
|
|
641
|
+
`set-ipacl`은 지정한 그룹 목록으로 기존 연결을 전체 교체하고, `clear-ipacl`은 모든 연결을 해제한다.
|
|
642
|
+
|
|
643
|
+
대상 추가·삭제는 변경 전에 연결 상태를 수집한 뒤 관련 Load Balancer를 순차 재바인딩한다.
|
|
644
|
+
`--no-rebind`를 쓰면 재바인딩을 생략하지만 데이터 영역에 규칙이 즉시 반영되지 않을 수 있다.
|
|
645
|
+
대상 변경은 반영까지 약 10–20초가 걸릴 수 있다.
|
|
646
|
+
`ALLOW` 그룹에는 Load Balancer가 속한 VPC의 private CIDR을 사용한다.
|
|
647
|
+
|
|
648
|
+
재바인딩이 일부 실패하면 대상 변경은 되돌리지 않는다.
|
|
649
|
+
명령은 `status: "partial"`과 `rebind.failed[].retry_argv`를 stdout JSON에 먼저 출력한 뒤 종료 코드 1을 반환한다.
|
|
650
|
+
AI 에이전트는 문자열인 `retry_command`보다 배열인 `retry_argv`를 우선 사용한다.
|
|
651
|
+
사용자가 명시한 `--profile`과 `--region`도 복구 배열에 보존된다.
|
|
652
|
+
|
|
653
|
+
```bash
|
|
654
|
+
result_file="$(mktemp)"
|
|
655
|
+
if ! nhncloud loadbalancer ipacl target add <group> \
|
|
656
|
+
--cidr <ip-or-cidr> \
|
|
657
|
+
--profile <profile> \
|
|
658
|
+
--region <region> \
|
|
659
|
+
--yes \
|
|
660
|
+
--json >"$result_file"; then
|
|
661
|
+
jq '.rebind.failed[] | {error, retry_argv}' "$result_file"
|
|
662
|
+
fi
|
|
663
|
+
```
|
|
664
|
+
|
|
556
665
|
### NHN Container Registry (NCR)
|
|
557
666
|
|
|
558
667
|
NCR Management API 로 레지스트리를 조회한다.
|
|
@@ -702,8 +811,19 @@ nhncloud ncs workload list --app-key <appkey>
|
|
|
702
811
|
nhncloud ncs workload get <workload-id> --app-key <appkey>
|
|
703
812
|
|
|
704
813
|
# task 컨테이너 로그/이벤트 조회 (--task는 workload get 응답의 tasks[].id)
|
|
705
|
-
nhncloud ncs workload logs <workload-id>
|
|
706
|
-
|
|
814
|
+
nhncloud ncs workload logs <workload-id> \
|
|
815
|
+
--task <task-id> \
|
|
816
|
+
--container <name> \
|
|
817
|
+
--from 1h \
|
|
818
|
+
--to now \
|
|
819
|
+
--profile <profile> \
|
|
820
|
+
--json
|
|
821
|
+
nhncloud ncs workload events <workload-id> \
|
|
822
|
+
--task <task-id> \
|
|
823
|
+
--from 1h \
|
|
824
|
+
--to now \
|
|
825
|
+
--profile <profile> \
|
|
826
|
+
--json
|
|
707
827
|
|
|
708
828
|
# 실행 히스토리 / 예약 실행 히스토리 조회
|
|
709
829
|
nhncloud ncs workload history <workload-id> --app-key <appkey>
|
|
@@ -711,6 +831,19 @@ nhncloud ncs workload history get <workload-id> <history-id> --app-key <appkey>
|
|
|
711
831
|
nhncloud ncs workload schedule-history <workload-id> --app-key <appkey>
|
|
712
832
|
```
|
|
713
833
|
|
|
834
|
+
`workload logs`와 `workload events`의 `--from`·`--to`는 다음 입력을 받는다.
|
|
835
|
+
|
|
836
|
+
- 시간대와 초를 포함한 RFC3339 절대시간
|
|
837
|
+
- `now`
|
|
838
|
+
- 0 이상의 정수 뒤에 `m`, `h`, `d` 중 하나를 붙인 상대시간
|
|
839
|
+
|
|
840
|
+
상대시간 예시는 `30m`, `1h`, `2d`다.
|
|
841
|
+
|
|
842
|
+
입력은 API 호출 전에 UTC 초 단위 `Z` 문자열로 정규화된다.
|
|
843
|
+
두 옵션을 모두 생략하면 API 기본 범위를 사용하고, 한쪽만 지정할 수도 있다.
|
|
844
|
+
잘못된 날짜, 시간대 없는 절대시간, 역전된 범위는 자격증명과 API에 접근하기 전에 종료 코드 3으로 거부한다.
|
|
845
|
+
조회 데이터는 stdout, 진행 상황과 오류는 stderr에 출력한다.
|
|
846
|
+
|
|
714
847
|
template 생성·버전 생성처럼 복잡한 입력은 공식 API payload를 JSON 파일로 전달한다.
|
|
715
848
|
삭제 명령은 비대화형 환경에서 `--yes`가 필요하다.
|
|
716
849
|
|