Region Zone Info Guide(KR) - cloud-barista/cb-spider GitHub Wiki
Region/Zone Info Guide
1. CB-Spider Region/Zone Info κ°μ
- CB-Spiderλ CSPλ³ Region λ° Zone μ 보λ₯Ό λ¨μΌ APIλ‘ μ 곡νλ€.
- Region/Zone APIλ λ κ°μ§ λͺ¨λλ‘ μ¬μ©ν μ μλ€:
- μ°κ²° μ€μ μ (Before Connection Configuration):
DriverNameκ³ΌCredentialNameλ§μΌλ‘ μ‘°ν (ConnectionConfig λΆνμ)- μ£Όλ‘ Connection Managementμ Region λ±λ‘μ μν΄μ λμ CSPκ° μ 곡νλ Region λͺ©λ‘ νμΈν λ νμ©
- μ°κ²° μ€μ ν (After Connection Configuration):
ConnectionNameμΌλ‘ μ‘°ν
- μ°κ²° μ€μ μ (Before Connection Configuration):
- CSP μλ³Έ Region/Zone λ°μ΄ν°λ
OrgRegionλ°OrgZoneAPIλ₯Ό ν΅ν΄ λ³λλ‘ μ‘°νν μ μλ€. - μ§μ CSP: AWS, Azure, GCP, Alibaba, Tencent, OpenStack, NCP, NHN, KT, KTCLASSIC
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CB-Spider Region/Zone Info β
β β
β β μ°κ²° μ€μ μ (Before Connection Configuration) β
β DriverName + CredentialName β
β βββ ListRegionZone() β μ 체 Region+Zone λͺ©λ‘ β
β βββ GetRegionZone() β νΉμ Region+Zone μμΈ β
β βββ ListOrgRegion() β CSP μλ³Έ Region λͺ©λ‘ β
β β
β β‘ μ°κ²° μ€μ ν (After Connection Configuration) β
β ConnectionName β
β βββ ListRegionZone() β μ 체 Region+Zone λͺ©λ‘ β
β βββ GetRegionZone() β νΉμ Region+Zone μμΈ β
β βββ ListOrgRegion() β CSP μλ³Έ Region λͺ©λ‘ β
β βββ ListOrgZone() β CSP μλ³Έ Zone λͺ©λ‘ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2. μ¬μ μ€λΉ μ¬ν
2.1 곡ν΅
- CB-Spiderμ λμ CSPμ Driver λ° Credentialμ΄ λ±λ‘λμ΄ μμ΄μΌ νλ€.
- μ°κ²° μ€μ ν APIλ₯Ό μ¬μ©νλ €λ©΄ Connection Configuration(
ConnectionName)λ λ±λ‘λμ΄ μμ΄μΌ νλ€.
2.2 AWS, Alibaba, Tencent β κΈ°λ³Έ Region/Zone μ€μ νμ
- μ΄λ€ CSPλ API νΈμΆ μ λμ Region μ§μ μ΄ νμμ΄λ€.
- AWS, Alibaba: CSP API μ€ν μμ² μ λμ Region μ§μ μ΄ νμ
- Tencent: μ°κ²° μ€μ μ Driver μ΄κΈ°ν μ Zone μ€μ μ¬λΆλ₯Ό κ²μ¦ (Tencent API μ체μμλ λΆνμνλ λλΌμ΄λ² μμ μ±μ μν΄ μ μ©)
- μ°κ²° μ€μ μ Region/Zone μ‘°ν μ,
cloudos_meta.yamlμ μ€μ λ κΈ°λ³Έ Region/Zoneμ μ¬μ©νλ€. - κΈ°λ³Έκ°μ κ° CSPμ μμΈ Region λ° μ²« λ²μ§Έ ZoneμΌλ‘ μ€μ λμ΄ μμΌλ©°, νμμ λ°λΌ λ³κ²½ν μ μλ€.
- μ°Έκ³ :
3. CB-Spider Region/Zone API λ° μ 곡 μ 보 κ·κ²©
- Region/Zone μ 보λ CB-Spider REST APIλ₯Ό ν΅ν΄ JSON νμμΌλ‘ μ‘°νν μ μλ€.
3.1 API μλν¬μΈνΈ
# β μ°κ²° μ€μ μ (DriverName + CredentialName νμ)
GET /spider/preconfig/regionzone - μ 체 RegionZone λͺ©λ‘ μ‘°ν
GET /spider/preconfig/regionzone/{RegionName} - νΉμ RegionZone μ‘°ν
GET /spider/preconfig/orgregion - CSP μλ³Έ Region λͺ©λ‘ μ‘°ν
# β‘ μ°κ²° μ€μ ν (ConnectionName νμ)
GET /spider/regionzone - μ 체 RegionZone λͺ©λ‘ μ‘°ν
GET /spider/regionzone/{RegionName} - νΉμ RegionZone μ‘°ν
GET /spider/orgregion - CSP μλ³Έ Region λͺ©λ‘ μ‘°ν
GET /spider/orgzone - CSP μλ³Έ Zone λͺ©λ‘ μ‘°ν
3.2 μμ² νλΌλ―Έν°
β μ°κ²° μ€μ μ
| νλΌλ―Έν° | μ€λͺ | μμ |
|---|---|---|
DriverName |
λ±λ‘λ ν΄λΌμ°λ λλΌμ΄λ² μ΄λ¦ | aws-driver01 |
CredentialName |
λ±λ‘λ μ격μ¦λͺ μ΄λ¦ | aws-credential01 |
β‘ μ°κ²° μ€μ ν
| νλΌλ―Έν° | μ€λͺ | μμ |
|---|---|---|
ConnectionName |
λ±λ‘λ μ°κ²° μ€μ μ΄λ¦ | aws-config01 |
3.3 μλ΅ μ€ν€λ§
RegionZone (Region νλͺ©)
| νλ | μ€λͺ | μμ |
|---|---|---|
Name |
CB-Spiderμμ μ¬μ©νλ Region μλ³μ | ap-northeast-2 |
DisplayName |
CB-Spiderμμ μ¬μ©νλ Region νμ μ΄λ¦ | South Korea, Seoul |
CSPDisplayName |
CSPκ° μ 곡νλ Region νμ μ΄λ¦ | Asia Pacific (Seoul) |
ZoneList |
ν΄λΉ Regionμ μν Zone λͺ©λ‘ | μλ ZoneInfo μ°Έκ³ |
ZoneInfo (ZoneList λ΄ Zone νλͺ©)
| νλ | μ€λͺ | μμ |
|---|---|---|
Name |
Zone μλ³μ | ap-northeast-2a |
DisplayName |
CB-Spiderμμ μ¬μ©νλ Zone νμ μ΄λ¦ | South Korea, Seoul |
CSPDisplayName |
CSPκ° μ 곡νλ Zone νμ μ΄λ¦ | Asia Pacific (Seoul) |
Status |
Zone κ°μ© μν | Available |
μ°Έκ³
OrgRegionλ°OrgZoneμλ΅μ CSP μλ³Έ λ°μ΄ν°λ₯Ό κ·Έλλ‘ μ λ¬νλ©°, CSPλ³λ‘ κ΅¬μ‘°κ° λ€λ₯΄λ€.OrgZoneAPI(GET /spider/orgzone)λ μ°κ²° μ€μ ν λͺ¨λμμλ§ μ¬μ© κ°λ₯νλ€.
4. CB-Spider Region/Zone API μ¬μ© μμ
4.1 μ°κ²° μ€μ μ (Before Connection Configuration)
(1) μ 체 RegionZone λͺ©λ‘ μ‘°ν
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
μλ΅ μμ:
{
"regionzone" : [
{
"CSPDisplayName" : "Asia Pacific (Seoul)",
"DisplayName" : "South Korea, Seoul",
"Name" : "ap-northeast-2",
"ZoneList" : [
{
"CSPDisplayName" : "Asia Pacific (Seoul)",
"DisplayName" : "South Korea, Seoul",
"Name" : "ap-northeast-2a",
"Status" : "Available"
},
{
"CSPDisplayName" : "Asia Pacific (Seoul)",
"DisplayName" : "South Korea, Seoul",
"Name" : "ap-northeast-2b",
"Status" : "Available"
}
]
}
]
}
(2) νΉμ RegionZone μ‘°ν
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/ap-northeast-2?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
μλ΅ μμ:
{
"CSPDisplayName" : "Asia Pacific (Seoul)",
"DisplayName" : "South Korea, Seoul",
"Name" : "ap-northeast-2",
"ZoneList" : [
{
"CSPDisplayName" : "Asia Pacific (Seoul)",
"DisplayName" : "South Korea, Seoul",
"Name" : "ap-northeast-2a",
"Status" : "Available"
}
]
}
(3) CSP μλ³Έ Region λͺ©λ‘ μ‘°ν
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
μλ΅ μμ:
{
"RegionInfo" : {
"Regions" : [
{
"Endpoint" : "ec2.ap-south-1.amazonaws.com",
"OptInStatus" : "opt-in-not-required",
"RegionName" : "ap-south-1"
},
{
"Endpoint" : "ec2.eu-south-1.amazonaws.com",
"OptInStatus" : "opted-in",
"RegionName" : "eu-south-1"
}
]
}
}
4.2 μ°κ²° μ€μ ν (After Connection Configuration)
(1) μ 체 RegionZone λͺ©λ‘ μ‘°ν
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=aws-config01" | json_pp
(2) νΉμ RegionZone μ‘°ν
curl -sX GET "http://localhost:1024/spider/regionzone/ap-northeast-2?ConnectionName=aws-config01" | json_pp
(3) CSP μλ³Έ Region λͺ©λ‘ μ‘°ν
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=aws-config01" | json_pp
(4) CSP μλ³Έ Zone λͺ©λ‘ μ‘°ν
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=aws-config01" | json_pp
μλ΅ μμ:
{
"ZoneInfo" : [
{
"AvailabilityZones" : [
{
"GroupName" : "ap-south-1",
"Messages" : null,
"NetworkBorderGroup" : "ap-south-1",
"OptInStatus" : "opt-in-not-required",
"ParentZoneId" : null,
"ParentZoneName" : null,
"RegionName" : "ap-south-1",
"State" : "available",
"ZoneId" : "aps1-az1",
"ZoneName" : "ap-south-1a",
"ZoneType" : "availability-zone"
}
]
}
]
}
5. μ£Όμ μ¬ν
5.1 κΈ°λ³Έ Region/Zone μ€μ νμ (AWS, Alibaba, Tencent)
- μ°κ²° μ€μ μ Region/Zone μ‘°ν μ, AWSμ Alibabaλ λμ Region μ§μ μ΄ νμμ΄κ³ , Tencentλ Zone μ€μ λ νμνλ€.
- CB-Spiderλ
cloudos_meta.yamlμμ κΈ°λ³Έ Region/Zoneμ μ½μ΄ CSP APIλ₯Ό νΈμΆνλ€. - κΈ°λ³Έκ°μ
cloudos_meta.yamlμμ μνλ Region/ZoneμΌλ‘ λ³κ²½ν μ μλ€.
5.2 OrgZone API μ¬μ© κ°λ₯ λ²μ
OrgZoneAPI(GET /spider/orgzone)λ μ°κ²° μ€μ ν λͺ¨λμμλ§ μ¬μ© κ°λ₯νλ€ (ConnectionNameνμ).- μ°κ²° μ€μ μ λͺ¨λμμλ
OrgZoneμ ν΄λΉνλ APIκ° μ 곡λμ§ μλλ€.
5.3 OrgRegion / OrgZone μλ΅ νμμ CSPλ³λ‘ μμ΄
OrgRegionλ°OrgZoneμλ΅μ κ° CSPμ μλ³Έ λ°μ΄ν°λ₯Ό κ·Έλλ‘ μ λ¬νλ€.- μλ΅ κ΅¬μ‘°μ νλλͺ μ CSPλ³λ‘ λ€λ₯΄λ©°, CB-Spiderμμ μ κ·ννμ§ μλλ€.
6. API μλ΅ μ½λ
| HTTP μν μ½λ | μ€λͺ |
|---|---|
200 OK |
μ μ μλ΅ |
400 Bad Request |
μμ² νλΌλ―Έν° μ€λ₯ (νμ νλΌλ―Έν° λλ½ λλ μλͺ»λ κ°) |
500 Internal Server Error |
μλ² μ€λ₯ λλ CSP API νΈμΆ μ€ν¨ |