Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scaleOut feature for VMGroup in a MCIS #1181

Merged
merged 5 commits into from
Sep 29, 2022

Conversation

seokho-son
Copy link
Member

MCIS에 포함되어 있는 VMGroup을 기준으로,
MCIS를 확장(Group에 포함된 VM 추가)하는 기능 제공

  • 추가되는 VM은 지정된 Group에 포함되며, 병렬로 생성 및 추가.
  • VM의 ID는 기존에 있는 VM들과 유사하게 포스트픽스 숫자 증가하는 형태로 구성됨(ID 중복 방지). (ex: group0-1, group0-2, ...)

사용법

curl -X 'POST'
'http://localhost:1323/tumblebug/ns/ns01/mcis/mc-6oghb/vmgroup/group-0'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{
"vmGroupSize": "3"
}'

Before

image

After

image

@lgtm-com
Copy link

lgtm-com bot commented Sep 26, 2022

This pull request introduces 1 alert when merging 0786a0c into c3e597f - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

@jihoon-seo
Copy link
Member

@seokho-son 유용하면서도 앞으로 꼭 필요한 기능 같습니다. ㅎㅎ

한 가지 comment는..

예시를 보면
VM group size가 2인 group-0
POST REST API를 호출하는데
body에 "vmGroupSize": "3" 이라고 기재하여 호출했더니
최종 VM group size가 2+3=5 가 되었습니다.

Request body의 field 이름이 vmGroupSize 로 되어 있는데,
vmGroupSize 라는 필드 이름을 사용자가 보면
'추가할 VM 수' 보다는 'desired VM group size' 라고 인식할 것 같습니다.. 😅

변경을 한다면 2가지 안이 있어 보입니다.

  1. 필드 이름을 바꾸는 것은 어떨까요? ㅎㅎ
    (예: NumVMsToAdd)
  2. 필드 이름은 유지하고, 기능을 변경 ('desired VM group size' 로 동작)

그리고 VM group을 scale in 하는 기능도 나중에는 추가하는 것이 좋을 것 같습니다. 😊

@seokho-son
Copy link
Member Author

@jihoon-seo 리뷰 감사합니다. :)
ScaleIn, DesiredScaling 도 만들어 넣을 예정입니다!

필드는 조곰 이따 변경하도록 할게요! :)

@seokho-son
Copy link
Member Author

@jihoon-seo

요청 필드 업데이트 완료하였습니다. :)
vmGroupSize -> numVMsToAdd

@lgtm-com
Copy link

lgtm-com bot commented Sep 29, 2022

This pull request introduces 1 alert when merging 998edcd into c3e597f - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

@jihoon-seo jihoon-seo merged commit 878a6c6 into cloud-barista:main Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants