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

Fixed IP issues with the Infrastructure Migration API #120

Closed
dev4unet opened this issue Sep 4, 2024 · 3 comments
Closed

Fixed IP issues with the Infrastructure Migration API #120

dev4unet opened this issue Sep 4, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@dev4unet
Copy link
Member

dev4unet commented Sep 4, 2024

What happened
: {{baseUrl}}/migration/ns/{{nsId}}/mci를 호출하면 tumblebug URL이 localhost로 고정됩니다.

What you expected to happen
: 도커 컴포즈에서 BEETLE_TUMBLEBUG_ENDPOINT=http://cb-tumblebug:1323로 환경 변수를 설정하거나 환경 설정 파일을 수정해도 tumblebug URL이 localhost로 고정됩니다.

Proposed solution
:
func CreateVMInfra()의 106라인을 보면 IP주소가 localhost로 고정되어 있습니다.
cbTumblebugApiEndpoint := "http://localhost:1323/tumblebug"

// CB-Tumblebug API endpoint
cbTumblebugApiEndpoint := "http://localhost:1323/tumblebug"
url := cbTumblebugApiEndpoint + fmt.Sprintf("/ns/%s/mciDynamic", nsId)
// url := fmt.Sprintf("%s/ns/{nsId}/mciDynamic%s", cbTumblebugApiEndpoint, idDetails.IdInSp)
@dev4unet dev4unet added the bug Something isn't working label Sep 4, 2024
@yunkon-kim
Copy link
Member

@dev4unet 이슈 공유 감사합니다.

다음번 Pre-release까지 반영해 놓겠습니다.

dev4unet added a commit to dev4unet/cm-beetle that referenced this issue Sep 5, 2024
@dev4unet
Copy link
Member Author

dev4unet commented Sep 5, 2024

@yunkon-kim 우선 위 이슈는 수정해서 PR했습니다.

현재로서는 인증은 모두 default를 사용하기 때문에 문제는 없지만 현재 텀블벅을 호출할 때 소스에서 아래처럼 3가지 방식이 혼재되어 있어서 나중에 공통 변수로 통합 하셔야 할 듯 싶네요.

apiUser := viper.GetString("beetle.api.username")
apiPass := viper.GetString("beetle.api.password")

apiUser := viper.GetString("beetle.tumblebug.api.username")
apiPass := viper.GetString("beetle.tumblebug.api.password")

apiUser := os.Getenv("BEETLE_API_USERNAME")
apiPass := os.Getenv("BEETLE_API_PASSWORD")

@dev4unet dev4unet closed this as completed Sep 5, 2024
@yunkon-kim
Copy link
Member

yunkon-kim commented Sep 5, 2024

@dev4unet 인증관련 환경 변수가 전반적으로 개선될 예정입니다.

현재 Beetle과 Tumblebug 인증은 의도적으로 구분되어있는 상황입니다. 참고 바랍니다.

yunkon-kim added a commit that referenced this issue Sep 5, 2024
Infrastructure Migration API bug fix(issue #120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants