Region Zone Info Guide(KR) - cloud-barista/cb-spider GitHub Wiki

Region/Zone Info Guide

Language: English | ν•œκ΅­μ–΄

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으둜 쑰회
  • CSP 원본 Region/Zone λ°μ΄ν„°λŠ” OrgRegion 및 OrgZone APIλ₯Ό 톡해 λ³„λ„λ‘œ μ‘°νšŒν•  수 μžˆλ‹€.
  • 지원 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λ³„λ‘œ ꡬ쑰가 λ‹€λ₯΄λ‹€.
  • OrgZone API(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 μ‚¬μš© κ°€λŠ₯ λ²”μœ„

  • OrgZone API(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 호좜 μ‹€νŒ¨

7. 참고 자료