Repository navigation
feat(install): installAll.sh에서 기본값 설정 변경 여부 확인 - #108
Merged
Merged
Conversation
.env가 .env.setup 기본값을 그대로 쓰고 있으면 설치 시 "Keep all default values? (y/n)"를 묻고, n이면 키별로 새 값을 입력받아 반영한다. - 대상 키는 스크립트가 아니라 .env.setup 으로 정한다 - *_PASSWORD / *_PW: 항상 대상 - 키 바로 위 "# @ask" / "# @noask": 대상 추가 / 제외 - 키 바로 위 "# @sync=<file>:<KEY>": 다른 파일에도 같은 값 기록 (.yaml 이면 KEY 는 점 경로, 예: services.mc-infra-manager.auth.password) - 기본 응답: dev 는 유지(Y), prod 는 변경(N) + 경고. -c|--change-defaults y|n 으로 생략 가능, 터미널이 아니면 유지 - 값은 루트 .env, conf/mc-iam-manager/.env(같은 키가 있을 때), @sync 대상에 기록 - 초기 표시: platformadmin 계정, Keycloak admin·기본 워크스페이스, 서비스별 DB 사용자/DB명에 @ask. mc-web-console api.yaml 의 mc-infra-manager 인증, mc-data-manager .env 에 @sync. 다른 파일에 하드코딩된 observability MariaDB/InfluxDB 비밀번호는 @noask - MC_COST_OPTIMIZER_TBB_PW 는 MC_INFRA_MANAGER_API_PASSWORD 참조로, iam .env.setup 의 MC_IAM_MANAGER_DATABASE_URL 은 ${} 참조로 변경(iam .env 와 동일)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
installAll.sh는.env.setup을.env로 그대로 복사하고 실제 값으로 변경 후 installAll.sh를 실행해야한다.변경 내용
설치할 때
Keep all default values? (y/n)를 묻습니다. n을 고르면 키마다 새 값을 입력받습니다.대상 키 지정 — 스크립트가 아니라
.env.setup에서 정함*_PASSWORD/*_PW# @ask# @noask# @sync=<file>:<KEY>.yaml이면 KEY는 점 경로.env를 한 줄씩 읽으면서 값 뒤 주석까지 값으로 읽기 때문입니다.${...}참조인 키는 대상에서 빠집니다.동작
[Y](기본값 유지), prod 모드가[N]이며 prod에서는 경고를 함께 표시합니다.-c|--change-defaults y|n을 주면 질문 없이 진행합니다. 터미널이 아니면 기본값을 유지합니다.$, 따옴표,|,#,\가 들어간 값은 다시 입력받습니다..env,conf/mc-iam-manager/.env(같은 키가 있을 때),@sync대상 파일에 씁니다.container-volume에 데이터가 있으면 "이미 초기화된 DB에는 반영되지 않는다"고 경고합니다.