Skip to content

feat(menu): seed mc-iam-manager from the bundled menu catalog copy - #83

Merged
MZC-CSC merged 1 commit into
developfrom
feat/admin-cli-menu-seed-from-bundled-copy
Sep 14, 2026
Merged

MZC-CSC merged 1 commit into
developfrom
feat/admin-cli-menu-seed-from-bundled-copy

Conversation

@dogfootman

@dogfootman dogfootman commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

배경

메뉴 시딩 소스가 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).

변경

  • compose / mini: 기존 사본 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 마운트도 함께 추가(누락돼 있었음).
  • env: MC_WEB_CONSOLE_MENUYAML=asset/menu/webconsole_menu_resources.yamlconf/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.sh4b) Force re-seed 옵션(?force=true, yes 확인, backupPath/orphan/missing 출력).
  • 정리: 참조처 없는 conf/docker/menu.yaml 삭제, .gitignore·cleanAll.shconf/mc-iam-manager/menu.yaml 항목 제거.
  • 사본 갱신: 메뉴 카탈로그 ← mc-web-console develop 3a015768(61 id, 재정의본), permission.yamlfix(menu): align permission seeds with the redefined menu catalog mc-iam-manager#195 (헤더 # Bundled for admin-cli 유지), api.yaml 3벌의 InitialMenus description ← feat(setup-status): make menu re-sync an explicit force re-seed mc-web-console#285.
  • 문서: README "(d) post-initial", docs/running-on-instance.md — 시딩 1회 모델, 기존 설치의 .env 마이그레이션 안내.

이미지 호환

  • 마운트/env/스크립트 정리는 현재 pin된 mc-iam-manager:0.6.2로도 동작합니다 (IAM은 예전부터 non-URL 값을 로컬 경로로 읽음).
  • skipped 로그와 4b force는 #194가 포함된 IAM 이미지에서 활성화됩니다. 0.6.2에서는 4번이 기존처럼 무조건 upsert하고, 4b의 force는 무시됩니다.
  • 재정의된 카탈로그의 icon 필드는 0.6.2 모델에 없어 무시됩니다(실패 아님).

기존 설치 업그레이드

installAll.sh는 누락 변수만 추가하므로 .env가 이미 있는 환경은 MC_WEB_CONSOLE_MENUYAML을 수동으로 로컬 경로로 바꿔야 합니다 (docs에 명시).

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
@MZC-CSC
MZC-CSC merged commit 3299f53 into develop Sep 14, 2026
1 check passed
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.

3 participants