-
Notifications
You must be signed in to change notification settings - Fork 46
Simple Sample API Guide
ByoungSeob Kim edited this page Sep 9, 2024
·
9 revisions
- 목적: CB-Spider API 처음 사용자의 이해를 위한 간단한 활용 가이드
- 개요: CB-Spider API를 이용한 curl 기반 스크립트를 실행하여 자원을 생성, 상태 확인, 삭제한다.
- 대상: CSP / Region / Zone 정보
- AWS / us-east-2 / us-east-2a
- ※ 아래 시험 스크립트들에서 다음 3가지 장보를 수정하면, 다른 CSP에서도 동일하게 생성 가능
export CONN_CONFIG=aws-ohio-config export IMAGE_NAME=ami-00978328f54e31526 export SPEC_NAME=t3.micro
- 다음 스크립트 실행으로 본 시험에서 활용할 AWS Connection Config를 생성한다.
- 스크립트에서는 여러 개의 AWS Region/Zone을 등록하여, 여러개의 Connnection 정보를 생성 하지만,
- 본 시험에서는
aws-ohio-config
Connection 이름을 활용한다.-
다음 위치로 이동한다.
cd /home/ubuntu/cb-spider/api-runtime/rest-runtime/test/connect-config
-
./1.aws-conn-config.sh
내용에서 -
aws_access_key_id
,aws_secret_access_key
값을 발급 받은 aws credential 내용으로 수정 후 실행 한다../1.aws-conn-config.sh
#################################################################### ## Cloud Driver Info #################################################################### {"DriverName":"aws-driver01","ProviderName":"AWS","DriverLibFileName":"aws-driver-v1.0.so"} #################################################################### ## Cloud Credential Info #################################################################### ... 중략 ...
-
- 다음 스크립트 실행으로 VPC/Subnet ~ VM 까지 생성한다.
- 다음 위치로 이동한다.
cd /home/ubuntu/cb-spider/api-runtime/rest-runtime/test/1.full-create-test
- 다음 스크립트를 실행하고 오류가 없는지 반환 결과를 확인한다.
./1.aws-test.sh
#################################################################### ## Full Test Scripts for CB-Spider IID Working Version - 2020.04.22. ## 1. VPC: Create ## 2. SecurityGroup: Create ## 3. KeyPair: Create ## 4. VM: StartVM ## --------------------------------- #################################################################### #################################################################### ## 1. VPC: Create #################################################################### { "IId" : { "NameId" : "vpc-01", "SystemId" : "vpc-0eea5c2e10eea5fd6" }, "IPv4_CIDR" : "192.168.0.0/16", "SubnetInfoList" : [ { "IId" : { "NameId" : "subnet-01", "SystemId" : "subnet-0d6f5c9f213b17d0d" }, "IPv4_CIDR" : "192.168.1.0/24", "KeyValueList" : [ { "Key" : "VpcId", "Value" : "vpc-0eea5c2e10eea5fd6" }, ... 중략 ...
- 다음 위치로 이동한다.
- 다음 스크립트 실행으로 VM 상태 정보를 확인한다.
- 다음 위치로 이동한다.
cd /home/ubuntu/cb-spider/api-runtime/rest-runtime/test/0.full-liststatus-test
- 다음 스크립트를 실행한후 반환 결과를 확인한다.
./1.aws-test.sh
#################################################################### ## aws-ohio-config - VM: ListStatus #################################################################### { "vmstatus" : [ { "IId" : { "NameId" : "aws-ohio-config-vm-01", "SystemId" : "i-025f516f207a13ba1" }, "VmStatus" : "Running" } ] }
- 다음 위치로 이동한다.
- 다음 스크립트 실행으로 생성했던 자원을 역순으로 삭제한다.
- 다음 위치로 이동한다.
cd /home/ubuntu/cb-spider/api-runtime/rest-runtime/test/4.full-delete-test
- 다음 스크립트를 실행한다.
- 혹시, 중간에 사용중이라는 에러 메시지가 나오면 몇차례 재 실행한다.
./1.aws-test.sh
#################################################################### ## 4. VM: Terminate(Delete) ## 3. KeyPair: Delete ## 2. SecurityGroup: Delete ## 1. VPC: Delete #################################################################### #################################################################### ## 4. VM: Terminate(Delete) #################################################################### { "Status" : "Terminated" } #################################################################### ## 3. KeyPair: Delete #################################################################### { "Result" : "true" } #################################################################### ## 2. SecurityGroup: Delete #################################################################### { "Result" : "true" } #################################################################### ## 1. VPC: Delete #################################################################### { "Result" : "true" }
- 다음 위치로 이동한다.
-
Install & Start Guide
-
Features & Usage
-
- AdminWeb Tool Guide
- CLI Tool Guide
- REST API Guide
-
Design
-
Developer Guide
-
Cloud Driver Developer Guide
- Cloud Driver Developer Guide-WIP
- VM SSH Key Development Guide-WIP
- VM User Development Guide
- What is the CSP SDK API Version of drivers
- Region Zone Info and Driver API
- Price Info and Driver API
- (StartVM TerminateVM) API Call Counts and Waiting
- StartVM and TerminateVM Main Flow of drivers
- VM Root Disk Configuration Guide
- Security Group Rules and Driver API
- Network Load Balancer and Driver API
- VM Snapshot, MyImage and Disk Overview
- Kubernetes and Driver API(PMKS, K8S)
- Tag and Cloud Driver API
- AnyCall API Extension Guide
-
Test Reports
- v0.2.8-for-espresso-release
- v0.3.0-espresso-release
- Azure:Terminating VM
- cb-user@VM: ssh login, sudo run
- v0.3.14 test for SG Source
- v0.4.0-cafemocha-release
- Test via REST API Gateway
- Test Reports of v0.4.11 (IID2 initial Version)
- Test Reports of v0.4.12 (Register & Unregister existing Resources)
- Test Reports for v0.6.0 Release
- How to ...
- How to provision GPU VMs
- How to Resolve the 'Failed to Connect to Database' Error
- How to test CB Spider with Mock Driver
- How to install CB Spider on WSL2 under 공유기/사설망
- How to install CB Spider on macOS
- How to run CB Spider Container on macOS
- How to install OpenStack on a VM for CB Spider Testing
- How to get Azure available Regions
- How to profile memory usage in Golang
- Deprecated:How to install protoc and plugins
- [For Cloud-Migrator]