(To be deprecated) How to run and use the CM-Beetle #73
Locked
yunkon-kim
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Note
Docker Compose를 활용해 CM-Beetle 및 관련 컴포넌트를 구동하는 것을 정식 구동 방법으로서 메인테이닝 합니다.
Please, see the discussion #105
CM-Beetle을 실행 및 활용하기 위한 가이드입니다.
가이드와 관련한 Q&A, 이슈 등은 댓글로 남겨주면 좋을 것 같습니다.
아래와 같은 환경에서 테스트를 하였습니다. 참고 바랍니다.
서브시스템 버전:
테스트 환경
Note - Host
Prerequisites
: 사전에 설치 또는 서브시스템이 준비되어 있는경우 Skip 가능
필요 패키지/종속성 설치
: git, gcc, make, go, docker를 사전에 설치
Go 설치
Note - Install the latest stable version of Go for CM-Beetle contribution/development since backward compatibility seems to be supported.
For example, we can install Go 1.21.6 and use
go 1.19ingo.mod. (In the opposite case, you will encounter a build error.)Example - Install Go 1.21.6, see Go all releases and Download and install
Docker 설치
Docker Permission Denied 발생 시, How to Fix Docker Permission Denied? 참고
CB-Spider 및 CB-Tumblebug 실행
CB-Tumblebug 소스 빌드 및 실행 방법 상세에 따라 CB-Spider와 CB-Tumblebug을 실행합니다(CB-Spider v0.8.17, CB-Tumblebug v0.8.12 활용).
아래는 대략적인 흐름을 나타내며, 3개의 터미널이 사용됩니다.
터미널1 실행
1. CB-Tumblebug 소스코드 다운로드
참고 - Tumblebug README에서는
~/go/src/github.com/cloud-barista/cb-tumblebug를 기본 디렉토리로 활용합니다. 필요시 변경하시기 바랍니다.(Tumblebug v0.9.0를 활용을 위해 checkout)
2. CB-Spider container 실행(v0.9.0)
터미널2 실행
3. CB-Tumblebug 소스코드 빌드 및 container 실행(v0.9.0)
(필요시 참고) 아래를 실행 시 Tumblebug Swagger UI URL, ID, Password 출력됩니다.
터미널3 실행
4. 활용하려는 CSP의 Credential 준비(참고: CSP별 인증 정보 획득 방법)
5. 크리덴셜 파일 생성
파일 생성 방법: 아래 스크립트를 통해
credentials.yaml파일 자동 생성 (경로:~/.cloud-barista/)6. 4번에서 준비한 CSP의 Credential 정보를 활용하여
~/.cloud-barista/credentials.yaml파일을 알맞게 수정7. 모든 멀티 클라우드 연결 정보 및 공통 자원 등록
: CB-Tumblebug을 활용하여 멀티 클라우드 인프라를 생성하기 위해 필요한 클라우드 연결 정보(크리덴셜, 클라우드 종류, 클라우드 리젼 등), 공통 활용 이미지 및 스펙 등에 등록이 필요합니다.
: 다음 스크립트를 통해 이것을 일괄 등록할 수 있습니다.
: 등록 방법: README.md for init.py를 참고하여, init.py 스크립트 실행 (확인 메시지에 대해 'y' 입력)
(결과 참고 - AWS 크리덴셜을 입력하여 54개 이미지, 250개 스펙이 등록된 결과)
Getting started CM-Beetle
별도의 터미널 실행
1. CM-Beetle 소스코드 다운로드
참고 - 여기에서는
~/go/src/github.com/cloud-barista/cm-beetle을 기본 디렉토리로 활용합니다. 필요시 변경하시기 바랍니다.(Beetle v0.2.0 활용을 위해 checkout)
2. CM-Beetle 소스코드 빌드 및 실행(v0.2.0)
아래를 실행 시 Beetle Swagger UI URL, ID, Password 출력됩니다.
3. Swagger UI 접속
2에서 출력된 정보 활용하여 Swagger UI에 접속합니다.
4번 부터는 API 요청 및 응답에 대한 설명입니다. API들이 호출되는 순서 및 관계를 확인하실 수 있습니다.
4. Infra Recommendation API 호출
: 소스 컴퓨팅 인프라의 서버 정보를 입력하면, 클라우드 인프라(목표 모델)를 추천해 주는 API 입니다.
: 활용 방법, 순서, 요청/응답 예시는 다음과 같습니다.
POST /recommendation/infraTry it out버튼 클릭Execute버튼 클릭Click see API details
{ "servers": [ { "compute": { "os": { "os": { "name": "linux", "vendor": "ubuntu", "version": "22.04.4 LTS (Jammy Jellyfish)", "release": "22.04", "architecture": "x86_64" }, "kernel": { "release": "6.5.0-28-generic", "version": "#29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2", "architecture": "x86_64" }, "node": { "hostname": "cm-web", "hypervisor": "", "machineid": "0036e4b9-c8b4-e811-906e-000ffee02d5c", "timezone": "KST" } }, "compute_resource": { "cpu": { "vendor": "GenuineIntel", "model": "Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz", "max_speed": 3700, "cache": 25344, "cpus": 2, "cores": 18, "threads": 36 }, "memory": { "type": "DDR4", "speed": 2666, "size": 262136 }, "root_disk": { "label": "Windows 11 (TODO: DUMMY DATA)", "type": "SSD", "size": 50 }, "data_disk": [ { "label": "Storage 1 (TODO: DUMMY DATA)", "type": "HDD", "size": 100 }, { "label": "Storage 2 (TODO: DUMMY DATA)", "type": "HDD", "size": 200 } ] }, "connection": null }, "network": { "host": { "network_interface": [ { "interface": "lo", "address": [ "127.0.0.1/8", "::1/128" ], "gateway": null, "mac_address": "", "mtu": 65536 }, { "interface": "eno1", "address": [ "172.29.0.103/24", "fe80::a6bf:1ff:fe5a:b11b/64" ], "gateway": null, "mac_address": "a4:bf:01:5a:b1:1b", "mtu": 1500 }, { "interface": "enp24s0f0", "address": null, "gateway": null, "mac_address": "b4:96:91:53:01:58", "mtu": 1500 }, { "interface": "enp175s0f0", "address": null, "gateway": null, "mac_address": "b4:96:91:55:23:8c", "mtu": 1500 }, { "interface": "enp175s0f1", "address": null, "gateway": null, "mac_address": "b4:96:91:55:23:8e", "mtu": 1500 }, { "interface": "enp24s0f1", "address": null, "gateway": null, "mac_address": "b4:96:91:53:01:59", "mtu": 1500 }, { "interface": "enp177s0f0", "address": null, "gateway": null, "mac_address": "b4:96:91:55:1e:04", "mtu": 1500 }, { "interface": "eno2", "address": [ "192.168.110.103/24", "fe80::a6bf:1ff:fe5a:b11c/64" ], "gateway": [ "192.168.110.254" ], "mac_address": "a4:bf:01:5a:b1:1c", "mtu": 1500 }, { "interface": "enp26s0f0", "address": null, "gateway": null, "mac_address": "b4:96:91:53:01:6c", "mtu": 1500 }, { "interface": "enp26s0f1", "address": null, "gateway": null, "mac_address": "b4:96:91:53:01:6d", "mtu": 1500 }, { "interface": "enp177s0f1", "address": null, "gateway": null, "mac_address": "b4:96:91:55:1e:06", "mtu": 1500 }, { "interface": "docker0", "address": [ "172.17.0.1/16" ], "gateway": null, "mac_address": "02:42:64:bb:bd:75", "mtu": 1500 } ], "dns": { "dns_server": [ "1.1.1.1", "1.0.0.1" ] }, "route": [ { "destination": "0.0.0.0", "netmask": "0.0.0.0", "next_hop": "192.168.110.254" }, { "destination": "172.17.0.0", "netmask": "255.255.0.0", "next_hop": "docker0" }, { "destination": "172.29.0.0", "netmask": "255.255.255.0", "next_hop": "eno1" }, { "destination": "192.168.110.0", "netmask": "255.255.255.0", "next_hop": "eno2" } ], "firewall_rule": [] }, "csp": { "name": "", "vpc": null, "nlb": null, "security_group": null } }, "gpu": { "nvidia": [], "drm": [ { "driver_name": "ast", "driver_version": "0.1.0", "driver_date": "20120228", "driver_description": "AST" } ] }, "storage": { "mount_point": { "mounted_information": null } } }, { "compute": { "os": { "os": { "name": "linux", "vendor": "ubuntu", "version": "22.04.4 LTS (Jammy Jellyfish)", "release": "22.04", "architecture": "x86_64" }, "kernel": { "release": "6.5.0-28-generic", "version": "#29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2", "architecture": "x86_64" }, "node": { "hostname": "cm-nfs", "hypervisor": "", "machineid": "00a9f3d4-74b6-e811-906e-000ffee02d5c", "timezone": "KST" } }, "compute_resource": { "cpu": { "vendor": "GenuineIntel", "model": "Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz", "max_speed": 3700, "cache": 25344, "cpus": 2, "cores": 18, "threads": 36 }, "memory": { "type": "DDR4", "speed": 2666, "size": 262136 }, "root_disk": { "label": "Windows 11 (TODO: DUMMY DATA)", "type": "SSD", "size": 50 }, "data_disk": [ { "label": "Storage 1 (TODO: DUMMY DATA)", "type": "HDD", "size": 100 }, { "label": "Storage 2 (TODO: DUMMY DATA)", "type": "HDD", "size": 200 } ] }, "connection": null }, "network": { "host": { "network_interface": [ { "interface": "lo", "address": [ "127.0.0.1/8", "::1/128" ], "gateway": null, "mac_address": "", "mtu": 65536 }, { "interface": "enp175s0f0", "address": null, "gateway": null, "mac_address": "b4:96:91:47:70:f0", "mtu": 1500 }, { "interface": "eno1", "address": [ "172.29.0.102/24", "fe80::a6bf:1ff:fe5a:b003/64" ], "gateway": null, "mac_address": "a4:bf:01:5a:b0:03", "mtu": 1500 }, { "interface": "enp24s0f0", "address": null, "gateway": null, "mac_address": "b4:96:91:52:fa:e8", "mtu": 1500 }, { "interface": "enp175s0f1", "address": null, "gateway": null, "mac_address": "b4:96:91:47:70:f2", "mtu": 1500 }, { "interface": "enp24s0f1", "address": null, "gateway": null, "mac_address": "b4:96:91:52:fa:e9", "mtu": 1500 }, { "interface": "enp177s0f0", "address": null, "gateway": null, "mac_address": "b4:96:91:47:80:0c", "mtu": 1500 }, { "interface": "enp177s0f1", "address": null, "gateway": null, "mac_address": "b4:96:91:47:80:0e", "mtu": 1500 }, { "interface": "enp26s0f0", "address": null, "gateway": null, "mac_address": "b4:96:91:53:01:54", "mtu": 1500 }, { "interface": "eno2", "address": [ "192.168.110.102/24", "fe80::a6bf:1ff:fe5a:b004/64" ], "gateway": [ "192.168.110.254" ], "mac_address": "a4:bf:01:5a:b0:04", "mtu": 1500 }, { "interface": "enp26s0f1", "address": null, "gateway": null, "mac_address": "b4:96:91:53:01:55", "mtu": 1500 }, { "interface": "docker0", "address": [ "172.17.0.1/16", "fe80::42:ddff:fe60:6f36/64" ], "gateway": null, "mac_address": "02:42:dd:60:6f:36", "mtu": 1500 }, { "interface": "br-d6538831e60d", "address": [ "172.20.0.1/16", "fe80::42:47ff:fedd:b497/64" ], "gateway": null, "mac_address": "02:42:47:dd:b4:97", "mtu": 1500 }, { "interface": "veth22e63e1", "address": [ "fe80::b8c9:62ff:fea9:871/64" ], "gateway": null, "mac_address": "ba:c9:62:a9:08:71", "mtu": 1500 }, { "interface": "vethc755782", "address": [ "fe80::2078:1cff:fea6:3617/64" ], "gateway": null, "mac_address": "22:78:1c:a6:36:17", "mtu": 1500 }, { "interface": "veth189cac2", "address": [ "fe80::7c29:acff:fe6f:7414/64" ], "gateway": null, "mac_address": "7e:29:ac:6f:74:14", "mtu": 1500 } ], "dns": { "dns_server": [ "1.1.1.1", "1.0.0.1" ] }, "route": [ { "destination": "0.0.0.0", "netmask": "0.0.0.0", "next_hop": "192.168.110.254" }, { "destination": "172.17.0.0", "netmask": "255.255.0.0", "next_hop": "docker0" }, { "destination": "172.20.0.0", "netmask": "255.255.0.0", "next_hop": "br-d6538831e60d" }, { "destination": "172.29.0.0", "netmask": "255.255.255.0", "next_hop": "eno1" }, { "destination": "192.168.110.0", "netmask": "255.255.255.0", "next_hop": "eno2" } ], "firewall_rule": [] }, "csp": { "name": "", "vpc": null, "nlb": null, "security_group": null } }, "gpu": { "nvidia": [], "drm": [ { "driver_name": "ast", "driver_version": "0.1.0", "driver_date": "20120228", "driver_description": "AST" } ] }, "storage": { "mount_point": { "mounted_information": null } } } ] }Process (Handler/controller):
Output (Response body): 추천된 인프라 (목표 모델)
{ "name": "cloud-infra01", "installMonAgent": "no", "label": "rehosted-infra", "systemLabel": "", "description": "A cloud infra recommended by CM-Beetle", "vm": [ { "name": "rehosted-cm-web", "subGroupSize": "", "label": "rehosted-vm", "description": "a recommended virtual machine", "commonSpec": "aws+ap-northeast-2+i3.8xlarge", "commonImage": "aws+ap-northeast-2+ubuntu22.04" }, { "name": "rehosted-cm-nfs", "subGroupSize": "", "label": "rehosted-vm", "description": "a recommended virtual machine", "commonSpec": "aws+ap-northeast-2+i3.8xlarge", "commonImage": "aws+ap-northeast-2+ubuntu22.04" } ] }5. Infra Migration API 호출
: 추천된 클라우드 인프라(목표 모델)에 따라 인프라 마이그레이션을 수행하는 API 입니다.
: 활용 방법, 순서, 요청/응답 예시는 다음과 같습니다.
POST /migration/infraTry it out버튼 클릭POST /recommendation/infra의 출력 값 임)Execute버튼 클릭Click see API details
POST /recommendation/infra의 출력과 동일 (타겟 모델){ "id": "cloud-infra01", "name": "cloud-infra01", "status": "Running:2 (R:2/2)", "statusCount": { "countTotal": 2, "countCreating": 0, "countRunning": 2, "countFailed": 0, "countSuspended": 0, "countRebooting": 0, "countTerminated": 0, "countSuspending": 0, "countResuming": 0, "countTerminating": 0, "countUndefined": 0 }, "targetStatus": "Running", "targetAction": "Create", "installMonAgent": "no", "configureCloudAdaptiveNetwork": "", "label": "rehosted-infra", "systemLabel": "", "systemMessage": "", "description": "A cloud infra recommended by CM-Beetle", "vm": [ { "id": "rehosted-cm-nfs-1", "name": "rehosted-cm-nfs-1", "idByCSP": "", "subGroupId": "rehosted-cm-nfs", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "status": "Running", "targetStatus": "None", "targetAction": "None", "monAgentStatus": "notInstalled", "networkAgentStatus": "notInstalled", "systemMessage": "", "createdTime": "2024-06-13 20:29:25", "label": "rehosted-vm", "description": "a recommended virtual machine", "region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "publicIP": "43.202.41.149", "sshPort": "22", "publicDNS": "", "privateIP": "10.4.63.52", "privateDNS": "ip-10-4-63-52.ap-northeast-2.compute.internal", "rootDiskType": "gp2", "rootDiskSize": "8", "rootDeviceName": "/dev/sda1", "connectionName": "aws-ap-northeast-2", "connectionConfig": { "configName": "aws-ap-northeast-2", "providerName": "aws", "driverName": "aws-driver-v1.0.so", "credentialName": "aws", "credentialHolder": "admin", "regionZoneInfoName": "aws-ap-northeast-2", "regionZoneInfo": { "assignedRegion": "ap-northeast-2", "assignedZone": "ap-northeast-2a" }, "regionDetail": { "regionId": "ap-northeast-2", "regionName": "ap-northeast-2", "description": "Asia Pacific (Seoul)", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "zones": [ "ap-northeast-2a", "ap-northeast-2b", "ap-northeast-2c", "ap-northeast-2d" ] }, "regionRepresentative": true, "verified": true }, "specId": "aws+ap-northeast-2+i3.8xlarge", "imageId": "aws+ap-northeast-2+ubuntu22.04", "vNetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "subnetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "securityGroupIds": [ "ns-mig01-systemdefault-aws-ap-northeast-2" ], "dataDiskIds": null, "sshKeyId": "ns-mig01-systemdefault-aws-ap-northeast-2", "vmUserAccount": "cb-user", "cspViewVmDetail": { "Name": "", "ImageName": "", "VPCName": "", "SubnetName": "", "SecurityGroupNames": null, "KeyPairName": "", "CSPid": "", "DataDiskNames": null, "VMSpecName": "i3.8xlarge", "VMUserId": "cb-user", "VMUserPasswd": "", "RootDiskType": "gp2", "RootDiskSize": "8", "ImageType": "PublicImage", "IId": { "NameId": "ns-mig01-cloud-infra01-rehosted-cm-nfs-1", "SystemId": "i-0206adb4d851f389b" }, "ImageIId": { "NameId": "ami-058165de3b7202099", "SystemId": "ami-058165de3b7202099" }, "VpcIID": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "vpc-098aeb0297852809c" }, "SubnetIID": { "NameId": "ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "subnet-0318e79d12f434d1a" }, "SecurityGroupIIds": [ { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "sg-0b5348b491da7e6c8" } ], "KeyPairIId": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cpldfm968idjonrqu7e0" }, "DataDiskIIDs": [], "StartTime": "2024-06-13T11:28:37Z", "Region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "NetworkInterface": "eni-attach-0a5b5a24fac82ccb9", "PublicIP": "43.202.41.149", "PublicDNS": "", "PrivateIP": "10.4.63.52", "PrivateDNS": "ip-10-4-63-52.ap-northeast-2.compute.internal", "RootDeviceName": "/dev/sda1", "SSHAccessPoint": "43.202.41.149:22", "KeyValueList": [ { "Key": "State", "Value": "running" }, { "Key": "Architecture", "Value": "x86_64" }, { "Key": "VpcId", "Value": "vpc-098aeb0297852809c" }, { "Key": "SubnetId", "Value": "subnet-0318e79d12f434d1a" }, { "Key": "KeyName", "Value": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cpldfm968idjonrqu7e0" }, { "Key": "VirtualizationType", "Value": "hvm" } ] } }, { "id": "rehosted-cm-web-1", "name": "rehosted-cm-web-1", "idByCSP": "", "subGroupId": "rehosted-cm-web", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "status": "Running", "targetStatus": "None", "targetAction": "None", "monAgentStatus": "notInstalled", "networkAgentStatus": "notInstalled", "systemMessage": "", "createdTime": "2024-06-13 20:29:17", "label": "rehosted-vm", "description": "a recommended virtual machine", "region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "publicIP": "52.79.162.214", "sshPort": "22", "publicDNS": "", "privateIP": "10.4.1.24", "privateDNS": "ip-10-4-1-24.ap-northeast-2.compute.internal", "rootDiskType": "gp2", "rootDiskSize": "8", "rootDeviceName": "/dev/sda1", "connectionName": "aws-ap-northeast-2", "connectionConfig": { "configName": "aws-ap-northeast-2", "providerName": "aws", "driverName": "aws-driver-v1.0.so", "credentialName": "aws", "credentialHolder": "admin", "regionZoneInfoName": "aws-ap-northeast-2", "regionZoneInfo": { "assignedRegion": "ap-northeast-2", "assignedZone": "ap-northeast-2a" }, "regionDetail": { "regionId": "ap-northeast-2", "regionName": "ap-northeast-2", "description": "Asia Pacific (Seoul)", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "zones": [ "ap-northeast-2a", "ap-northeast-2b", "ap-northeast-2c", "ap-northeast-2d" ] }, "regionRepresentative": true, "verified": true }, "specId": "aws+ap-northeast-2+i3.8xlarge", "imageId": "aws+ap-northeast-2+ubuntu22.04", "vNetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "subnetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "securityGroupIds": [ "ns-mig01-systemdefault-aws-ap-northeast-2" ], "dataDiskIds": null, "sshKeyId": "ns-mig01-systemdefault-aws-ap-northeast-2", "vmUserAccount": "cb-user", "cspViewVmDetail": { "Name": "", "ImageName": "", "VPCName": "", "SubnetName": "", "SecurityGroupNames": null, "KeyPairName": "", "CSPid": "", "DataDiskNames": null, "VMSpecName": "i3.8xlarge", "VMUserId": "cb-user", "VMUserPasswd": "", "RootDiskType": "gp2", "RootDiskSize": "8", "ImageType": "PublicImage", "IId": { "NameId": "ns-mig01-cloud-infra01-rehosted-cm-web-1", "SystemId": "i-03cf4ac1bc7b26d42" }, "ImageIId": { "NameId": "ami-058165de3b7202099", "SystemId": "ami-058165de3b7202099" }, "VpcIID": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "vpc-098aeb0297852809c" }, "SubnetIID": { "NameId": "ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "subnet-0318e79d12f434d1a" }, "SecurityGroupIIds": [ { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "sg-0b5348b491da7e6c8" } ], "KeyPairIId": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cpldfm968idjonrqu7e0" }, "DataDiskIIDs": [], "StartTime": "2024-06-13T11:28:38Z", "Region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "NetworkInterface": "eni-attach-004e49e5a41810a15", "PublicIP": "52.79.162.214", "PublicDNS": "", "PrivateIP": "10.4.1.24", "PrivateDNS": "ip-10-4-1-24.ap-northeast-2.compute.internal", "RootDeviceName": "/dev/sda1", "SSHAccessPoint": "52.79.162.214:22", "KeyValueList": [ { "Key": "State", "Value": "running" }, { "Key": "Architecture", "Value": "x86_64" }, { "Key": "VpcId", "Value": "vpc-098aeb0297852809c" }, { "Key": "SubnetId", "Value": "subnet-0318e79d12f434d1a" }, { "Key": "KeyName", "Value": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cpldfm968idjonrqu7e0" }, { "Key": "VirtualizationType", "Value": "hvm" } ] } } ], "newVmList": null }Process (Handler/controller):
Output (Response body): 마이그레이션된 인프라 정보
{ "id": "cloud-infra01", "name": "cloud-infra01", "status": "Running:2 (R:2/2)", "statusCount": { "countTotal": 2, "countCreating": 0, "countRunning": 2, "countFailed": 0, "countSuspended": 0, "countRebooting": 0, "countTerminated": 0, "countSuspending": 0, "countResuming": 0, "countTerminating": 0, "countUndefined": 0 }, "targetStatus": "Running", "targetAction": "Create", "installMonAgent": "no", "configureCloudAdaptiveNetwork": "", "label": "rehosted-infra", "systemLabel": "", "systemMessage": "", "description": "A cloud infra recommended by CM-Beetle", "vm": [ { "id": "rehosted-cm-nfs-1", "name": "rehosted-cm-nfs-1", "idByCSP": "", "subGroupId": "rehosted-cm-nfs", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "status": "Running", "targetStatus": "None", "targetAction": "None", "monAgentStatus": "notInstalled", "networkAgentStatus": "notInstalled", "systemMessage": "", "createdTime": "2024-07-04 12:07:24", "label": "rehosted-vm", "description": "a recommended virtual machine", "region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "publicIP": "3.38.252.11", "sshPort": "22", "publicDNS": "", "privateIP": "10.4.6.14", "privateDNS": "ip-10-4-6-14.ap-northeast-2.compute.internal", "rootDiskType": "gp2", "rootDiskSize": "8", "rootDeviceName": "/dev/sda1", "connectionName": "aws-ap-northeast-2", "connectionConfig": { "configName": "aws-ap-northeast-2", "providerName": "aws", "driverName": "aws-driver-v1.0.so", "credentialName": "aws", "credentialHolder": "admin", "regionZoneInfoName": "aws-ap-northeast-2", "regionZoneInfo": { "assignedRegion": "ap-northeast-2", "assignedZone": "ap-northeast-2a" }, "regionDetail": { "regionId": "ap-northeast-2", "regionName": "ap-northeast-2", "description": "Asia Pacific (Seoul)", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "zones": [ "ap-northeast-2a", "ap-northeast-2b", "ap-northeast-2c", "ap-northeast-2d" ] }, "regionRepresentative": true, "verified": true }, "specId": "aws+ap-northeast-2+i3.8xlarge", "imageId": "aws+ap-northeast-2+ubuntu22.04", "vNetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "subnetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "securityGroupIds": [ "ns-mig01-systemdefault-aws-ap-northeast-2" ], "dataDiskIds": null, "sshKeyId": "ns-mig01-systemdefault-aws-ap-northeast-2", "vmUserAccount": "cb-user", "cspViewVmDetail": { "Name": "", "ImageName": "", "VPCName": "", "SubnetName": "", "SecurityGroupNames": null, "KeyPairName": "", "CSPid": "", "DataDiskNames": null, "VMSpecName": "i3.8xlarge", "VMUserId": "cb-user", "VMUserPasswd": "", "RootDiskType": "gp2", "RootDiskSize": "8", "ImageType": "PublicImage", "IId": { "NameId": "ns-mig01-cloud-infra01-rehosted-cm-nfs-1", "SystemId": "i-0c121c1fef34fb054" }, "ImageIId": { "NameId": "ami-058165de3b7202099", "SystemId": "ami-058165de3b7202099" }, "VpcIID": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "vpc-01cbfa0069b6dfdf7" }, "SubnetIID": { "NameId": "ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "subnet-052227582e2314b99" }, "SecurityGroupIIds": [ { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "sg-01be12046902a8528" } ], "KeyPairIId": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cq313gat4u1ikiul4c30" }, "DataDiskIIDs": [], "StartTime": "2024-07-04T03:06:48Z", "Region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "NetworkInterface": "eni-attach-01407d663731be32f", "PublicIP": "3.38.252.11", "PublicDNS": "", "PrivateIP": "10.4.6.14", "PrivateDNS": "ip-10-4-6-14.ap-northeast-2.compute.internal", "RootDeviceName": "/dev/sda1", "SSHAccessPoint": "3.38.252.11:22", "KeyValueList": [ { "Key": "State", "Value": "running" }, { "Key": "Architecture", "Value": "x86_64" }, { "Key": "VpcId", "Value": "vpc-01cbfa0069b6dfdf7" }, { "Key": "SubnetId", "Value": "subnet-052227582e2314b99" }, { "Key": "KeyName", "Value": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cq313gat4u1ikiul4c30" }, { "Key": "VirtualizationType", "Value": "hvm" } ] } }, { "id": "rehosted-cm-web-1", "name": "rehosted-cm-web-1", "idByCSP": "", "subGroupId": "rehosted-cm-web", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "status": "Running", "targetStatus": "None", "targetAction": "None", "monAgentStatus": "notInstalled", "networkAgentStatus": "notInstalled", "systemMessage": "", "createdTime": "2024-07-04 12:07:21", "label": "rehosted-vm", "description": "a recommended virtual machine", "region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "publicIP": "3.36.72.169", "sshPort": "22", "publicDNS": "", "privateIP": "10.4.56.178", "privateDNS": "ip-10-4-56-178.ap-northeast-2.compute.internal", "rootDiskType": "gp2", "rootDiskSize": "8", "rootDeviceName": "/dev/sda1", "connectionName": "aws-ap-northeast-2", "connectionConfig": { "configName": "aws-ap-northeast-2", "providerName": "aws", "driverName": "aws-driver-v1.0.so", "credentialName": "aws", "credentialHolder": "admin", "regionZoneInfoName": "aws-ap-northeast-2", "regionZoneInfo": { "assignedRegion": "ap-northeast-2", "assignedZone": "ap-northeast-2a" }, "regionDetail": { "regionId": "ap-northeast-2", "regionName": "ap-northeast-2", "description": "Asia Pacific (Seoul)", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "zones": [ "ap-northeast-2a", "ap-northeast-2b", "ap-northeast-2c", "ap-northeast-2d" ] }, "regionRepresentative": true, "verified": true }, "specId": "aws+ap-northeast-2+i3.8xlarge", "imageId": "aws+ap-northeast-2+ubuntu22.04", "vNetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "subnetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "securityGroupIds": [ "ns-mig01-systemdefault-aws-ap-northeast-2" ], "dataDiskIds": null, "sshKeyId": "ns-mig01-systemdefault-aws-ap-northeast-2", "vmUserAccount": "cb-user", "cspViewVmDetail": { "Name": "", "ImageName": "", "VPCName": "", "SubnetName": "", "SecurityGroupNames": null, "KeyPairName": "", "CSPid": "", "DataDiskNames": null, "VMSpecName": "i3.8xlarge", "VMUserId": "cb-user", "VMUserPasswd": "", "RootDiskType": "gp2", "RootDiskSize": "8", "ImageType": "PublicImage", "IId": { "NameId": "ns-mig01-cloud-infra01-rehosted-cm-web-1", "SystemId": "i-05cb2bd640ee3056d" }, "ImageIId": { "NameId": "ami-058165de3b7202099", "SystemId": "ami-058165de3b7202099" }, "VpcIID": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "vpc-01cbfa0069b6dfdf7" }, "SubnetIID": { "NameId": "ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "subnet-052227582e2314b99" }, "SecurityGroupIIds": [ { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "sg-01be12046902a8528" } ], "KeyPairIId": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cq313gat4u1ikiul4c30" }, "DataDiskIIDs": [], "StartTime": "2024-07-04T03:06:45Z", "Region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "NetworkInterface": "eni-attach-0564f84634c47ff6d", "PublicIP": "3.36.72.169", "PublicDNS": "", "PrivateIP": "10.4.56.178", "PrivateDNS": "ip-10-4-56-178.ap-northeast-2.compute.internal", "RootDeviceName": "/dev/sda1", "SSHAccessPoint": "3.36.72.169:22", "KeyValueList": [ { "Key": "State", "Value": "running" }, { "Key": "Architecture", "Value": "x86_64" }, { "Key": "VpcId", "Value": "vpc-01cbfa0069b6dfdf7" }, { "Key": "SubnetId", "Value": "subnet-052227582e2314b99" }, { "Key": "KeyName", "Value": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cq313gat4u1ikiul4c30" }, { "Key": "VirtualizationType", "Value": "hvm" } ] } } ], "newVmList": null }6. 마이그레이션된 Infra 조회 API 호출
: 마이그레이션된 인프라 정보를 조회하는 API 입니다.
: 활용 방법, 순서, 요청/응답 예시는 다음과 같습니다.
GET /migration/infra/{infraId}Try it out버튼 클릭cloud-infra01(아래 예시 참고)Execute버튼 클릭Click see API details
Input (Path param): 마이그레이션된 인프라 ID
cloud-infra01Process (handler/controller):
Output (Response body): 클라우드로 마이그레이션된 인프라 정보
{ "id": "cloud-infra01", "name": "cloud-infra01", "status": "Running:2 (R:2/2)", "statusCount": { "countTotal": 2, "countCreating": 0, "countRunning": 2, "countFailed": 0, "countSuspended": 0, "countRebooting": 0, "countTerminated": 0, "countSuspending": 0, "countResuming": 0, "countTerminating": 0, "countUndefined": 0 }, "targetStatus": "None", "targetAction": "None", "installMonAgent": "no", "configureCloudAdaptiveNetwork": "", "label": "rehosted-infra", "systemLabel": "", "systemMessage": "", "description": "A cloud infra recommended by CM-Beetle", "vm": [ { "id": "rehosted-cm-nfs-1", "name": "rehosted-cm-nfs-1", "idByCSP": "", "subGroupId": "rehosted-cm-nfs", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "status": "Running", "targetStatus": "None", "targetAction": "None", "monAgentStatus": "notInstalled", "networkAgentStatus": "notInstalled", "systemMessage": "", "createdTime": "2024-06-13 20:29:25", "label": "rehosted-vm", "description": "a recommended virtual machine", "region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "publicIP": "43.202.41.149", "sshPort": "22", "publicDNS": "", "privateIP": "10.4.63.52", "privateDNS": "ip-10-4-63-52.ap-northeast-2.compute.internal", "rootDiskType": "gp2", "rootDiskSize": "8", "rootDeviceName": "/dev/sda1", "connectionName": "aws-ap-northeast-2", "connectionConfig": { "configName": "aws-ap-northeast-2", "providerName": "aws", "driverName": "aws-driver-v1.0.so", "credentialName": "aws", "credentialHolder": "admin", "regionZoneInfoName": "aws-ap-northeast-2", "regionZoneInfo": { "assignedRegion": "ap-northeast-2", "assignedZone": "ap-northeast-2a" }, "regionDetail": { "regionId": "ap-northeast-2", "regionName": "ap-northeast-2", "description": "Asia Pacific (Seoul)", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "zones": [ "ap-northeast-2a", "ap-northeast-2b", "ap-northeast-2c", "ap-northeast-2d" ] }, "regionRepresentative": true, "verified": true }, "specId": "aws+ap-northeast-2+i3.8xlarge", "imageId": "aws+ap-northeast-2+ubuntu22.04", "vNetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "subnetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "securityGroupIds": [ "ns-mig01-systemdefault-aws-ap-northeast-2" ], "dataDiskIds": null, "sshKeyId": "ns-mig01-systemdefault-aws-ap-northeast-2", "vmUserAccount": "cb-user", "cspViewVmDetail": { "Name": "", "ImageName": "", "VPCName": "", "SubnetName": "", "SecurityGroupNames": null, "KeyPairName": "", "CSPid": "", "DataDiskNames": null, "VMSpecName": "i3.8xlarge", "VMUserId": "cb-user", "VMUserPasswd": "", "RootDiskType": "gp2", "RootDiskSize": "8", "ImageType": "PublicImage", "IId": { "NameId": "ns-mig01-cloud-infra01-rehosted-cm-nfs-1", "SystemId": "i-0206adb4d851f389b" }, "ImageIId": { "NameId": "ami-058165de3b7202099", "SystemId": "ami-058165de3b7202099" }, "VpcIID": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "vpc-098aeb0297852809c" }, "SubnetIID": { "NameId": "ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "subnet-0318e79d12f434d1a" }, "SecurityGroupIIds": [ { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "sg-0b5348b491da7e6c8" } ], "KeyPairIId": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cpldfm968idjonrqu7e0" }, "DataDiskIIDs": [], "StartTime": "2024-06-13T11:28:37Z", "Region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "NetworkInterface": "eni-attach-0a5b5a24fac82ccb9", "PublicIP": "43.202.41.149", "PublicDNS": "", "PrivateIP": "10.4.63.52", "PrivateDNS": "ip-10-4-63-52.ap-northeast-2.compute.internal", "RootDeviceName": "/dev/sda1", "SSHAccessPoint": "43.202.41.149:22", "KeyValueList": [ { "Key": "State", "Value": "running" }, { "Key": "Architecture", "Value": "x86_64" }, { "Key": "VpcId", "Value": "vpc-098aeb0297852809c" }, { "Key": "SubnetId", "Value": "subnet-0318e79d12f434d1a" }, { "Key": "KeyName", "Value": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cpldfm968idjonrqu7e0" }, { "Key": "VirtualizationType", "Value": "hvm" } ] } }, { "id": "rehosted-cm-web-1", "name": "rehosted-cm-web-1", "idByCSP": "", "subGroupId": "rehosted-cm-web", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "status": "Running", "targetStatus": "None", "targetAction": "None", "monAgentStatus": "notInstalled", "networkAgentStatus": "notInstalled", "systemMessage": "", "createdTime": "2024-06-13 20:29:17", "label": "rehosted-vm", "description": "a recommended virtual machine", "region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "publicIP": "52.79.162.214", "sshPort": "22", "publicDNS": "", "privateIP": "10.4.1.24", "privateDNS": "ip-10-4-1-24.ap-northeast-2.compute.internal", "rootDiskType": "gp2", "rootDiskSize": "8", "rootDeviceName": "/dev/sda1", "connectionName": "aws-ap-northeast-2", "connectionConfig": { "configName": "aws-ap-northeast-2", "providerName": "aws", "driverName": "aws-driver-v1.0.so", "credentialName": "aws", "credentialHolder": "admin", "regionZoneInfoName": "aws-ap-northeast-2", "regionZoneInfo": { "assignedRegion": "ap-northeast-2", "assignedZone": "ap-northeast-2a" }, "regionDetail": { "regionId": "ap-northeast-2", "regionName": "ap-northeast-2", "description": "Asia Pacific (Seoul)", "location": { "display": "South Korea (Seoul)", "latitude": 37.36, "longitude": 126.78 }, "zones": [ "ap-northeast-2a", "ap-northeast-2b", "ap-northeast-2c", "ap-northeast-2d" ] }, "regionRepresentative": true, "verified": true }, "specId": "aws+ap-northeast-2+i3.8xlarge", "imageId": "aws+ap-northeast-2+ubuntu22.04", "vNetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "subnetId": "ns-mig01-systemdefault-aws-ap-northeast-2", "securityGroupIds": [ "ns-mig01-systemdefault-aws-ap-northeast-2" ], "dataDiskIds": null, "sshKeyId": "ns-mig01-systemdefault-aws-ap-northeast-2", "vmUserAccount": "cb-user", "cspViewVmDetail": { "Name": "", "ImageName": "", "VPCName": "", "SubnetName": "", "SecurityGroupNames": null, "KeyPairName": "", "CSPid": "", "DataDiskNames": null, "VMSpecName": "i3.8xlarge", "VMUserId": "cb-user", "VMUserPasswd": "", "RootDiskType": "gp2", "RootDiskSize": "8", "ImageType": "PublicImage", "IId": { "NameId": "ns-mig01-cloud-infra01-rehosted-cm-web-1", "SystemId": "i-03cf4ac1bc7b26d42" }, "ImageIId": { "NameId": "ami-058165de3b7202099", "SystemId": "ami-058165de3b7202099" }, "VpcIID": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "vpc-098aeb0297852809c" }, "SubnetIID": { "NameId": "ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "subnet-0318e79d12f434d1a" }, "SecurityGroupIIds": [ { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "sg-0b5348b491da7e6c8" } ], "KeyPairIId": { "NameId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2", "SystemId": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cpldfm968idjonrqu7e0" }, "DataDiskIIDs": [], "StartTime": "2024-06-13T11:28:38Z", "Region": { "Region": "ap-northeast-2", "Zone": "ap-northeast-2a" }, "NetworkInterface": "eni-attach-004e49e5a41810a15", "PublicIP": "52.79.162.214", "PublicDNS": "", "PrivateIP": "10.4.1.24", "PrivateDNS": "ip-10-4-1-24.ap-northeast-2.compute.internal", "RootDeviceName": "/dev/sda1", "SSHAccessPoint": "52.79.162.214:22", "KeyValueList": [ { "Key": "State", "Value": "running" }, { "Key": "Architecture", "Value": "x86_64" }, { "Key": "VpcId", "Value": "vpc-098aeb0297852809c" }, { "Key": "SubnetId", "Value": "subnet-0318e79d12f434d1a" }, { "Key": "KeyName", "Value": "ns-mig01-ns-mig01-systemdefault-aws-ap-northeast-2-cpldfm968idjonrqu7e0" }, { "Key": "VirtualizationType", "Value": "hvm" } ] } } ], "newVmList": null }7. 마이그레이션된 Infra 삭제 API 호출
: 마이그레이션된 인프라를 삭제하는 API 입니다.
: 활용 방법, 순서, 요청/응답 예시는 다음과 같습니다.
DELETE /migration/infra/{infraId}Try it out버튼 클릭cloud-infra01(아래 예시 참고)Execute버튼 클릭Click see API details
Input (Path param): 마이그레이션된 인프라 ID
cloud-infra01Process (handler/controller):
Output (Response body): 클라우드로 마이그레이션된 인프라 정보
{ "success": true, "text": "" }Beta Was this translation helpful? Give feedback.
All reactions