feat(menu): seed mc-iam-manager from the bundled menu catalog copy - #83
Merged
Merged
Conversation
The menu seed came from the raw GitHub URL of mc-web-console's main branch, while every image is pinned by tag and every other subsystem config is a copy under conf/docker/conf/<framework>/. That made installs non-reproducible (whatever main held that day) and impossible offline, and the post-init script's wget of that URL produced an unused menu.yaml. - docker-compose(.mini).yaml: mount the existing bundled copy conf/mc-web-console/api/conf/webconsole_menu_resources.yaml read-only into mc-iam-manager at /app/asset/menu/webconsole_menu_resources.yaml - MC_WEB_CONSOLE_MENUYAML=asset/menu/webconsole_menu_resources.yaml in .env.setup (both) and the tracked conf/mc-iam-manager/.env; the raw URL stays as a commented option - 1_setup_auto.sh / 1_setup_manual.sh: stop fetching menu.yaml (IAM reads the seed itself); only spider-check when the env is a URL; log IAM's skipped=true (menus seeded once at install); manual option 4b forces a re-seed via ?force=true with a confirmation - drop the orphan conf/docker/menu.yaml and the menu.yaml entries in .gitignore / cleanAll.sh - refresh bundled copies: menu catalog from mc-web-console develop 3a015768 (61 menus), permission.yaml from mc-iam-manager fix/iam-permission-yaml-canonical-ids, InitialMenus description in the three api.yaml copies - README / running-on-instance.md: seed-once model and .env migration note
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.
배경
메뉴 시딩 소스가 mc-web-console main 브랜치 raw GitHub URL(
MC_WEB_CONSOLE_MENUYAML)이었습니다. 이미지는 태그로 pin하고 다른 서브시스템 설정은 모두conf/docker/conf/<framework>/사본을 마운트하는 구조와 달리 메뉴만 main HEAD를 따라가 설치 재현성이 없고 폐쇄망에서 불가능했으며, post-init의wget은 어디에도 쓰이지 않는menu.yaml부산물만 남겼습니다. 운영 모델은 "최초 설치 1회 시딩, 이후 DB 편집"입니다 (MZC-CSC/mc-iam-manager#194).변경
conf/mc-web-console/api/conf/webconsole_menu_resources.yaml(self 모드용으로 이미 web-console-api에 마운트 중)을 mc-iam-manager에도/app/asset/menu/webconsole_menu_resources.yaml:ro로 마운트.asset/menu/menu.yaml(IAM의 URL 다운로드 캐시)에는 덮어 마운트하지 않음. mini에는 permission.yaml 마운트도 함께 추가(누락돼 있었음).MC_WEB_CONSOLE_MENUYAML=asset/menu/webconsole_menu_resources.yaml—conf/docker/.env.setup,conf/mc-iam-manager/.env.setup, 그리고 tracked 파일인conf/mc-iam-manager/.env(IAM 컨테이너가 실제로 읽는 env_file;.gitignore에 있지만 이미 tracked라.env.setup변경이 전파되지 않음). raw URL은 주석 옵션으로 보존.init_menu에서wget ./menu.yaml제거(IAM이 직접 읽음; URL일 때만--spider도달성 검사). IAM 응답skipped=true를 로그로 안내.1_setup_manual.sh에 4b) Force re-seed 옵션(?force=true, yes 확인, backupPath/orphan/missing 출력).conf/docker/menu.yaml삭제,.gitignore·cleanAll.sh의conf/mc-iam-manager/menu.yaml항목 제거.3a015768(61 id, 재정의본),permission.yaml← fix(menu): align permission seeds with the redefined menu catalog mc-iam-manager#195 (헤더# Bundled for admin-cli유지),api.yaml3벌의InitialMenusdescription ← feat(setup-status): make menu re-sync an explicit force re-seed mc-web-console#285.docs/running-on-instance.md— 시딩 1회 모델, 기존 설치의.env마이그레이션 안내.이미지 호환
mc-iam-manager:0.6.2로도 동작합니다 (IAM은 예전부터 non-URL 값을 로컬 경로로 읽음).skipped로그와 4bforce는 #194가 포함된 IAM 이미지에서 활성화됩니다. 0.6.2에서는 4번이 기존처럼 무조건 upsert하고, 4b의force는 무시됩니다.icon필드는 0.6.2 모델에 없어 무시됩니다(실패 아님).기존 설치 업그레이드
installAll.sh는 누락 변수만 추가하므로.env가 이미 있는 환경은MC_WEB_CONSOLE_MENUYAML을 수동으로 로컬 경로로 바꿔야 합니다 (docs에 명시).