-
Notifications
You must be signed in to change notification settings - Fork 50
Connection Management Guide
- To control multi-cloud infrastructure, you must first register the connection configuration for the target cloud (CSP).
- Once registered, you can use the Connection Name assigned during registration to connect to and control the target cloud.
- Connection registration follows these four steps:
┌───────────────────────────────────────────────────────────────┐
│ CB-Spider Connection Registration │
│ │
│ (1) Register Cloud Driver │
│ └── CSP driver plugin (e.g. aws-driver-v1.0.so) │
│ │
│ (2) Register Cloud Credential │
│ └── CSP access keys (e.g. AccessKey, SecretKey) │
│ │
│ (3) Register Cloud Region/Zone │
│ └── Target region & zone (e.g. us-east-2, us-east-2a) │
│ │
│ (4) Register Cloud Connection │
│ └── Combine Driver + Credential + Region │
│ → produces a ConnectionName for all API calls │
│ │
│ ┌───────────┐ ┌─────────────┐ ┌────────────┐ │
│ │ Driver │ │ Credential │ │Region/Zone │ │
│ └────┬──────┘ └──────┬──────┘ └──────┬─────┘ │
│ └────────────────┼────────────────┘ │
│ ▼ │
│ ┌─────────────────────┐ │
│ │ Connection Config │ │
│ │ (ConnectionName) │ │
│ └─────────────────────┘ │
└───────────────────────────────────────────────────────────────┘
Note
- Steps (1), (2), and (3) can be registered in any order.
- Step (4) requires all three previous registrations to be completed first.
- For credentials, see How to get CSP Credentials.
- For automated bulk registration, see the Default Connection Helper tool.
- CB-Spider server must be running.
-
curlandjq(orjson_pp) installed for API verification. - CSP credentials ready (e.g., AWS Access Key, GCP Service Account Key).
- Users can register and manage connection configurations via the CB-Spider REST API.
# Cloud Driver
POST /spider/driver - Register Cloud Driver
GET /spider/driver - List Cloud Drivers
GET /spider/driver/{DriverName} - Get Cloud Driver
DELETE /spider/driver/{DriverName} - Delete Cloud Driver
# Cloud Credential
POST /spider/credential - Register Cloud Credential
GET /spider/credential - List Cloud Credentials
GET /spider/credential/{CredentialName} - Get Cloud Credential
DELETE /spider/credential/{CredentialName} - Delete Cloud Credential
# Cloud Region/Zone
POST /spider/region - Register Cloud Region/Zone
GET /spider/region - List Cloud Regions
GET /spider/region/{RegionName} - Get Cloud Region
DELETE /spider/region/{RegionName} - Delete Cloud Region
# Cloud Connection Config
POST /spider/connectionconfig - Register Cloud Connection
GET /spider/connectionconfig - List Cloud Connections
GET /spider/connectionconfig/{ConfigName} - Get Cloud Connection
DELETE /spider/connectionconfig/{ConfigName} - Delete Cloud Connection
Register Cloud Driver
| Parameter | Description | Example |
|---|---|---|
| DriverName | Name of the driver | aws-driver01 |
| ProviderName | Cloud provider name |
AWS, GCP, AZURE, ALIBABA
|
| DriverLibFileName | Driver library file name | aws-driver-v1.0.so |
Register Cloud Credential
| Parameter | Description | Example |
|---|---|---|
| CredentialName | Name of the credential | aws-credential01 |
| ProviderName | Cloud provider name | AWS |
| KeyValueInfoList | Key-value pairs of credential info | See examples below |
Register Cloud Region/Zone
| Parameter | Description | Example |
|---|---|---|
| RegionName | Name of the region | aws-ohio |
| ProviderName | Cloud provider name | AWS |
| KeyValueInfoList | Key-value pairs of region/zone info | Region: us-east-2, Zone: us-east-2a |
Register Cloud Connection
| Parameter | Description | Example |
|---|---|---|
| ConfigName | Name of the connection config | aws-ohio-config |
| ProviderName | Cloud provider name | AWS |
| DriverName | Registered driver name | aws-driver01 |
| CredentialName | Registered credential name | aws-credential01 |
| RegionName | Registered region name | aws-ohio |
The following examples demonstrate registering an AWS connection with two regions (Ohio, Oregon).
curl -sX POST http://localhost:1024/spider/driver \
-H 'Content-Type: application/json' \
-d '{
"DriverName": "aws-driver01",
"ProviderName": "AWS",
"DriverLibFileName": "aws-driver-v1.0.so"
}' | json_ppResponse example:
{
"DriverLibFileName" : "aws-driver-v1.0.so",
"DriverName" : "aws-driver01",
"ProviderName" : "AWS"
}Replace
XXXXXXXXXXXXXXXXXXXXXXXwith your actual CSP credentials.
curl -sX POST http://localhost:1024/spider/credential \
-H 'Content-Type: application/json' \
-d '{
"CredentialName": "aws-credential01",
"ProviderName": "AWS",
"KeyValueInfoList": [
{"Key": "aws_access_key_id", "Value": "XXXXXXXXXXXXXXXXXXXXXXX"},
{"Key": "aws_secret_access_key", "Value": "XXXXXXXXXXXXXXXXXXXXXXX"}
]
}' | json_ppResponse example:
{
"CredentialName" : "aws-credential01",
"KeyValueInfoList" : [
{
"Key" : "ClientId",
"Value" : "XXXXXXXXXXXXXXXXXXXXXXX"
},
{
"Key" : "ClientSecret",
"Value" : "XXXXXXXXXXXXXXXXXXXXXXX"
}
],
"ProviderName" : "AWS"
}Tip: To find the Region name (value) to register, use the pre-config API in the Region/Zone Info Guide.
e.g.,GET /spider/preconfig/regionzone?DriverName=aws-driver01&CredentialName=aws-credential01
Register multiple regions/zones at once (e.g., AWS Ohio and Oregon):
regions=("aws-ohio:us-east-2:us-east-2a"
"aws-oregon:us-west-2:us-west-2a")
for region in "${regions[@]}"; do
IFS=":" read -r RegionName Region Zone <<< "$region"
curl -sX POST http://localhost:1024/spider/region \
-H 'Content-Type: application/json' \
-d '{
"RegionName": "'$RegionName'",
"ProviderName": "AWS",
"KeyValueInfoList": [
{"Key": "Region", "Value": "'$Region'"},
{"Key": "Zone", "Value": "'$Zone'"}
]
}' | json_pp
doneResponse example:
{
"AvailableZoneList" : null,
"KeyValueInfoList" : [
{
"Key" : "Region",
"Value" : "us-east-2"
},
{
"Key" : "Zone",
"Value" : "us-east-2a"
}
],
"ProviderName" : "AWS",
"RegionName" : "aws-ohio"
}Combine the registered driver, credential, and region into connection configs:
configs=("aws-ohio-config:aws-ohio"
"aws-oregon-config:aws-oregon")
for config in "${configs[@]}"; do
IFS=":" read -r ConfigName RegionName <<< "$config"
curl -sX POST http://localhost:1024/spider/connectionconfig \
-H 'Content-Type: application/json' \
-d '{
"ConfigName": "'$ConfigName'",
"ProviderName": "AWS",
"DriverName": "aws-driver01",
"CredentialName": "aws-credential01",
"RegionName": "'$RegionName'"
}' | json_pp
doneResponse example:
{
"ConfigName" : "aws-ohio-config",
"CredentialName" : "aws-credential01",
"DriverName" : "aws-driver01",
"ProviderName" : "AWS",
"RegionName" : "aws-ohio"
}
{
"ConfigName" : "aws-oregon-config",
"CredentialName" : "aws-credential01",
"DriverName" : "aws-driver01",
"ProviderName" : "AWS",
"RegionName" : "aws-oregon"
}You can look up the required credential key names for each CSP:
# Example: Check AWS credential key names
curl -sX GET http://localhost:1024/spider/cloudos/metainfo/AWS \
-H 'Content-Type: application/json' | json_pp| CSP | Type | Key Names |
|---|---|---|
| AWS | Spider Type |
ClientId, ClientSecret
|
| AWS | CSP Type |
aws_access_key_id, aws_secret_access_key
|
| GCP | Spider Type |
ClientEmail, ProjectID, PrivateKey
|
| Azure | Spider Type |
ClientId, ClientSecret, TenantId, SubscriptionId
|
| Alibaba | Spider Type |
ClientId, ClientSecret
|
Note
- Both Spider Type and CSP Type credential keys are supported.
- For complete key names for all CSPs, use the MetaInfo API:
GET /spider/cloudos/metainfo/{CSPName}- For how to obtain credentials from each CSP, see How to get CSP Credentials.
After registration, verify the connections:
# List all registered connections
curl -sX GET http://localhost:1024/spider/connectionconfig | json_pp
# Get a specific connection
curl -sX GET http://localhost:1024/spider/connectionconfig/aws-ohio-config | json_pp| HTTP Status | Description |
|---|---|
| 200 OK | Request successful |
| 400 Bad Request | Invalid request (missing required parameter, etc.) |
| 404 Not Found | Target resource not found |
| 500 Internal Server Error | Internal server error |
-
Install & Start Guide
-
Usage Guide
- Usage Overview
- Connection Management
- Region/Zone Info
- Quota Info
- VM Price Info
- VM Image Info
- VM Spec Info
- VPC/Subnet Management
- Security Group Management
- KeyPair Management
- VM Management
- Disk Management
- Network Load Balancer(NLB) Management
- Kubernetes Cluster Management
- Object Storage(S3) Management
- Tag Management
- Cloud Driver Capability Info
- Function Menu
- MetaDB Auto Backup
- How to get CSP Credentials
- Tutorials
- 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
- (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
- How to ...
- How to Use AWS S3 with Credentials
- How to Use Alibaba ECS i1.* Instance Types
- How to provision GPU VMs
- 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 get Azure available Regions
- How to profile memory usage in Golang
- [For Cloud-Migrator]