Summary: The contract of the optional per-OS prerequisite scripts and of the two entry points that install the GakuNin RDM developer environment: the thin bootstrap
installer/install.shand the Python commandgrdm-devwith its subcommands, profiles, flags, exit codes, and directory layout. æŠèŠ: ä»»æã® OS ããšã®åææ¡ä»¶ã¹ã¯ãªãããšãGakuNin RDM éçºç°å¢ãå°å ¥ããäºã€ã®å ¥å£ãèãèµ·åã¹ã¯ãªããinstaller/install.shãš Python ã³ãã³ãgrdm-devã®å¥çŽããµãã³ãã³ãããããã¡ã€ã«ããã©ã°ãçµäºã³ãŒãããã£ã¬ã¯ããªæ§æãå®ããã
- Version / ç: 0.36 â 2026-11-14. Learned: the two workflows of §10 arrive in their own change, pushed by a token with the
workflowscope, so the paragraph that called them pending is removed with it. ïŒ Â§10 ã®äºã€ã®ã¯ãŒã¯ãããŒã¯ãworkflowã¹ã³ãŒããæã€ããŒã¯ã³ã§ push ããç¬ç«ã®å€æŽã§å ¥ãã®ã§ãä¿çäžãšæžããæ®µèœããã®å€æŽã§æ¶ãã 0.35 â 2026-11-14. Learned: a guard is only as useful as the moment it runs: the volume check ofupwas correct on the amd64 VM but fired after a 10 h 45 minbuild, soinstallnow runs the same read-only check as soon as the Compose file is rendered (DEMO-22 0.7). ïŒ æ€æ»ã圹ã«ç«ã€ãã¯ãããããã€åããã§æ±ºãŸããupã®ããªã¥ãŒã ã®æ€æ»ã¯ amd64 ã® VM ã§æ£ããåãããã10 æé 45 åã®buildã®åŸã ã£ããããã§installã¯ãCompose ã®ãã¡ã€ã«ã render ããçŽåŸã«åãèªã¿åãã ãã®æ€æ»ãè¡ãïŒDEMO-22 0.7ïŒã 0.34 â 2026-11-14. Learned: a health check is a time budget the template fixes, and a slow host can spend all of it on a healthy start: Elasticsearch 8 took 8 min 10 s to start under full-system amd64 emulation while the check allowed 2.5 minutes, soupstopped with exit 40 although nothing was wrong, andup --timeoutcould not help because it bounds the wait, not the container's own check; the window is now 17 to 26 minutes, ending inside the default 1800 s health wait ofup(DEMO-22 0.7). ïŒ ãã«ã¹ãã§ãã¯ã¯ãã³ãã¬ãŒããåºå®ããæéã®äºç®ã§ãé ãæ©æ¢°ã¯å¥å šãªèµ·åã§ããã䜿ãåããããæ©æ¢°å šäœã amd64 ã§ãšãã¥ã¬ãŒã·ã§ã³ããç°å¢ã§ Elasticsearch 8 ã®èµ·åã« 8 å 10 ç§ããã£ãã®ã«ããã§ãã¯ã®èš±å®¹ã¯ 2.5 åã§ãäœãå£ããŠããªãã®ã«upãçµäº 40 ã§æ¢ãŸã£ããup --timeoutã¯åŸ ã¡ã®äžéã§ãã£ãŠã³ã³ããèªèº«ã®ãã§ãã¯ã§ã¯ãªãã®ã§å©ãã«ãªããªããçªã¯ 17ã26 åã«ãªããupã®æ¢å®ã®å¥åº·ã®åŸ ã¡ 1800 ç§ã®å ã«çµããïŒDEMO-22 0.7ïŒã 0.33 â 2026-11-13. Learned: a Docker named volume remembers the directory it was bound to on the day it was created, and Compose reuses it without comparing, so a second checkout of the same project opened the first one's data with its own new secrets andosf_initfailed on a password after 8 minutes ofup;upnow compares the rendered bindings with the existing volumes before starting anything (DEMO-21 0.5, run 4). ïŒ Docker ã®ååä»ãããªã¥ãŒã ã¯ãäœãããæ¥ã«çµã³ä»ãããã£ã¬ã¯ããªãèŠããŠããŠãCompose ã¯æ¯ã¹ãã«åå©çšããããã®ããåããããžã§ã¯ãã®äºã€ç®ã®ãã§ãã¯ã¢ãŠãã¯ãäžã€ç®ã®ããŒã¿ãèªåã®æ°ããç§å¯ã§éããosf_initã¯upã® 8 ååŸã«ãã¹ã¯ãŒãã§å€±æãããupã¯äœããèµ·åããåã«ãrender ããçµã³ä»ããšæ¢åã®ããªã¥ãŒã ãæ¯ã¹ãããã«ãªã£ãïŒDEMO-21 0.5ã第 4 åïŒã 0.32 â 2026-11-13. Learned: a command that exists in the code has to be in the contract, or the documents recommend the wrong one:secrets init --missing(add only the absent keys, change nothing live) was implemented for upgrades but the table named onlyrotate, so ADR-14 told installations to rotate before rendering, which changes every credential and recreates containers from a stale Compose file (PR #56 review r1 R1-02). ïŒ ã³ãŒãã«ããã³ãã³ãã¯å¥çŽã«ãæžããªããã°ãææžãééã£ãã³ãã³ããå§ãããsecrets init --missingïŒè¶³ããªãããŒã ããè¶³ãã皌åäžã®ãã®ã¯äœãå€ããªãïŒã¯æŽæ°ã®ããã«å®è£ ããããã衚ã«ã¯rotateãããªããADR-14 㯠render ã®åã« rotate ãæ±ããŠããŸã£ããrotate ã¯ãã¹ãŠã®è³æ Œæ å ±ãæ¿ããå€ã Compose ãã¡ã€ã«ã®ãŸãŸã³ã³ãããåäœæããïŒPR #56 ã¬ãã¥ãŒ r1 R1-02ïŒã 0.31 â 2026-11-12. Learned: replacing a component also replaces the contracts around it: Elasticsearch 8 brings a CA, two passwords and a one-shot, retiring sharejs and mongo removes a port, two volumes, a secret and a hardening exception, and osf.io's mandatory sign-in (ENABLE_PUBLIC_ACCESS) becomes a setting ofcompose renderthat every osf.io process must share, so the floors, the ports table and the profiles table were all recomputed from the templates instead of edited by hand (ADR-13 §6, ADR-14). ïŒ éšåãå ¥ãæ¿ãããšããã®åšãã®çŽæãæ¿ãããElasticsearch 8 㯠CAãäºã€ã®ãã¹ã¯ãŒããäžåããã®æé ãæã¡èŸŒã¿ãsharejs ãš mongo ã®é圹ã¯ããŒãäžã€ãããªã¥ãŒã äºã€ãç§å¯äžã€ãå ç¢åã®äŸå€äžã€ãæ¶ããosf.io ã®å¿ é ãµã€ã³ã€ã³ïŒENABLE_PUBLIC_ACCESSïŒã¯ osf.io ã®ãã¹ãŠã®ããã»ã¹ãå ±æããªããã°ãªããªãcompose renderã®èšå®ã«ãªã£ãããã®ããäžéãããŒãã®è¡šããããã¡ã€ã«ã®è¡šã¯æã§çŽããããã³ãã¬ãŒãããèšç®ãçŽããïŒADR-13 §6ãADR-14ïŒã 0.30 â 2026-11-11. Learned: a memory requirement inherits the reason it was set for: the 24 GiB forcorecame from the prebuilt ember-osf-web image rebuilding its bundle at every start under emulation with an 8 GiB floor, so once ember became a static nginx image built from source (128 MiB floor) the figure had to be recomputed from the floors (8320 MiB, about 11.6 GiB) and stated as a computed lower bound, not a measured peak (RDM-ember-osf-web-dev2027 PR #2 review r1 R1-03). ïŒ ã¡ã¢ãªã®èŠä»¶ã¯ããããæ±ºããçç±ãåŒãç¶ããcoreã® 24 GiB ã¯ãäºåãã«ãæžã¿ã® ember-osf-web ã®ã€ã¡ãŒãžãèµ·åã®ãã³ã«ãšãã¥ã¬ãŒã·ã§ã³äžã§äžé 8 GiB ã®ããšæãçµã¿çŽããããšããæ¥ãŠãããember ããœãŒã¹ããçµãéç㪠nginx ã®ã€ã¡ãŒãžïŒäžé 128 MiBïŒã«ãªã£ãã®ã§ãæ°åãäžéã®åèšïŒ8320 MiBãçŽ 11.6 GiBïŒããèšç®ãçŽãã宿ž¬ã®æå€§å€ã§ã¯ãªãèšç®äžã®äžéãšããŠæžãå¿ èŠããã£ãïŒRDM-ember-osf-web-dev2027 PR #2 ã¬ãã¥ãŒ r1 R1-03ïŒã 0.29 â 2026-11-12. Learned: a review of PR #50 showed that a number is only as good as its label: the compile-time ratio is an observation, "a working day" is an extrapolation, and--timeoutbelongs toupalone, so it neither shortens nor extendsbuild; and a report key that "is absent" on macOS must be absent from the report, not empty (PR #50 review r1 R2, R6). ïŒ PR #50 ã®ã¬ãã¥ãŒã§ãæ°åã¯æã®ä»ãæ¹æ¬¡ç¬¬ã ãšåãã£ããã³ã³ãã€ã«æéã®æ¯ã¯èгå¯ãã1 å¶æ¥æ¥ãã¯å€æ¿ã§ããã--timeoutã¯upã ãã®ãã®ã§buildãçããé·ããããªãããŸã macOS ã§ãç¡ããå ±åã®ããŒã¯ã空ã§ã¯ãªãå ±åããç¡ããªã£ãŠããªããã°ãªããªãïŒPR #50 ã¬ãã¥ãŒ r1 R2ã»R6ïŒã 0.28 â 2026-11-12. Learned: a fully emulated amd64 machine compiled osf.io's scientific Python about ten times slower than Rosetta did (one RUN step: 55 minutes there, not finished after 5 h 12 min here), so a slow host can need a way to wait longer inup, and a report that says nothing about emulation on amd64 cannot be told from one that did not check:install --timeoutgoes toup, anddoctorprintsamd64_emulation(DEMO-22). ïŒ amd64 ãå šäœãšãã¥ã¬ãŒã·ã§ã³ããæ©æ¢°ã¯ãosf.io ã®ç§åŠèšç®ã® Python ã®ã³ã³ãã€ã«ã Rosetta ã®çŽ 10 åé ãã£ãïŒäžã€ã® RUN æé ã Rosetta ã§ã¯ 55 åãããã§ã¯ 5 æé 12 ååŸãæªå®ïŒãããã§é ãæ©æ¢°ã«ã¯upã®åŸ ã¡ãå»¶ã°ãææ®µãèŠãããããŸããamd64 ã§ãšãã¥ã¬ãŒã·ã§ã³ã«äœãè§Šããªãå ±åã¯ã確ãããŠããªãå ±åãšåºå¥ã§ããªããinstall --timeoutãupã«æž¡ããdoctorãamd64_emulationãåºãïŒDEMO-22ïŒã 0.27 â 2026-11-10. Learned: decoding is not enough if the result passes through$(...), which drops trailing newlines: a mount namedhost\012was checked ashost, so the decoded name is kept in a variable (PR #44 review r2 R2-01). ïŒ åŸ©å·ããŠãçµæã$(...)ãéããšæ«å°Ÿã®æ¹è¡ãèœã¡ããhost\012ãšãã mount ãhostãšããŠèª¿ã¹ãããã®ã§ã埩å·ããååã¯å€æ°ã«ä¿ã€ïŒPR #44 ã¬ãã¥ãŒ r2 R2-01ïŒã 0.26 â 2026-11-10. Learned: a path check must read the path the way the system means it: the kernel escapes spaces in mount points (\040) and a symlink can carry a checkout onto the Windows disk, so the shared-folder check decodes mount fields and the WSL checks compare physical paths (pwd -P) (PR #44 review r1 R1, R2). ïŒ ãã¹ã®æ€æ»ã¯ãã·ã¹ãã ãæå³ãããšããã«ãã¹ãèªãŸãªããã°ãªããªããã«ãŒãã«ã¯ mount å ã®ç©ºçœã\040ãšãšã¹ã±ãŒãããã·ã³ããªãã¯ãªã³ã¯ã¯ãã§ãã¯ã¢ãŠãã Windows ã®ãã£ã¹ã¯ãžéã³ãããããã§å ±æãã©ã«ãã®æ€æ»ã¯ mount ã®æ¬ã埩å·ããWSL ã®æ€æ»ã¯å®äœã®ãã¹ïŒpwd -PïŒã§æ¯ã¹ãïŒPR #44 ã¬ãã¥ãŒ r1 R1ã»R2ïŒã 0.25 â 2026-11-10. Learned: a change can be blocked by the permission needed to publish one part of it: the token that pushes this repository may not change.github/workflows/, so the two workflows of §10 wait on branchfeat/per-os-installerswhile the scripts, fixes and records land now. ïŒ å€æŽã®äžéšãå ¬éããæš©éãç¡ãããã«å šäœãæ¢ãŸãããšãããããã®ãªããžããªã« push ããããŒã¯ã³ã¯.github/workflows/ãå€ããããªãã®ã§ã§10 ã®äºã€ã®ã¯ãŒã¯ãããŒã¯ãã©ã³ãfeat/per-os-installersã§åŸ ã¡ãã¹ã¯ãªããã»ä¿®æ£ã»èšé²ã¯å ã«å ¥ããã 0.24 â 2026-11-10. Learned: a real Linux run disproves what a dry run cannot: Ubuntu 24.04's ownqemu-user-staticcrashes inside an amd64 build after 48 minutes, QEMU builds ember about twice as slowly as Rosetta so the 1800 s wait stops a healthy install, and the cloud image lacks a library Playwright's driver needs; so emulation comes from a digest-pinned image,doctorrefuses the measured-bad emulator,upwaits longer on Linux arm64, and the accept hint names the Linux packages (DEMO-21). ïŒ å®éã® Linux ã§ã®å®è¡ã¯ dry run ã«ã¯åãããªãããšãèŠããUbuntu 24.04 èªèº«ã®qemu-user-static㯠48 ååŸã« amd64 ã®ãã«ãã®äžã§èœã¡ãQEMU 㯠ember ã®çµã¿ç«ãŠã« Rosetta ã®ããã 2 åãããã®ã§ 1800 ç§ã®åŸ ã¡ã¯å¥å šãªå°å ¥ãæ¢ããã¯ã©ãŠãã€ã¡ãŒãžã«ã¯ Playwright ã®ãã©ã€ããŒãèŠãã©ã€ãã©ãªãç¡ããããã§ãšãã¥ã¬ãŒã·ã§ã³ã¯ãã€ãžã§ã¹ãã§åºå®ããã€ã¡ãŒãžããå ¥ããdoctorã¯èœã¡ããšå®æž¬ãããšãã¥ã¬ãŒã¿ãŒãæã¿ãup㯠Linux arm64 ã§ã¯é·ãåŸ ã¡ãaccept ã®æ¡å 㯠Linux ã®ããã±ãŒãžã瀺ãïŒDEMO-21ïŒã 0.23 â 2026-11-10. Learned: a prerequisite is whatever the whole install sequence needs, not only its first step: Trivy and gitleaks are missing on a fresh host and stop an otherwise good install with exit 51 atscan, so the per-OS scripts of §2.3 provide them (ADR-08). ïŒ åææ¡ä»¶ãšã¯æåã®æ®µã§ã¯ãªãäžé£ã®å°å ¥å šäœã«èŠããã®ã§ãããæ°ãããã¹ãã«ã¯ Trivy ãš gitleaks ãç¡ããã»ããè¯ããŠãscanã§çµäº 51 ã«ãªãããã§2.3 ã® OS ããšã®ã¹ã¯ãªãããããããçšæããïŒADR-08ïŒã 0.22 â 2026-11-10. Learned: a lock that only thedbcommands take does not stopupfrom starting the server between their checks and their renames, soupandresettake it too (PR #42 review r2). ïŒdbã®ã³ãã³ãã ããåãããã¯ã§ã¯ããã®ç¢ºèªãšæ¹åã®éã«upããµãŒããŒãèµ·åããã®ãæ¢ããããªãã®ã§ãupãšresetãåãããã¯ãåãïŒPR #42 ã¬ãã¥ãŒ r2ïŒã 0.21 â 2026-11-10. Learned: a command that renames data directories needs a journal, a lock and a recovery path that every later command runs, not only checks before it starts (PR #42 review r1). ïŒ ããŒã¿ãã£ã¬ã¯ããªãæ¹åããã³ãã³ãã«ã¯ãå§ããåã®ç¢ºèªã ãã§ãªããæäœèšé²ã»ããã¯ã»åŸç¶ã®ãã¹ãŠã®ã³ãã³ããéã埩æ§ã®éãèŠãïŒPR #42 ã¬ãã¥ãŒ r1ïŒã 0.20 â 2026-11-10. Learned: a new database major needs a command, not a note: a server refuses a data directory of another major, soupnow says so with exit 15 anddb upgrademoves the data by a verified dump and restore that never writes the old directory (ADR-12). ïŒ ããŒã¿ããŒã¹ã®æ°ããçã«ã¯æ³šèšã§ãªãã³ãã³ããèŠãããµãŒããŒã¯å¥ã®çã®ããŒã¿ãã£ã¬ã¯ããªãæãã®ã§ãupã¯ãããçµäº 15 ã§åããdb upgradeã¯æ§ãã£ã¬ã¯ããªã«äžåºŠãæžããªããç §åã€ãã®ãã³ããšåŸ©å ã§ããŒã¿ãç§»ãïŒADR-12ïŒã 0.19 â 2026-11-10. Learned: a fixed client is only as good as the address and trust anchor it is given: osf.io's mongo URL was never rendered and fell back to PostgreSQL's host and port, soosf.envnow names the TLS URL and the CA file. ïŒ çŽããã¯ã©ã€ã¢ã³ãããæž¡ãããæ¥ç¶å ãšä¿¡é Œã®èµ·ç¹ãã ãã§ãããosf.io ã® mongo ã® URL ã¯äžåºŠãæç»ããããPostgreSQL ã®ãã¹ããšããŒãã«èœã¡ãŠããã®ã§ãosf.envã« TLS ã® URL ãš CA ãã¡ã€ã«ãæžãããšã«ããã 0.18 â 2026-11-10. Learned: a build record says what was built, not what should run: after the pin of osf.io moved,compose renderran beforebuildand the stack silently ran the old image, so render now trusts the record only when it equals the manifest pin and otherwise renders the pin and warns with the fix. ïŒ ãã«ãã®èšé²ã¯äœãçµãã ãã瀺ãã ãã§ãäœãåããã¹ããã¯ç€ºããªããosf.io ã®åºå®ãåããåŸãbuildããåã«compose renderãå®è¡ãããããã¹ã¿ãã¯ã¯å€ãã€ã¡ãŒãžãé»ã£ãŠåããããããã§ render ã¯èšé²ã manifest ã®åºå®ãšäžèŽãããšãã ããããä¿¡ããéããšãã¯åºå®ãæžããŠå¯ŸåŠãæ·»ããŠèŠåããããšã«ããã 0.17 â 2026-11-10. Learned: a flag that changes what a server will serve belongs in the operating contract, not only in a template and a PR body, so the admin app's--insecureis now stated as a development-only, loopback-only exception (PR #40 review r1 R1-02). ïŒ ãµãŒããŒãé ä¿¡ãããã®ãå€ãããã©ã°ã¯ããã³ãã¬ãŒãã PR æ¬æã ãã§ãªãéçšã®å¥çŽã«æžãããã®ãã管çç»é¢ã®--insecureããéçºå°çšã§ã«ãŒãããã¯éå®ã®äŸå€ãšããŠæèšããïŒPR #40 ã¬ãã¥ãŒ r1 R1-02ïŒã 0.16 â 2026-11-10. Learned: the browser opens the wiki and file-editor sockets itself, so y_websocket and sharejs need loopback ports like any other page the browser loads. ïŒ wiki ãšãã¡ã€ã«ç·šéã®ãœã±ããã¯ãã©ãŠã¶ãèªåã§éããããy_websocket ãš sharejs ã«ãããã©ãŠã¶ãèªãä»ã®ããŒãžãšåããã«ãŒãããã¯ã®ããŒããèŠãã 0.15 â 2026-11-10. Learned: a byte count does not make a key usable by its consumer: a manually written key may be 43!or 32 quoted spaces, so every CAS key must also be in the base64url alphabet, must not be a published default, and the TGC encryption key must decode canonically to 32 bytes (PR #39 review r1 R1-01). ïŒ ãã€ãæ°ã ãã§ã¯ãéµã䜿ãåŽã§äœ¿ãããšã¯èšããªããæã§æžããéµã¯æå笊 43 åãåŒçšç¬Šã§å²ãã ç©ºçœ 32 åã§ãããããããã§ CAS ã®éµã¯ãã¹ãŠ base64url ã®æåã«éããå ¬éãããæ¢å®å€ãæã¿ãTGC ã®æå·éµã¯ 32 ãã€ããžæ£æºã«åŸ©å·ã§ããªããã°ãªããªãïŒPR #39 ã¬ãã¥ãŒ r1 R1-01ïŒã 0.14 â 2026-11-10. Learned: a key name that nothing reads looks exactly like a working secret, and a service that fails closed turns a wrong length into a stopped stack, so the keys now carry the names the image reads andcompose renderrefuses a wrong length before anything starts (ADR-07 §7). ïŒ èª°ãèªãŸãªãããŒã®ååã¯ãå¹ããŠããç§å¯ãšãŸã£ããåãã«èŠããããŸãéããŠå€±æãããµãŒãã¹ã§ã¯é·ãã®èª€ããã¹ã¿ãã¯ã®åæ¢ã«ãªããããã§ããŒã«ã¯ã€ã¡ãŒãžãèªãååã䜿ããcompose renderãèµ·ååã«èª€ã£ãé·ããæãããã«ããïŒADR-07 §7ïŒã - Version / ç: 0.13 â 2026-11-10. Learned: a writable root says nothing about what lies beneath it, and a probe must never reuse a name that may already exist: the access check walks existing data as the real uid and creates its file exclusively (PR #36 review r3). ïŒ ã«ãŒãã«æžããŠãäžã®ãã®ã«ã€ããŠã¯äœãåãããã確èªçšã®ãã¡ã€ã«ã¯æ¢ã«ãããããããªãååã䜿ã£ãŠã¯ãªããªããããã§ã¢ã¯ã»ã¹ç¢ºèªã¯å®éã® uid ã§æ¢åã®ããŒã¿ã蟿ãããã¡ã€ã«ã¯æä»çã«äœããšåãã£ãïŒPR #36 ã¬ãã¥ãŒ r3ïŒã
- Version / ç: 0.12 â 2026-11-10. Learned: a path check expires when the path changes and sees only what it looks at, and a command that exits 0 has not proved its effect: so
resetrevalidates at each step using the mount table, ownership is read back, and only a write as the real uid shows that a volume is usable (PR #36 review r2). ïŒ ãã¹ã®æ€èšŒã¯ãã¹ãå€ããã°å€ããªããèŠããã®ããåãããªãããŸãçµäº 0 ã®ã³ãã³ãã¯å¹æã蚌æããªããããã§resetã¯æ®µããšã« mount 衚ã§åæ€èšŒããææè ã¯èªã¿è¿ããããªã¥ãŒã ã䜿ããããšã¯å®éã® uid ã§ã®æžã蟌ã¿ã ãã瀺ããšåãã£ãïŒPR #36 ã¬ãã¥ãŒ r2ïŒã - Version / ç: 0.11 â 2026-11-10. Learned: a root process without capabilities still obeys file permissions, a container path does not confine the host path behind its bind mount, and a repair that trusts its top directory cannot finish a partial one; so volume paths are validated on the host,
unoconvholdsDAC_OVERRIDEfor the shared directory, ownership is re-walked every time, and availability questions are asked of the filesystem or the engine rather than guessed from a path (PR #36 review r1). ïŒ capability ãé€ãã root ããã¡ã€ã«æš©éã«åŸããã³ã³ããå ã®ãã¹ã¯ bind å ã®ãã¹ããã¹ãéå®ãããäžçªäžã®ãã£ã¬ã¯ããªãä¿¡çšãã修埩ã¯éäžã§æ¢ãŸã£ã修埩ãå®äºã§ããªããããã§ããªã¥ãŒã ã®ãã¹ã¯ãã¹ãåŽã§æ€èšŒããunoconvã¯å ±æãã£ã¬ã¯ããªã®ããã«DAC_OVERRIDEãæã¡ãææè ã¯æ¯åå šäœã蟿ããå¯åŠã¯ãã¹ããæšæž¬ãããã¡ã€ã«ã·ã¹ãã ããšã³ãžã³ã«åããšåãã£ãïŒPR #36 ã¬ãã¥ãŒ r1ïŒã - Version / ç: 0.10 â 2026-11-10. Learned: a check that fails after a 30-minute build teaches nothing, so
doctormust prove every prerequisite up front: private repositories, scanners, memory floors, emulation and a checkout path Docker can see; and a fresh bind directory belongs to the host user, so ownership is one generic step derived from the writers instead of one init container per volume, whileresetneeds a container to delete what containers own (cross-OS audit, 2026-11-10; on Colima a bind mount from/private/tmpwas measured to be silently empty). ïŒ 30 åã®ãã«ãã®åŸã§å€±æããæ€æ»ã¯äœãæããªããã ããdoctorãéå ¬éãªããžããªãã¹ãã£ããŒãã¡ã¢ãªã®äžéããšãã¥ã¬ãŒã·ã§ã³ãDocker ããèŠããé 眮å ããã¹ãŠå ã«èšŒæããªããã°ãªããªãããŸãæ°ãã bind ãã£ã¬ã¯ããªã¯ãã¹ãã®å©çšè ã®ææãªã®ã§ãææè ã®èšå®ã¯ããªã¥ãŒã ããšã® init ã³ã³ããã§ã¯ãªãæžãæããå°ãäžã€ã®æ±çšã®æ®µã«ãŸãšããresetã¯ã³ã³ãããææãããã®ãã³ã³ããã§æ¶ããã°ãªããªããšåãã£ãïŒOS 暪æã®ç£æ»ã2026-11-10ãColima ã§ã¯/private/tmpããã® bind mount ãé»ã£ãŠç©ºã«ãªãããšã宿ž¬ïŒã 0.9 â 2026-11-10. Learned: a retired credential key stays inruntime/.envforever unless it is dropped explicitly, and a Compose file rendered before the key was retired still refers to it, socompose rendermust run beforesecrets rotateor a recreate after an upgrade (PR #35 review r1). ïŒ å»æ¢ããè³æ Œæ å ±ã®ããŒã¯æç€ºçã«æ¶ããªããã°runtime/.envã«æ®ãç¶ãã廿¢åã«çæãã Compose ãã¡ã€ã«ã¯ãã®ããŒãåç §ãç¶ãããæŽæ°åŸã¯secrets rotateãåäœæã®åã«compose renderãå¿ èŠãšåãã£ãïŒPR #35 ã¬ãã¥ãŒ r1ïŒã 0.8 â 2026-11-06. Learned: a stack that builds is not a stack that starts: a fresh database needs a one-shot initialisation (osf_init), Compose's shorttmpfsis root-only, the memory budget must respect the Docker VM, and a prebuilt SPA must be built once into a volume rather than at every start under emulation (real install runs 9â13). ïŒ çµããã¹ã¿ãã¯ã¯èµ·åããã¹ã¿ãã¯ã§ã¯ãªããæ°ããããŒã¿ããŒã¹ã«ã¯äžåéãã®åæåïŒosf_initïŒãèŠããCompose ã®çãtmpfs㯠root å°çšã§ãã¡ã¢ãªäºç®ã¯ Docker VM ãå°éããªããã°ãªãããprebuilt ã® SPA ã¯ãšãã¥ã¬ãŒã·ã§ã³äžã§æ¯åçµãã®ã§ã¯ãªãããªã¥ãŒã ãžäžåºŠçµãïŒå®æ©ç¬¬ 9ã13 åïŒã 0.7 â 2026-11-06. Learned: a service row in the profile table must correspond to a process that exists, so the overlay repository wiki-frontend is represented by a one-shotwiki_assetsthat fills a named volume and its readers wait withcondition: service_completed_successfully(ADR-06), while a templatecommandmust have$escaped as$$for Compose (PR #30 review r1); and, independently, a glossary term is only explained for the reader when its note and REF-01 link sit at the first prose use, counting lower-case and plural forms, so first-use notes with links were added in both halves (SPEC-06 §3). ïŒ ãããã¡ã€ã«è¡šã®ãµãŒãã¹è¡ã¯å®åšããããã»ã¹ã«å¯Ÿå¿ããŠããªããã°ãªããªãããããªãŒããŒã¬ã€ã§ãã wiki-frontend ã¯ååä»ãããªã¥ãŒã ãæºããäžåéãã®wiki_assetsã§è¡šãããããèªããµãŒãã¹ã¯condition: service_completed_successfullyã§åŸ ã€ïŒADR-06ïŒããŸããã³ãã¬ãŒãã®command㯠Compose åãã«$ã$$ã«ãšã¹ã±ãŒãããïŒPR #30 ã¬ãã¥ãŒ r1ïŒããŸãå¥ã«ãçšèªæ³šãš REF-01 ãžã®ãªã³ã¯ã¯ãå°æåãè€æ°åœ¢ãå«ããæ¬æã®ååºã«çœ®ããªããã°èªè ã«å±ããªããšåãã£ããããè±åäž¡æ¹ã®ååºã«ãªã³ã¯ä»ãã®çšèªæ³šãè£ã£ãïŒSPEC-06 §3ïŒã - Version / ç: 0.6 â 2026-11-06. Learned: a
commandin a template is written for the container shell, but Compose interpolates$VARin every string of the file first, so the renderer must escape$as$$and a test must run the rendered file through Compose's own parser; and a fresh bind volume belongs to the host user, so a non-root writer needs an owner step (PR #30 review r1). ïŒ ãã³ãã¬ãŒãã®commandã¯ã³ã³ããã®ã·ã§ã«åãã«æžãããCompose ã¯ãã¡ã€ã«äžã®å šæååã®$VARãå ã«å±éãããã ããåºååŽã§$ã$$ã«ãšã¹ã±ãŒããã詊éšã¯åºåãã¡ã€ã«ã Compose èªèº«ã®è§£æåšã«éããã°ãªããªãããŸãæ°ãã bind ããªã¥ãŒã ã¯ãã¹ãã®å©çšè ã®ææãªã®ã§ãé root ã®æžãæã«ã¯ææè ãæ±ºããæ®µãèŠãïŒPR #30 ã¬ãã¥ãŒ r1ïŒã 0.5 â 2026-11-06. Learned: a service row in the profile table must correspond to a process that exists:wikihad none, because the wiki-frontend repository is an overlay whose image only builds a webpack bundle (real install run 4, ADR-06); the honest row is a one-shotwiki_assetsthat fills a named volume, and the services that read the volume must wait for it withcondition: service_completed_successfully. ïŒ ãããã¡ã€ã«è¡šã®ãµãŒãã¹è¡ã¯å®åšããããã»ã¹ã«å¯Ÿå¿ããŠããªããã°ãªããªããšåãã£ããwikiã«ã¯ç¡ãã£ããwiki-frontend ãªããžããªã¯ webpack ã®æãçµãã ãã®ã€ã¡ãŒãžãæã€ãªãŒããŒã¬ã€ã ããã§ããïŒå®æ©ç¬¬ 4 åãADR-06ïŒãæ£çŽãªè¡ã¯ååä»ãããªã¥ãŒã ãæºããäžåéãã®wiki_assetsã§ãããªã¥ãŒã ãèªããµãŒãã¹ã¯condition: service_completed_successfullyã§ãããåŸ ããã°ãªããªãã - Version / ç: 0.5 â 2026-11-06. Learned: a glossary term is only explained for the reader when its note and REF-01 link sit at the first prose use, counting lower-case and plural forms, so first-use notes with links were added in both halves (SPEC-06 §3). ïŒ çšèªæ³šãš REF-01 ãžã®ãªã³ã¯ã¯ãå°æåãè€æ°åœ¢ãå«ããæ¬æã®ååºã«çœ®ããªããã°èªè
ã«å±ããªããšåãã£ããããè±åäž¡æ¹ã®ååºã«ãªã³ã¯ä»ãã®çšèªæ³šãè£ã£ãïŒSPEC-06 §3ïŒã
0.4 â 2026-11-06. Learned: an operational failure that only a module docstring describes is invisible to the shell wrapper and to the Japanese message table, so every new failure cause of a subcommand needs its own row in
messages.tsvand in this table before the code may return it (PR #23 review r1, U4:upstreamreturned 1 with no canonical entry). ïŒ ã¢ãžã¥ãŒã«ã® docstring ã«ããæžãããŠããªãéçšäžã®å€±æã¯ãã·ã§ã«ã®å ã¿çŽã«ãæ¥æ¬èªã®æèšè¡šã«ãèŠããªãããµãã³ãã³ãã®æ°ãã倱æåå ã¯ãã³ãŒãããã®çªå·ãè¿ãåã«messages.tsvãšãã®è¡šã«è¡ãæããªããã°ãªããªããšåãã£ãïŒPR #23 ã¬ãã¥ãŒ r1ãU4:upstreamãæ£æ¬ã«ç¡ã 1 ãè¿ããŠããïŒã 0.3 â 2026-11-05. Learned:secrets rotatehad to become a coordinated database-password change plus container recreation, becauserestartkeeps the old environment and leaves the captured credential valid (PR #21 review r1). ïŒrestartã¯æ§ãç°å¢ãä¿ã€ãããæãããè³æ Œæ å ±ãæå¹ãªãŸãŸæ®ããsecrets rotate㯠DB ãã¹ã¯ãŒãã®å€æŽãšã³ã³ããåäœæãæããæé ã«ããå¿ èŠããããšåãã£ãïŒPR #21 ã¬ãã¥ãŒ r1ïŒã 0.2 â 2026-11-05. Learned: a profile table and the acceptance criteria that depend on it must change together, and a TOON row whose text contains a comma or a colon must be quoted or the parser sees extra columns. ïŒ ãããã¡ã€ã«è¡šãšãããã«äŸåããåå ¥åºæºã¯åæã«å€ããªããã°ãªãããã«ã³ããã³ãã³ãå«ã TOON ã®è¡ã¯åŒçšç¬Šã§å²ãŸãªããšåãå¢ããŠè§£æã«å€±æãããšåãã£ãã - Version / ç: 0.1 â 2026-11-05. Learned: keeping the shell part to a bootstrap and putting every decision in one Python command is the only way to make the OS differences, the manifest check, and the reports testable with
unittest. ïŒ ã·ã§ã«ã¯èµ·åã ãã«çãã倿ããã¹ãŠäžã€ã® Python ã³ãã³ãã«éããªããšãOS ã®éãã»manifest ã®æŽåã»å ±åæžãunittestã§è©Šéšã§ããªããšåãã£ãã - Normative for:
installer/install.sh,installer/install-ubuntu.sh,installer/install-macos.sh,installer/install-windows.ps1,installer/prereq-lib.sh,.github/workflows/installer-prereq-lint.yml,.github/workflows/installer-full.yml,.github/scripts/Test-PowerShellSyntax.ps1,installer/grdm_dev/,installer/tests/,runtime/. - Related: SPEC-00 Overview · SPEC-01 Manifest · SPEC-03 Security Gate · SPEC-04 Acceptance Tests · SPEC-05 Upstream Tracking · SPEC-06 Documentation Conventions · ADR-02 Network Model · ADR-03 Staged Security Gate · ADR-08 Per-OS Installer Entry Points · POL-01 Position · docs/README.md
The installer turns a fresh checkout of this repository into a running GakuNin RDM (GakuNin is Japan's academic network for logging in with a university account; see REF-01) developer environment with one command, on the hosts listed in §8. install.sh and grdm-dev never need sudo (a way to run a command as the computer's administrator), never change network settings on the host, and can be run again at any time without harm. Everything they create lives under runtime/, which is ignored by Git. The optional prerequisite scripts of §2.3 prepare the host beforehand and may use sudo, but only after showing the change and receiving consent (ADR-08).
Glossary notes. An installer is a program that prepares other programs so they can run. A CLI (command line interface) is a program you drive by typing commands. A container is a box that holds one program and everything it needs, so it runs the same on any computer. Docker (the tool that builds images and runs containers; see REF-01) and its companion Docker Compose (see REF-01) run them; Compose is the tool that starts many containers together from one description file. A manifest is the list that says exactly which version of each source repository we use (SPEC-01).
There are two entry points that install the environment (§2.1, §2.2), and optional scripts that prepare a host for them (§2.3).
install.sh does four things and nothing else:
- Runs with the
bashthat ships with macOS (version 3.2), so it uses no feature newer than that: no associative arrays, nomapfile, no${var,,}. - Finds
python3and checks that it is 3.11 or newer. If not, it prints how to install one for the detected OS and exits with code 10. - Creates a virtual environment (a private folder of Python and its libraries, separate from the system) at
.venv/and installs theinstaller/package into it withpip install -e installer[scan](thescanextra brings Semgrep, whichgrdm-dev scanruns locally â SPEC-03 §4.2, real install run 17;GRDM_WITHOUT_SCAN=1leaves it out,GRDM_WITH_ACCEPT=1adds Playwright). - Hands every argument to
.venv/bin/grdm-dev install "$@"and exits with that command's exit code.
OS differences are not written in install.sh. They live in installer/grdm_dev/host.py. User-facing messages come from installer/grdm_dev/messages.tsv (one line per code, English and Japanese columns) so that the script and the Python command say the same thing.
flowchart TD
A[./installer/install.sh --yes] --> B{python3 >= 3.11?}
B -- no --> X10[exit 10: how to install Python]
B -- yes --> C[create .venv/ and pip install -e installer[scan]]
C --> D[grdm-dev doctor]
D -- unsupported host --> X10b[exit 10]
D -- Docker missing --> X11[exit 11]
D -- prerequisite missing --> X13[exit 13]
D -- scanner missing --> X51[exit 51]
D --> E[grdm-dev plan]
E -- manifest invalid --> X20[exit 20]
E --> F[grdm-dev secrets init]
F --> G[grdm-dev compose render]
G --> H[grdm-dev build]
H -- failed --> X30[exit 30]
H --> I[grdm-dev up]
I --> J[grdm-dev health --network]
J -- failed --> X40[exit 40]
J --> K[grdm-dev scan]
K -- gate failed --> X50[exit 50]
K --> L[grdm-dev report]
L --> Z[exit 0 and print URL http://127.0.0.1:5000]
grdm-dev is the package installer/grdm_dev/, exposed as a console script. Rules:
- Standard library first. The command itself has no third-party dependency. The manifest is JSON (read with
json), the host is read withplatform,shutil,socket, andsubprocess, and the generated Compose file is written as JSON, which Docker Compose accepts because JSON is valid YAML (a plain-text data format that uses indentation; see REF-01). PyYAML is therefore not required. - Optional extra
accept.pip install -e "installer[accept]"addspytest,pytest-playwright, andplaywright. Onlygrdm-dev acceptimports them (SPEC-04). - External tools are called as subprocesses and checked by
doctor:docker(27 or newer) with the Compose plugin (v2 or newer) and buildx (Docker's helper that builds one image for several kinds of computer; see REF-01),trivy,gitleaks, andsemgrepforscan, the OWASP ZAP (a tool that pokes at a running website the way an attacker would; see REF-01) container image forscan --dynamic, andmkdocsfordocs. A missing scanner makesscanexit 51 (SPEC-03 §8). - Every subcommand supports
--json, which prints the same report as machine-readable JSON instead of TOON (a compact text form of JSON, see SPEC-06 §4).
These scripts prepare a host and then run install.sh. The reason for them is in ADR-08. They hold no installation logic, so install.sh and grdm-dev still make every decision.
| Script | Host | What it can provide |
|---|---|---|
installer/install-ubuntu.sh |
Ubuntu 24.04 amd64 or arm64; Ubuntu 24.04 inside WSL2 | apt packages (git, Python, python3-venv, curl, gnupg), Docker Engine with the Compose and buildx plugins from Docker's signed apt repository, docker group membership, amd64 emulation on arm64 (QEMU registered from the digest-pinned tonistiigi/binfmt image, replacing Ubuntu's qemu-user-static 8.2.2, which crashed in a real build: DEMO-21), Trivy and gitleaks in ~/.local/bin, and libatomic1 when GRDM_WITH_ACCEPT=1. Inside WSL2 it skips Docker Engine and requires Docker Desktop. |
installer/install-macos.sh |
macOS on Apple Silicon | Homebrew formulae ([email protected], git, Trivy, gitleaks); starts an installed Docker Desktop. It detects Docker Desktop, OrbStack and Colima, and installs neither a Docker runtime nor Homebrew. |
installer/install-windows.ps1 |
Windows 11 amd64 | WSL2 and the Ubuntu-24.04 distribution; checks Docker Desktop and its WSL integration; clones this repository under the WSL home directory, never /mnt/c; then runs install-ubuntu.sh inside WSL. |
Rules that every script keeps:
- It shows what it will change, and asks before any
sudoor administrator action. Joining thedockergroup is asked separately. --yes(-Yesin PowerShell, which also accepts--yes) gives consent. Without a terminal and without--yesit stops with exit 2, as in §7.--dry-run(-DryRun) detects and prints the plan and changes nothing.- It can be run again: a prerequisite that is already present is skipped.
- It stops with a clear message on failure and uses only the exit codes 2, 10 and 11 of §6.
- A download is accepted only through a signed source or a pinned checksum, and nothing is piped into a shell.
- It never asks for, reads or stores a token. It only says how to give git access to the private integration repositories.
- Its last action is
installer/install.sh, with every other argument passed unchanged.
| Subcommand | Contract | Touches Docker |
|---|---|---|
doctor |
Detects OS (macOS, Ubuntu, WSL2), CPU (arm64, amd64), memory, free disk, Docker ⥠27, Compose plugin (v2 or newer), buildx, and proves what install needs so a problem appears before the long build: git; read access to the profile's private integration repositories, with git ls-remote that can never prompt (its output is never printed, a URL can hold a token); trivy, gitleaks and semgrep; the profile's memory floors against the smaller of the host and the Docker VM (--memory-gib turns this into a warning, a knowing overcommit); amd64 emulation (binfmt) on Linux arm64 only, printing the command that enables it, and the report line amd64_emulation (not needed (host is amd64) on amd64, ready (...) on Linux arm64 with a working handler, absent on macOS), and refusing an emulator build measured to crash (Ubuntu 24.04's qemu-user-static 8.2.2, read from the registered interpreter's --version), printing the command that replaces it; a checkout Docker can use: on WSL2 a filesystem that keeps a chmod 0600 read back from a test file (a Windows drive cannot hold runtime/.env at 0600); on macOS one the engine can see, asked by bind-mounting it read-only into the postgres image that up needs (the only image this subcommand may pull; a mount the engine refuses or that comes up empty is exit 13, a probe that could not run is a warning) because a bind mount from a path the Docker VM does not share is silently empty, with GRDM_DOCKER_SHARED=1 to skip the question when it cannot be run. Prints a TOON report. Exit 10 if the host is unsupported or the memory floors do not fit, 11 if Docker is missing or not running, 13 if a prerequisite is missing, 51 if a scanner is missing. |
read-only |
plan |
Resolves manifest + profile and prints which images would be built and which services started, with the published ports (§4). Changes nothing. Exit 20 if the manifest fails SPEC-01 checks. | no |
secrets init / secrets rotate |
init writes random secrets (database passwords, Django secret key, CAS keys) into runtime/.env with file mode 0600. Never writes a default or example password. Refuses to overwrite an existing file unless --force. init --missing is the upgrade for a runtime/.env that predates a new key (ELASTIC8_PASSWORD, ELASTIC8_OSF_PASSWORD, ADR-14): it keeps every existing value (passwords that live data depends on stay valid), adds only the absent keys, drops retired keys, changes no live password and needs no running stack; it cannot be combined with --force. rotate is not an upgrade step. It regenerates every secret, changes the live PostgreSQL and RabbitMQ passwords, recreates the containers so they receive the new environment, and verifies that the old credentials are rejected; any failure restores the previous runtime/.env and exits 40. init --force and rotate drop retired credential keys. After an upgrade, run compose render before rotate or any recreate, because a previously rendered Compose file still refers to retired keys. Four keys have lengths the CAS image needs: TGC_ENCRYPTION_KEY is 43 characters, TGC_SIGNING_KEY is 86 characters, OSF_API_INSTITUTIONS_AUTH_JWESECRET is exactly 32 bytes and OSF_API_INSTITUTIONS_AUTH_JWTSECRET is at least 32 bytes; the last two are also osf.io's JWE_SECRET and JWT_SECRET (ADR-07 §7). All four use only the base64url characters AâZ, aâz, 0â9, - and _ (no whitespace, quotes or padding), must not be a published default, and TGC_ENCRYPTION_KEY must decode canonically to 32 bytes. Used after a red-team capture (SPEC-03 §6). |
no / yes |
compose render |
Exits 2, naming the keys only, when runtime/.env lacks a generated key or holds a CAS key that CAS cannot use: wrong length, characters outside base64url, or a published default (a missing key: secrets init --missing; an unusable CAS key: secrets rotate). Writes runtime/docker-compose.yml from manifest + profile: the internal network grdm plus the publishing-only grdm-edge (--egress <services> attaches more, recorded in runtime/.env; SPEC-03 §3.2), per-component platform: from the manifest's build_platform, ports published only on 127.0.0.1 (§4), non-root user: for every service, read_only, cap_drop, and resource limits (mem_limit, cpus, pids_limit) scaled from the smaller of the host memory doctor detected and the Docker engine's VM memory (docker info; on Docker Desktop the VM is a fraction of the host, real install run 10), where a template's mem_min_mb floor takes its share first and the others divide the rest, and from the CPU count the engine reports (docker info; the host's only when that is unknown), with per-service exceptions from manifest/hardening.json (SPEC-03 §3.3), platform: chosen from doctor, named volumes mapped under runtime/volumes/, every tmpfs entry mounted with mode=1777 (Compose's short form gives root-only 0755, real install run 11), and the placeholders {{HOST_PORT:<service>}}, {{CONTAINER_PORT:<service>}} and {{AUTH_URL}} (fakecas's published URL, or web's when --auth shibboleth replaces fakecas) resolved in template values. The image: of a built component carries the tag of the last build (runtime/reports/build_latest.json) only when it equals the tag the manifest pins; a recorded build that differs from the pin is stale (the pin moved after the last build), so the pinned tag is rendered instead, the report lists the component under stale_build_tags (component, pinned, recorded, image), and stderr prints a warning block whose fix is grdm-dev build, then grdm-dev up. Render still exits 0 because install renders before it builds; an image that was never built makes up fail instead of running the old one. A component the manifest does not pin keeps the recorded tag. osf.env names osf.io's connection to Elasticsearch 8 (ELASTIC_URI=https://elasticsearch8:9200, ELASTIC_CA_CERTS=/es-ca/ca.crt; the user grdm_osf and its password come from the service environment), its internal URL for y-websocket (Y_WEBSOCKET_INTERNAL_URL) and ENABLE_PUBLIC_ACCESS; web, api, admin, worker and osf_init mount elasticsearch8_ca (only the public certificate) read-only. `--public-access true |
false(default:GRDM_ENABLE_PUBLIC_ACCESSinruntime/.env, else false) sets ENABLE_PUBLIC_ACCESSfor every osf.io process (RDM-osf.io-dev2027 PR #8):falserequires authentication for every data route (anonymous requests get a redirect to the login or 401; signed WaterButler and MFR callbacks, webhooks and the like keep working),trueallows anonymous viewing of public projects; the choice is recorded inruntime/.envand kept on later renders, like--egress`. Follows ADR-02. |
build |
Builds images with docker buildx. The platform is, in order of precedence, --platform, the component's build_platform in the manifest (for example linux/amd64 for components whose EOL base cannot be built for arm64, run under emulation), otherwise the host platform; the image is loaded locally. A component with prebuilt_image (SPEC-01) is not built: the digest-pinned image is pulled once per requested platform and reported as prebuilt (pull-failed â exit 30). With --push a prebuilt image is never re-published to ghcr.io/rcosdp (it is a third party's artefact); the row is reported as prebuilt-not-pushed with pushed: false. --push pushes the multi-arch manifest to ghcr.io/rcosdp/<name> (private). Exit 30 on failure. |
yes |
up / down / reset |
up first finishes or rolls back an interrupted db operation, then stops with exit 15 when runtime/volumes/postgres_data was written by another PostgreSQL major than the rendered image or its major cannot be read (ADR-12), otherwise starts the profile and waits for health. Before the database check, up stops with exit 13 when a volume grdm-dev_<name> of the rendered file already exists in Docker and is bound to another directory than this checkout's runtime/volumes/<name> (a new clone or a moved directory of the same project: Docker keeps the options of the day the volume was created and Compose reuses it without comparing, so this checkout would open the other one's data with its own new secrets); nothing is started or deleted, and the message names the volumes and the commands that release them (grdm-dev down in the other checkout, then docker volume rm <names>, which leaves the files on disk). down stops containers and keeps volumes; reset stops and deletes runtime/volumes/ after a confirmation (skipped by --yes), emptying it through a root container with only DAC_OVERRIDE and FOWNER, because on Linux the files belong to the containers' uids and the host user cannot remove them. Before anything is stopped or deleted the paths are validated on the host: a symlinked runtime/ or volumes root, a root that resolves outside the checkout, a symlinked volume, or any mount at runtime/, at the volumes root or at any depth inside it (read from the host mount table, so same-filesystem bind mounts count; an unreadable table also refuses) stops with exit 14. reset repeats this after down and after the wipe, and stops if the volumes root has become a different directory. compose render and up apply the same validation with exit 13, because the owner step also runs as root against these paths. These are snapshots: Docker resolves the bind later and no check can close that window, so the checkout is assumed not to be changed concurrently by another user or process. |
yes |
db status / db upgrade / db rollback / db recover |
status prints the PostgreSQL major of runtime/volumes/postgres_data and of the rendered postgres image and changes nothing. upgrade (all services stopped, after a confirmation that --yes skips) moves the data to the rendered major by dump and restore: the old major runs on the old directory with no network, the new major's pg_dumpall writes runtime/backups/postgres-<old>-to-<new>-<timestamp>/, a new directory is initialised and restored with ON_ERROR_STOP, every table's row count and sequence value is compared, and only then is the old directory renamed postgres_data.pg<old>-<timestamp> beside the new one. rollback puts that directory back. Both hold an exclusive lock, which up and reset also take for their checks and their start or deletion, and write a durable journal (runtime/db-operation.json) before they create or rename anything; recover, and first every later db command, reset and up, finish or roll back an operation that a crash or an interrupt left behind, and a free-disk estimate is checked before the old server starts. Exit 15 on failure, with the old or the new cluster usable, or with the journal kept when a compensating rename also failed. See ADR-12. |
yes |
health |
Checks every service's health endpoint: an HTTP GET on the published loopback port (/ for most services; /login/ for web, because osf.io's / proxies to ember and answered 500 while the former prebuilt ember was still building â real install run 14; /healthz for ember_osf_web, where only HTTP 200 counts); a one-shot counts as healthy once it has exited 0. With --network, also lists listening sockets on the host and fails (exit 40) if any container port is bound to a non-loopback address, or if a wildcard listener on a project port has no visible owner (fail closed). A named host program that is not Docker on a project port (macOS AirPlay Receiver on *:5000, real install run 16) is reported as a foreign-listener warning, not a failure: it is not our leak, and GRDM_PORT_<SERVICE> in runtime/.env moves our port. |
read-only |
scan |
Runs the whole security gate of SPEC-03: baseline controls, Trivy SBOM (software bill of materials: the list of all parts inside an image) and CVE list, gitleaks, Semgrep, and OWASP ZAP; writes runtime/reports/scan_<date>.json plus TOON, and diffs findings against manifest/allowlist.json and manifest/allowlist.baseline.json for the milestone in manifest/milestone.json. Gate per ADR-03: M1âM3 report only, M4 exit 50 on HIGH, M5 exit 50 on CRITICAL or HIGH. Flags --baseline, --secrets, --dynamic run one part only. Exit 51 if a scanner cannot run, 52 if --dynamic was asked for while services are unhealthy. |
read-only |
redteam preflight |
Verifies, before an AI red-team run, that the attacker container of the red-team Compose project is isolated (proved with a reachable canary, see SPEC-03 §6), that only the containers named in manifest/redteam-targets.json are attached, and that the approval record is present and current. Exit 53 if either check fails. See SPEC-03 §6. |
yes (starts and removes a canary container and network for the probe) |
accept |
Runs the Playwright Python acceptance suite in the same .venv/. --only <scenario> runs one scenario; --seed creates the disposable test users. Exit 60 on any failing test. See SPEC-04. |
read-only |
upstream mirror / upstream integrate |
Runs the daily mirror or the weekly integration of SPEC-05 by hand. Needs Git credentials for the private -dev2027 repositories; never run in this repository's CI. Exit 70 when a fetch was refused or failed, a push failed, or a merge conflicted; the report is written in every case. |
no (Git only) |
manifest check / manifest toon |
check validates manifest/upstreams.json (SPEC-01 §5) and verifies that every TOON excerpt in docs/ and manifest/upstreams.toon agree with it. Exit 20 on mismatch. toon prints the excerpt that upstreams.toon must equal. |
no |
docs build / docs check |
build runs MkDocs into site/. check enforces SPEC-06 §8: anchors, Jump line, relative links, TOON consistency, Version line. |
no |
report |
Bundles the latest reports of doctor, plan, health, scan, and accept into runtime/reports/<timestamp>.toon and .json. |
no |
install |
The sequence shown in the flowchart. Stops at the first non-zero step. Right after compose render it runs the read-only volume check of up (exit 13 when Docker volumes of the project were created by another checkout), so that case stops before build, not after it. |
yes |
profiles[3]{name,services,note}:
minimum,"osf_init volume_owner_init volume_access_check_1000 web api postgres elasticsearch8 elasticsearch8_setup rabbitmq fakecas",smallest set that shows a login and a project page
core,"minimum + admin worker wb wb_worker mfr unoconv ember_osf_web cas wiki_assets elasticsearch6 redis y_websocket volume_access_check_999","the six core repositories with their infrastructure, plus y_websocket for Wiki collaborative editing; wiki_assets is a one-shot that copies the wiki editor bundle into the volume wiki_static (ADR-06)"
full,"core + rdmcp aipf_mcp_data_grdm oasys shibboleth_sp test_idp",everything; shibboleth_sp replaces fakecas
Service names follow the upstream docker-compose.yml of RDM-osf.io so that existing guides keep working, and they are the services[] values of the manifest (SPEC-01 §3). The wiki-frontend component is an overlay of osf.io (overlay_of, ADR-06): its service is a one-shot (a container that runs once and exits, restart: "no") on the bundle-builder image grdm-dev/wiki-frontend:<osf_sha12>-<wiki_sha12>: after volume_owner_init has handed the fresh volume wiki_static to uid 1000, wiki_assets copies the webpack output /code/website/static/public/js/ into it and exits; web, api, admin and worker mount that volume read-only at /code/website/static/public/js/wiki/ and depend on it with condition: service_completed_successfully, so up starts them only after the bundle is in place. health counts a one-shot as healthy once it has exited with code 0. The shibboleth Compose profile and the fakecas service are mutually exclusive: compose render --profile full --auth shibboleth removes fakecas and adds shibboleth_sp and test_idp; the default for full is fakecas. y_websocket belongs to core, not full, because Wiki collaborative editing is an M2 acceptance scenario (C4 in SPEC-04 §4); the manifest's profile for the y-websocket component is core accordingly (SPEC-01 §3).
elasticsearch8 runs the image grdm-dev/elasticsearch8:<tag> that build makes from installer/images/elasticsearch8 (manifest image_build: the official Elasticsearch 8.19.24 pinned by digest plus the two Japanese-analysis plugins) as uid 1000 on a read-only root with TLS, authentication and scripts off, and publishes no port (its health check allows 30 s plus 100 tries, 10 s apart and up to 5 s each, so 17 to 26 minutes, because a start took 8 min 10 s under full-system amd64 emulation, where the earlier 12 tries marked a healthy start unhealthy and up stopped with exit 40, DEMO-22 0.7; a start that is up passes at once, and the window stays inside the default up wait of 1800 s); elasticsearch8_setup is a one-shot that creates the role and user grdm_osf, limited to the website* indices, that osf.io searches with (ADR-14); the former elasticsearch (Elasticsearch 2, ADR-07) is retired together with mongo and sharejs (ADR-13 §6), and y_websocket keeps the drafts of file-page rooms in the volume y_websocket_data (YPERSISTENCE, prefix file-). The one-shot volume_owner_init (the postgres image, for its GNU tools, as explicit root with CAP_CHOWN only, one exception in manifest/hardening.json) hands every writable bind volume to the user: of the services that mount it writable, because a fresh directory belongs to the host user and a PR #33 tree to uid 101: on a Linux or WSL2 host whose uid differs, a non-root writer (redis is uid 999, the others 1000) could otherwise not use it. Services that keep root never decide an owner: postgres and rabbitmq set their own, while unoconv shares wb_tmp with its uid-1000 writers and holds DAC_OVERRIDE (a bounded exception, because root without it obeys file permissions and LibreOffice could not write there). All writers wait with condition: service_completed_successfully. Migration and retry contract. Requires GNU find and chown. Every up walks each volume with no marker and no shortcut, so a stopped run is finished by the next one and a correct top directory cannot hide wrong descendants. With only CAP_CHOWN the step reaches another uid's private directory by taking ownership of it first, hands files to the target uid, verifies that none was missed, and hands directories over last. It does not follow symlinks or leave the volume. A failure, such as a directory with mode 000, stops the step, naming the path, and writers do not start; run up again or reset. A chown that has no effect stops the step (results are read back, directories included), except on the VM shares that present every path as root:root (virtiofs measured on Colima; fakeowner, fuse.grpcfuse, fuse.sshfs, 9p). There and everywhere else, the one-shots volume_access_check_1000 and volume_access_check_999 run as the writer's own uid: each creates a uniquely named file exclusively (mktemp, which never follows a symlink or touches existing data) and removes only that file, then walks the existing tree and refuses any directory the uid cannot enter, list or write and any file it cannot read, changing nothing. Writers do not start unless that works. osf_init (component osf.io, profile minimum) is another one-shot: on the osf.io image, as uid 1000, it runs the steps the upstream README lists for a new database â manage.py migrate, scripts.populate_institutions -e test -a and scripts.register_oauth_scopes â retrying migrate every 10 s for up to 5 minutes until postgres accepts connections, running invoke search_ensure_index (creates the Elasticsearch (the search engine inside GRDM; see REF-01) index website_v1 and its alias with the full mapping) before the institution import, and exits 0; it also applies the migrations of the admin two-step sign-in (addons_twofactor 0006 and 0007), because the admin project runs none itself; web, api, admin and worker wait for it with condition: service_completed_successfully. All three steps are idempotent, so the service runs at every up (real install run 12: without it a fresh database made web answer 500 with relation "osf_institution" does not exist, and each such error leaked one postgres connection of the development server). ember_osf_web runs the static image that build makes from RDM-ember-osf-web-dev2027: its Dockerfile runs the ember-cli production build in a Node stage on the build host's own platform (the output is platform-independent, so neither amd64 (the CPU type of ordinary PCs and servers; see REF-01) nor arm64 emulates it) and serves the result with nginx-unprivileged as uid 101 on port 4200, on a read-only root with only /tmp (tmpfs) writable, with no volume and no depends_on. The image reads only OSF_URL, OSF_API_URL, OSF_RENDER_URL, OSF_FILE_URL, OSF_HELP_URL, CAS_URL = {{AUTH_URL}}, OSF_COOKIE_DOMAIN, CSP_MODE (enforce) and the optional CSP_EXTRA_SOURCES. At start its entrypoint writes the URLs into index.html under /tmp, exits 1 on a value that is not a plain http(s) URL (a host name for the cookie domain), refuses to serve if the Google Analytics adapter is in the page, sets the Content-Security-Policy from those origins and starts nginx, so a start takes seconds; there is no ember serve and no live reload. Its Compose health check is a wget of /healthz (the image has no curl).
Published ports. This table is the only place where default host ports are defined; ADR-02, SPEC-03, and REF-01 point here. Every port is published on 127.0.0.1 only.
ports[8]{service,host_port,profile,url}:
web,5000,minimum,http://127.0.0.1:5000
api,8000,minimum,http://127.0.0.1:8000
admin,8001,core,http://127.0.0.1:8001
wb,7777,core,http://127.0.0.1:7777
mfr,7778,core,http://127.0.0.1:7778
fakecas,8080,minimum,http://127.0.0.1:8080
ember_osf_web,4200,core,http://127.0.0.1:4200
y_websocket,1234,core,http://127.0.0.1:1234
All other services (cas, volume_owner_init, wiki_assets, the subsystems, test_idp, databases and queues) are reached only inside the Compose network; when one of them needs a browser-facing port, compose render assigns it and plan prints it. compose render writes every chosen host port to runtime/.env as GRDM_PORT_<SERVICE> (upper case), which the acceptance tests read (SPEC-04 §1). If a default port is already in use (macOS AirPlay on 5000 is the known case), compose render takes the next free port and records the change in the install report; exit 12 is returned only when no free port is found.
The admin service runs Django's development server as manage.py runserver 0.0.0.0:8001 --insecure, and api runs manage.py runserver 0.0.0.0:8000, both threaded: --nothreading (which invoke apiserver and invoke adminserver add) stalls under Django 2.2 (RDM-osf.io-dev2027 PR #13), because the 2.2 development server keeps a connection open for the next request and a single-threaded server then waits on a browser's idle second connection for 30 s while every other client times out; DEBUG_MODE stays True for both, so api/base/wsgi.py does not monkey-patch gevent and each thread opens its own database connection. With DEBUG = False (the generated admin_local.py, which keeps debug_toolbar out), runserver serves no static files, so the admin pages would load without their style sheets, scripts and icon fonts; --insecure makes runserver serve them from the app's static directories. This is a development-only exception: the port is published only on 127.0.0.1 like every other port in this table (ADR-02), the server is not a production web server, and a deployment must serve the admin app's static files through its own web server (for example after collectstatic) instead of this flag. A unit test keeps every published port on the loopback address.
| Flag | Meaning |
|---|---|
--yes |
Answer every question with its default. Required when no terminal is attached. |
--profile minimum|core|full |
Default core. Saved in runtime/.env as GRDM_PROFILE and reused on later runs. |
--platform linux/arm64,linux/amd64 |
Override the platforms for build. Default: host platform only. |
--memory-gib <GiB> |
doctor, compose render and install: scale the limits from this size instead of the detected one, a knowing overcommit when the profile's floors do not fit. |
--public-access true|false |
compose render and install: ENABLE_PUBLIC_ACCESS of every osf.io process. Default false (authentication required); saved in runtime/.env as GRDM_ENABLE_PUBLIC_ACCESS. |
--timeout <seconds> |
up and install (passed to up only; it does not change build, which has no time limit): how long to wait for health. An explicit 0 is passed on. Default 1800, or 5400 on Linux arm64 when the profile has amd64 services; raise it on a slow, fully emulated host. |
--no-open |
Do not open the browser after up. |
--json |
Print reports as JSON instead of TOON. |
exit_codes[17]{code,meaning}:
0,success
2,"usage error: unknown flag or bad value"
10,"host unsupported: OS, CPU, memory, or Python too old"
11,"Docker missing, not running, or Compose / buildx plugin absent"
12,a required port on 127.0.0.1 is in use and no free alternative was found
13,"install prerequisite missing: git, repository access, amd64 emulation, or a checkout path Docker cannot use"
14,reset could not delete runtime/volumes/
15,"PostgreSQL data directory needs `grdm-dev db upgrade`, or the upgrade or rollback failed (the old directory is kept)"
20,manifest invalid or TOON excerpt disagrees with JSON
30,image build failed
40,"health check failed, or a port listens on a non-loopback address"
50,security scan gate failed for the current milestone
51,"scanner could not run: tool missing or vulnerability database download failed"
52,"services not healthy, so scan --dynamic could not run"
53,"red-team preflight failed: egress reachable or a target outside redteam-targets.json"
60,acceptance test failed
70,"upstream mirror or integrate failed: fetch refused, push failed, or merge conflict"
Numbers are never reused for a new meaning; a new cause gets a new number. The canonical table is installer/grdm_dev/messages.tsv, and this TOON block must agree with it (manifest check verifies). Codes 50â53 are described in detail in SPEC-03 §8; code 70 in SPEC-05 §2â§4.
- Non-interactive. When
stdinis not a terminal and--yesis absent, every question is answered "no" and the command exits 2 with a hint to add--yes. - Idempotent. Running any subcommand twice gives the same result.
secrets initkeeps existing secrets,compose renderoverwrites only the generated file,builduses the buildx cache,upis a no-op for healthy services. - No secrets in Git.
runtime/is in.gitignore.docs checkand the CI secret scan fail if a file underruntime/or a value that looks like a secret is committed. - No host network changes. The loopback alias
192.168.168.167from the old guide is not created;compose renderrewrites the upstreamlocal.pyand.docker-compose.*.envsettings to use service names inside the Compose network and127.0.0.1for the browser (ADR-02). - First start is slow, later starts are not.
upwaits up to 1800 s (--timeout) for health. The firstuprunsosf_init, which leaves its result in named volumes, so a secondupis healthy within a minute or two. The default was set when the firstupalso built ember-osf-web (the newer web pages of GRDM; see REF-01) under emulation on Apple Silicon (the chips Apple puts in its Macs since 2020; see REF-01), which took 13â25 minutes (real install runs 10â18). ember-osf-web is now built bybuildinto a static image and starts in seconds; the default stays until a cold start without that build is measured. On Linux arm64 the emulation is QEMU, where the former first ember build took 44 minutes on one core, so there the default is 5400 s when the profile has amd64 services (stillmfr) (DEMO-21);--timeoutstill overrides it, andinstall --timeoutpasses it toup, which a fully emulated amd64 machine can need: there the first ember build (under emulation, before ember became a static image) took 1 h 46 min andup2 h 19 min (DEMO-22). - No
-privatecode here. The installer clones the integration repositories by name and SHA (the fingerprint of one commit; see REF-01) from the manifest at run time; this public repository holds no code from them (POL-01).
Memory. compose render budgets 70 % of the smaller of the host memory and the Docker engine's VM memory and refuses (exit 10) a profile whose per-service floors do not fit, naming the required size; --memory-gib overrides the detection and is a knowing overcommit (PR #33 review r1 R1-04). doctor applies the same arithmetic first and names the remedy for the host: Docker Desktop's Resources page or colima start --memory on macOS, .wslconfig on WSL2 (the Resources page has no memory control under the WSL 2 backend). The floors (mem_min_mb of the service templates, including the one-shots) of the core profile add up to 8512 MiB, so core needs at least 8512 / 0.7 / 1024 â 11.9 GiB of detected memory, that is a Docker VM of 12 GiB (full: 9536 MiB, about 13.3 GiB, with fakecas; 9856 MiB, about 13.7 GiB, with --auth shibboleth). This is a lower bound computed from the floors, not a measured peak: it does not cover build, whose Node stage for ember-osf-web needs several GiB of engine memory while it runs. The former figure of about 24 GiB came from the prebuilt ember-osf-web image, which rebuilt its bundle at every start under emulation with an 8 GiB floor; the static image has a 128 MiB floor. minimum fits in 8 GiB.
| Host | CPU | Support |
|---|---|---|
| macOS 14 or newer with Docker Desktop | arm64 | official (M2 acceptance runs here) |
| Ubuntu 24.04 with Docker Engine | amd64, arm64 | official |
| Windows 11 with WSL2 (Ubuntu 24.04) and Docker Desktop | amd64 | required to work; CI parses and dry-runs install-windows.ps1 only, and a real run needs owner hardware (ADR-08 §5) |
| Other Linux, macOS on Intel | any | best-effort; doctor warns and continues |
layout:
installer/install.sh: bash 3.2 bootstrap
installer/install-ubuntu.sh: Ubuntu 24.04 and WSL2 prerequisites (§2.3)
installer/install-macos.sh: macOS prerequisites (§2.3)
installer/install-windows.ps1: Windows 11 prerequisites and WSL2 hand-over (§2.3)
installer/prereq-lib.sh: helpers shared by the two bash prerequisite scripts
installer/pyproject.toml: package metadata, console script grdm-dev, extra accept
installer/grdm_dev/:
cli.py: argument parsing, subcommand dispatch, exit codes
host.py: OS, CPU, memory, disk, Docker detection
manifest.py: load and validate manifest/upstreams.json, TOON comparison
secrets.py: random secret generation, runtime/.env with mode 0600
compose.py: render runtime/docker-compose.yml from manifest and profile
database.py: PostgreSQL data directory status, upgrade by dump and restore, rollback (ADR-12)
build.py: buildx wrapper, platform list, optional push
health.py: service health and loopback-only check
scan.py: baseline controls, Trivy SBOM and CVE, gitleaks, Semgrep, ZAP, allow-list diff, staged gate (SPEC-03)
redteam.py: red-team preflight (SPEC-03 §6)
upstream.py: mirror and integrate (SPEC-05)
accept.py: run pytest-playwright in the same venv
docs.py: MkDocs build and SPEC-06 checks
report.py: bundle TOON and JSON reports
messages.tsv: exit code, English message, Japanese message
installer/tests/: unittest, files named test_*.py
installer/acceptance/: Playwright Python, see SPEC-04
manifest/:
upstreams.json: canonical manifest (SPEC-01)
upstreams.toon: excerpt generated by grdm-dev manifest toon (SPEC-01)
allowlist.json: accepted findings (SPEC-03 §5.1)
allowlist.baseline.json: allow-list count at the last milestone exit, owner-maintained (SPEC-03 §5.1)
milestone.json: current milestone, owner-maintained (SPEC-03 §5.2)
hardening.json: per-service exceptions to read-only root and cap_drop, with reasons (SPEC-03 §3.3)
redteam-targets.json: container names the AI red team may touch (SPEC-03 §6)
runtime/: generated, git-ignored (.env, docker-compose.yml, volumes/, reports/, backups/, db-operation.json and .lock)
python3 -m unittest discover -s installer/tests must pass on every PR (pull request: a proposed change waiting for review; see REF-01). Each module has a test_<module>.py that covers at least one success case and one rejection case, and every rejection case asserts the exit code from §6. Docker is never required by unit tests: host.py and build.py take an injectable runner so tests pass fake docker output. Integration and acceptance tiers are defined in SPEC-04.
The prerequisite scripts of §2.3 are checked on every PR by installer-prereq-lint.yml: bash -n, shellcheck, the PowerShell parser on windows-latest, and a dry run on each OS. Unit tests run them only with --dry-run or --help, under a PATH of stubs. installer-full.yml, started by hand, does a full minimum install on ubuntu-24.04 and ubuntu-24.04-arm and needs the repository secret GRDM_INTEGRATION_READ_TOKEN. What these runners cannot prove is listed in ADR-08 §5.
ã€ã³ã¹ããŒã©ãŒã¯ããã®ãªããžããªãåãåºããçŽåŸã®ç¶æ
ããã§8 ã«æãããã¹ãã§ãã³ãã³ãäžã€ã§ GakuNin RDMïŒGakuNinïŒåŠèªã倧åŠã®ã¢ã«ãŠã³ãã§ãã°ã€ã³ããããã®æ¥æ¬ã®åŠè¡ãããã¯ãŒã¯ãREF-01ïŒã®éçºç°å¢ãåãããã®ã§ããinstall.sh ãš grdm-dev 㯠sudoïŒã³ã³ãã¥ãŒã¿ã®ç®¡çè
ãšããŠã³ãã³ããåããä»çµã¿ïŒã䜿ããããã¹ãã®ãããã¯ãŒã¯èšå®ãå€ãããäœåºŠããçŽããŠãå£ããŸãããäœããããã®ã¯ãã¹ãŠ runtime/ ã®äžã«ãããGit ã¯ç¡èŠããŸããä»»æã®åææ¡ä»¶ã¹ã¯ãªããïŒÂ§2.3ïŒã¯äºåã«ãã¹ããæºåããsudo ã䜿ãããšããããŸããã倿Žã瀺ããŠåæãåŸãåŸã«éããŸãïŒADR-08ïŒã
çšèªæ³šã ãã€ã³ã¹ããŒã©ãŒãã¯ãã»ãã®ããã°ã©ã ãåãããã«æºåããããã°ã©ã ã§ãããCLIãïŒã³ãã³ãã©ã€ã³ã€ã³ã¿ãŒãã§ãŒã¹ïŒã¯ãæåã§ã³ãã³ããæã£ãŠäœ¿ãããã°ã©ã ã§ãããã³ã³ãããã¯ãäžã€ã®ããã°ã©ã ãšå¿ èŠãªãã®ãäžç®±ã«å ¥ããã©ã®ã³ã³ãã¥ãŒã¿ã§ãåãããã«åããããã®ç®±ã§ãããDockerãïŒã€ã¡ãŒãžãäœãã³ã³ãããåããéå ·ãREF-01ïŒãšãã®çžæ£ã®ãDocker ComposeãïŒREF-01ïŒãã³ã³ãããåãããŸããCompose ã¯äžæã®èšå®ãã¡ã€ã«ããå€ãã®ã³ã³ããããŸãšããŠèµ·åããéå ·ã§ãããmanifestãã¯ãã©ã®ãœãŒã¹ãªããžããªã®ã©ã®çã䜿ãããæ£ç¢ºã«æžããäžèЧã§ãïŒSPEC-01ïŒã
ç°å¢ãå°å ¥ããå ¥å£ã¯äºã€ã§ãïŒÂ§2.1ã§2.2ïŒããã®ããã«ãã¹ããæºåããä»»æã®ã¹ã¯ãªããããããŸãïŒÂ§2.3ïŒã
install.sh ãããããšã¯æ¬¡ã®åã€ã ãã§ãã
- macOS æšæºã®
bashïŒç 3.2ïŒã§åãããã®ãã飿³é åãmapfileã${var,,}ã®ãããªæ°ããæ©èœã¯äœ¿ããªãã python3ãæ¢ãã3.11 以äžãã確ããããè¶³ããªããã°ãå€å®ãã OS ã«åãããå°å ¥æ¹æ³ã衚瀺ããŠçµäºã³ãŒã 10 ã§çµããã- ãä»®æ³ç°å¢ãïŒã·ã¹ãã ãšã¯å¥ã®ãPython ãšã©ã€ãã©ãªã ãã®ç§çšãã©ã«ãïŒã
.venv/ã«äœããpip install -e installer[scan]ã§installer/ããã±ãŒãžãå ¥ããïŒè¿œåscanã¯grdm-dev scanãããŒã«ã«ã§åãã Semgrep ãå«ããSPEC-03 §4.2ã宿©ç¬¬ 17 åãGRDM_WITHOUT_SCAN=1ã§å€ããGRDM_WITH_ACCEPT=1ã§ Playwright ãå ããïŒã - åŒæ°ããã¹ãŠ
.venv/bin/grdm-dev install "$@"ã«æž¡ãããã®çµäºã³ãŒãã§çµããã
OS ã®éã㯠install.sh ã«ã¯æžããŸãããinstaller/grdm_dev/host.py ã«éã蟌ããŸããå©çšè
åãã®æèšã¯ installer/grdm_dev/messages.tsvïŒã³ãŒãããšã«äžè¡ãè±èªã𿥿¬èªã®åïŒããåºããã¹ã¯ãªãããš Python ã³ãã³ããåãèšèã話ãããã«ããŸãã
flowchart TD
A[./installer/install.sh --yes] --> B{python3 㯠3.11 以�}
B -- ããã --> X10[çµäº 10: Python ã®å°å
¥æ¹æ³ã衚瀺]
B -- ã¯ã --> C[.venv/ ãäœã pip install -e installer]
C --> D[grdm-dev doctor]
D -- 察象å€ã®ãã¹ã --> X10b[çµäº 10]
D -- Docker ãç¡ã --> X11[çµäº 11]
D -- åæãäžè¶³ --> X13[çµäº 13]
D -- ã¹ãã£ããŒãç¡ã --> X51[çµäº 51]
D --> E[grdm-dev plan]
E -- manifest äžæ£ --> X20[çµäº 20]
E --> F[grdm-dev secrets init]
F --> G[grdm-dev compose render]
G --> H[grdm-dev build]
H -- 倱æ --> X30[çµäº 30]
H --> I[grdm-dev up]
I --> J[grdm-dev health --network]
J -- 倱æ --> X40[çµäº 40]
J --> K[grdm-dev scan]
K -- éã§äžåæ Œ --> X50[çµäº 50]
K --> L[grdm-dev report]
L --> Z[çµäº 0ãURL http://127.0.0.1:5000 ã衚瀺]
grdm-dev ã¯ããã±ãŒãž installer/grdm_dev/ ããã³ã³ãœãŒã«ã¹ã¯ãªãããšããŠå
¬éãããã®ã§ããèŠåã¯æ¬¡ã®ãšããã§ãã
- æšæºã©ã€ãã©ãªåªå
ã ã³ãã³ãæ¬äœã¯å€éšã©ã€ãã©ãªã«äŸåããŸãããmanifest 㯠JSONïŒ
jsonã§èªãïŒããã¹ãã¯platformã»shutilã»socketã»subprocessã§èªã¿ãçæãã Compose ãã¡ã€ã«ã¯ JSON ã§æžãåºããŸããJSON 㯠YAMLïŒåäžãã§ããŒã¿ãæžãæåã®åœ¢ãREF-01ïŒãšããŠæ£ããã®ã§ Docker Compose ããã®ãŸãŸèªããŸãããããã£ãŠ PyYAML ã¯èŠããŸããã - ä»»æã®è¿œå
acceptãpip install -e "installer[accept]"ã§pytestã»pytest-playwrightã»playwrightãå ¥ããŸããããããèªã¿èŸŒãã®ã¯grdm-dev acceptã ãã§ãïŒSPEC-04ïŒã - å€éšã®éå
· ã¯ãµãããã»ã¹ãšããŠåŒã³ã
doctorãæç¡ã確ãããŸããdockerïŒ27 以äžïŒãš Compose ãã©ã°ã€ã³ïŒv2 以äžïŒã»buildxïŒäžã€ã®ã€ã¡ãŒãžãäœçš®é¡ãã®èšç®æ©åãã«äœã Docker ã®å©æãREF-01ïŒãscançšã®trivyã»gitleaksã»semgrepãscan --dynamicçšã® OWASP ZAPïŒåããŠãã Web ãµã€ããæ»æè ã®ããæ¹ã§ã€ã€ãéå ·ãREF-01ïŒã®ã³ã³ããã€ã¡ãŒãžãdocsçšã®mkdocsã§ããã¹ãã£ããŒãç¡ããšscanã¯çµäº 51 ã§çµãããŸãïŒSPEC-03 §8ïŒã - ãã¹ãŠã®ãµãã³ãã³ãã¯
--jsonãåãä»ããTOONïŒJSON ãçãæžããæå圢åŒãSPEC-06 §4ïŒã®ä»£ããã«æ©æ¢°ãèªã JSON ã§åãå ±åãåºããŸãã
ãããã®ã¹ã¯ãªããã¯ãã¹ããæºåããŠãã install.sh ãå®è¡ããŸããçç±ã¯ ADR-08 ã«ãããŸããå°å
¥ã®å€æã¯æããããã¹ãŠã®å€æã¯åŒãç¶ã install.sh ãš grdm-dev ãè¡ããŸãã
| ã¹ã¯ãªãã | ãã¹ã | çšæã§ãããã® |
|---|---|---|
installer/install-ubuntu.sh |
Ubuntu 24.04 ã® amd64ã»arm64ãWSL2 ã®äžã® Ubuntu 24.04 | apt ããã±ãŒãžïŒgitãPythonãpython3-venvãcurlãgnupgïŒãDocker ã®çœ²åä»ã apt ãªããžããªããã® Docker Engine ãš Composeã»buildx ãã©ã°ã€ã³ãdocker ã°ã«ãŒããžã®è¿œå ãarm64 ã§ã® amd64 ãšãã¥ã¬ãŒã·ã§ã³ïŒãã€ãžã§ã¹ãã§åºå®ãã tonistiigi/binfmt ã€ã¡ãŒãžãã QEMU ãç»é²ãããå®éã®ãã«ãã§èœã¡ã Ubuntu ã® qemu-user-static 8.2.2 ã¯çœ®ãæãããDEMO-21ïŒã~/.local/bin ã® Trivy ãš gitleaksãGRDM_WITH_ACCEPT=1 ã®ãšãã® libatomic1ãWSL2 ã®äžã§ã¯ Docker Engine ãé£ã°ããDocker Desktop ãæ±ããã |
installer/install-macos.sh |
Apple Silicon ã® macOS | Homebrew ã® formulaïŒ[email protected]ãgitãTrivyãgitleaksïŒãå
¥ã£ãŠãã Docker Desktop ãèµ·åãããDocker Desktopã»OrbStackã»Colima ãæ€åºããDocker ã®å®è¡åºç€ã Homebrew ãå
¥ããªãã |
installer/install-windows.ps1 |
Windows 11 ã® amd64 | WSL2 ãš Ubuntu-24.04 ã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ãDocker Desktop ãš WSL 飿ºã確èªããããã®ãªããžããªã WSL ã®ããŒã ã®äžã« clone ãïŒ/mnt/c ã«ã¯æ±ºããŠçœ®ããªãïŒãWSL ã®äžã§ install-ubuntu.sh ãå®è¡ããã |
ã©ã®ã¹ã¯ãªãããæ¬¡ãå®ããŸãã
- äœãå€ãããã瀺ãã
sudoã管çè ã®æäœã®åã«å°ãããdockerã°ã«ãŒããžã®è¿œå ã¯å¥ã«å°ããã --yesïŒPowerShell ã§ã¯-Yesã--yesãåãä»ããïŒã§åæããã端æ«ãç¡ã--yesãç¡ããã°ã§7 ã®ãšããçµäº 2 ã§æ¢ãŸãã--dry-runïŒ-DryRunïŒã¯å€å®ããŠäºå®ã衚瀺ããäœãå€ããªãã- åå®è¡ã§ãããæ¢ã«ããåææ¡ä»¶ã¯é£ã°ãã
- 倱æãããåãããããæèšã§æ¢ãŸãã§6 ã®çµäºã³ãŒã 2ã»10ã»11 ã ãã䜿ãã
- ããŠã³ããŒãã¯çœ²åãããé åžå ãåºå®ãããã§ãã¯ãµã ã§ã ãåãå ¥ããã·ã§ã«ãžæµã蟌ãŸãªãã
- ããŒã¯ã³ãå°ãããèªãŸããä¿åããªããéå ¬éã®çµ±åãªããžããªãžã®æš©éã git ã«äžããæ¹æ³ãæ¡å ããã ãã§ããã
- æåŸã«
installer/install.shãå®è¡ããã»ãã®åŒæ°ã¯ãã®ãŸãŸæž¡ãã
| ãµãã³ãã³ã | å¥çŽ | Docker ã«è§Šããã |
|---|---|---|
doctor |
OSïŒmacOSã»Ubuntuã»WSL2ïŒãCPUïŒarm64ã»amd64ïŒãã¡ã¢ãªã空ã容éãDocker 27 以äžãCompose ãã©ã°ã€ã³ïŒv2 以äžïŒãbuildx ãå€å®ããé·ããã«ãã®åã«åé¡ãåãããã install ã«èŠããã®ã確ããããgitããããã¡ã€ã«ã®éå
¬éçµ±åãªããžããªã®èªã¿åãæš©éïŒç«¯æ«ã§åãåãããªã git ls-remote ã§ç¢ºãããURL ã«ããŒã¯ã³ãå«ãŸãåŸãã®ã§åºåã¯è¡šç€ºããªãïŒãtrivyã»gitleaksã»semgrepãDocker VM ãšãã¹ãã®å°ããæ¹ã«å¯Ÿãããããã¡ã€ã«ã®ã¡ã¢ãªäžéïŒ--memory-gib ã§èŠåã«å€ãããæ¿ç¥ã®äžã®éå°å²åœïŒãamd64 ãšãã¥ã¬ãŒã·ã§ã³ïŒbinfmt 㯠Linux arm64 ã«éããå ±åã« amd64_emulation ã®è¡ãåºããamd64 ã§ã¯ not needed (host is amd64)ãåã handler ã®ãã Linux arm64 ã§ã¯ ready (...)ãmacOS ã§ã¯åºããªãïŒïŒæå¹ã«ããã³ãã³ãã衚瀺ããèœã¡ããšå®æž¬ãããšãã¥ã¬ãŒã¿ãŒïŒUbuntu 24.04 ã® qemu-user-static 8.2.2ãç»é²æžã¿ã€ã³ã¿ãŒããªã¿ãŒã® --version ã§å€å®ïŒã¯æãã§çœ®ãæããã³ãã³ãã衚瀺ïŒãDocker ã䜿ããé
眮å
ïŒWSL2 ã§ã¯è©Šéšãã¡ã€ã«ã® chmod 0600 ãèªã¿è¿ããŠç¢ºãããã¢ãŒããä¿æãããã¡ã€ã«ã·ã¹ãã ã§ããããšãWindows ã®ãã©ã€ã㯠runtime/.env ã 0600 ã«ä¿ãŠãªããmacOS ã§ã¯ãšã³ãžã³ããèŠããããšãup ã䜿ã postgres ã€ã¡ãŒãžã«ãªããžããªãèªã¿åãå°çšã§ bind ããŠåãåãããããã®ãµãã³ãã³ããååŸããŠããã€ã¡ãŒãžã¯ããã ãããšã³ãžã³ã mount ãæããäžèº«ã空ãªãçµäº 13ãåãåããèªäœãã§ããªããã°èŠåãDocker VM ãå
±æããŠããªãå Žæããã® bind mount ã¯é»ã£ãŠç©ºã«ãªããããåãåãããã§ããªããšã㯠GRDM_DOCKER_SHARED=1 ã§çããïŒãTOON ã§å ±åããã察象å€ã®ãã¹ããã¡ã¢ãªäžéãåãŸããªããšãã¯çµäº 10ãDocker ãç¡ãã»åããŠããªããšã㯠11ãåæãäžè¶³ãªã 13ãã¹ãã£ããŒãç¡ããã° 51ã |
èªãã ã |
plan |
manifest ãšãããã¡ã€ã«ã解決ããã©ã®ã€ã¡ãŒãžãäœãã©ã®ãµãŒãã¹ãèµ·ããããå ¬éããŒãïŒÂ§4ïŒãšãšãã«è¡šç€ºãããäœãå€ããªããmanifest ã SPEC-01 ã®æ€æ»ã«èœã¡ãã°çµäº 20ã | è§Šããªã |
secrets init / secrets rotate |
init ã¯ä¹±æ°ã®ç§å¯ïŒDB ãã¹ã¯ãŒããDjango ã®ç§å¯éµãCAS ã®éµïŒã runtime/.env ã«ã¢ãŒã 0600 ã§æžããæ¢å®å€ãäŸã®ãã¹ã¯ãŒãã¯æ±ºããŠæžããªããæ¢åãã¡ã€ã«ã¯ --force ããªããã°äžæžãããªããinit --missing ã¯ãæ°ããããŒïŒELASTIC8_PASSWORDãELASTIC8_OSF_PASSWORDãADR-14ïŒããåã«äœããã runtime/.env ã®ããã®æŽæ°ã§ãæ¢åã®å€ããã¹ãŠä¿ã¡ïŒå®ããŒã¿ãäŸåãããã¹ã¯ãŒãã¯æå¹ãªãŸãŸïŒãè¶³ããªãããŒã ããè¶³ãã廿¢ããããŒãæ¶ãã皌åäžã®ãã¹ã¯ãŒãã¯å€ããã皌åäžã®ã¹ã¿ãã¯ãèŠããªãã--force ãšã¯äœµçšã§ããªããrotate ã¯æŽæ°ã®æé ã§ã¯ãªãããã¹ãŠã®ç§å¯ãäœãçŽãã皌åäžã® PostgreSQL ãš RabbitMQ ã®ãã¹ã¯ãŒãã倿Žããæ°ããç°å¢ãåãåãããã³ã³ãããåäœæããæ§ãè³æ Œæ
å ±ãæåŠãããããšã確ããããã©ããã§å€±æããã以åã® runtime/.env ã«æ»ã㊠40 ã§çµãããinit --force ãš rotate ã¯å»æ¢ããè³æ Œæ
å ±ã®ããŒãæ¶ããæŽæ°åŸã¯ãrotate ãåäœæã®åã« compose render ãå®è¡ããã以åã«çæãã Compose ãã¡ã€ã«ã¯å»æ¢ããããŒãåç
§ãç¶ããããã§ãããåã€ã®ããŒã«ã¯ CAS ã®ã€ã¡ãŒãžãèŠããé·ãããããTGC_ENCRYPTION_KEY 㯠43 æåãTGC_SIGNING_KEY 㯠86 æåãOSF_API_INSTITUTIONS_AUTH_JWESECRET ã¯ã¡ããã© 32 ãã€ããOSF_API_INSTITUTIONS_AUTH_JWTSECRET 㯠32 ãã€ã以äžã§ãåŸã®äºã€ã¯ osf.io ã® JWE_SECRET ãš JWT_SECRET ã§ãããïŒADR-07 §7ïŒãåã€ãšã base64url ã®æåïŒAâZãaâzã0â9ã-ã_ã空çœã»åŒçšç¬Šã»ããã£ã³ã°ã¯äžå¯ïŒã ãã䜿ããå
¬éãããæ¢å®å€ã§ãã£ãŠã¯ãªãããTGC_ENCRYPTION_KEY 㯠32 ãã€ããžæ£æºã«åŸ©å·ã§ããªããã°ãªããªããã¬ããããŒã ã«ç§å¯ãåãããåŸã«äœ¿ãïŒSPEC-03 §6ïŒã |
è§Šããªã / è§Šãã |
compose render |
runtime/.env ã«çæãã¹ãããŒãç¡ããšãããŸã㯠CAS ã®ããŒã䜿ããªããšãïŒé·ãã®èª€ããbase64url 以å€ã®æåãå
¬éãããæ¢å®å€ïŒã¯ãããŒã®ååã ãã瀺ããŠçµäº 2 ã§æ¢ãŸãïŒããŒãç¡ããšã㯠secrets init --missingãCAS ã®ããŒã䜿ããªããšã㯠secrets rotate ã§çŽãïŒãmanifest ãšãããã¡ã€ã«ãã runtime/docker-compose.yml ãæžããå
éšãããã¯ãŒã¯ grdm ãšå
¬éå°çšã® grdm-edgeïŒ--egress <services> ã§è¿œå æ¥ç¶ã runtime/.env ã«èšé²ãSPEC-03 §3.2ïŒãéšåããšã® platform: 㯠manifest ã® build_platform ãããããŒã㯠127.0.0.1 ã«ã ãå
¬éïŒÂ§4ïŒãå
šãµãŒãã¹ã«é root ã® user:ãread_onlyã»cap_dropã»è³æºå¶éïŒmem_limitã»cpusã»pids_limitãdoctor ãæ€åºãããã¹ãã®ã¡ã¢ãªãš Docker ãšã³ãžã³ã® VM ã¡ã¢ãªïŒdocker infoãDocker Desktop ã§ã¯ VM ã¯ãã¹ãã®äžéšã宿©ç¬¬ 10 åïŒã®å°ããæ¹ã«å¿ããŠæ±ºãããã³ãã¬ãŒãã®äžé mem_min_mb ãå
ã«åãåã確ä¿ããæ®ããä»ãåãåããCPU ã¯ãšã³ãžã³ãå ±åããæ°ïŒdocker infoãäžæãªãšãã ããã¹ãã®æ°ïŒããæ±ºããïŒããµãŒãã¹ããšã®äŸå€ã¯ manifest/hardening.json ããïŒSPEC-03 §3.3ïŒãplatform: 㯠doctor ã®çµæããéžã¶ãååä»ãããªã¥ãŒã 㯠runtime/volumes/ ã®äžãtmpfs ã®åé
ç®ã¯ mode=1777 ã§ mountïŒCompose ã®çãèšæ³ã¯ root å°çšã® 0755 ã«ãªãã宿©ç¬¬ 11 åïŒããã³ãã¬ãŒãå€ã®ãã¬ãŒã¹ãã«ã {{HOST_PORT:<service>}}ã»{{CONTAINER_PORT:<service>}}ã»{{AUTH_URL}}ïŒfakecas ã®å
¬é URLã--auth shibboleth ã§ fakecas ãå€ãããšã㯠web ã® URLïŒã解決ãããçµã¿ç«ãŠãéšåã® image: ã«æåŸã®ãã«ãïŒruntime/reports/build_latest.jsonïŒã®ã¿ã°ã䜿ãã®ã¯ãmanifest ãåºå®ããã¿ã°ãšåããšãã ãã§ãããèšé²ããããã«ããåºå®ãšéããšãã¯å€ãïŒæåŸã® build ã®åŸã§åºå®ãåããïŒãšã¿ãªãã代ããã«åºå®ã®ã¿ã°ãæžããå ±åã® stale_build_tagsïŒcomponentã»pinnedã»recordedã»imageïŒã«èŒããæšæºãšã©ãŒã«èŠåã®å²ã¿ãåºããŠå¯ŸåŠïŒgrdm-dev build ãå®è¡ããŠãã grdm-dev upïŒã瀺ããinstall ã¯çµãåã« render ããã®ã§ãçµäºã³ãŒã㯠0 ã®ãŸãŸã§ãããäžåºŠãçµãã§ããªãã€ã¡ãŒãžã¯å€ããã®ãåãã代ããã« up ã倱æããããmanifest ãåºå®ããªãéšåã¯èšé²ãããã¿ã°ã䜿ããosf.env ã«ã¯ osf.io ãã Elasticsearch 8 ãžã®æ¥ç¶ïŒELASTIC_URI=https://elasticsearch8:9200ãELASTIC_CA_CERTS=/es-ca/ca.crtãå©çšè
grdm_osf ãšãã®ãã¹ã¯ãŒãã¯ãµãŒãã¹ã®ç°å¢ããæ¥ãïŒãy-websocket ãžã®å
éš URLïŒY_WEBSOCKET_INTERNAL_URLïŒãENABLE_PUBLIC_ACCESS ãæžããwebã»apiã»adminã»workerã»osf_init 㯠elasticsearch8_caïŒå
¬éã®èšŒææžã ãïŒãèªã¿åãå°çšã§ããŠã³ãããã`--public-access true |
falseïŒæ¢å®ã¯ runtime/.envã®GRDM_ENABLE_PUBLIC_ACCESSããªããã° falseïŒã¯ osf.io ã®ãã¹ãŠã®ããã»ã¹ã® ENABLE_PUBLIC_ACCESS ãæ±ºããïŒRDM-osf.io-dev2027 PR #8ïŒãfalse ã¯ãã¹ãŠã®ããŒã¿çµè·¯ã§èªèšŒãèŠæ±ãïŒå¿åã®èŠæ±ã¯ãã°ã€ã³ãžã®è»¢éã 401ã眲åã€ãã® WaterButlerã»MFR ã®åŒã³æ»ãã Webhook ãªã©ã¯åãç¶ããïŒãtrueã¯å
¬éãããžã§ã¯ãã®å¿åé²èЧãèš±ããéžæã¯runtime/.env ã«èšé²ãã--egress` ãšåããæ¬¡å以éã® render ã§ãä¿ã€ãADR-02 ã«åŸãã |
build |
docker buildx ã§ã€ã¡ãŒãžãäœãããã©ãããã©ãŒã ã¯åªå
é ã« --platformãmanifest ã®éšåã® build_platformïŒäŸ: EOL ããŒã¹ã§ arm64 ã«çµããªãéšå㯠linux/amd64 ã«ããŠãšãã¥ã¬ãŒã·ã§ã³ã§åããïŒãããããªããã°ãã¹ããšåããã€ã¡ãŒãžã¯ããŒã«ã«ã«èªã¿èŸŒããprebuilt_imageïŒSPEC-01ïŒãæã€éšåã¯çµãŸãããã€ãžã§ã¹ãåºå®ã®ã€ã¡ãŒãžãèŠæ±ããã platform ããšã«ååŸã㊠prebuilt ãšå ±åããïŒpull-failed ã¯çµäº 30ïŒã--push ã§ã prebuilt ã®ã€ã¡ãŒãžã¯ ghcr.io/rcosdp ã«åå
¬éããªãïŒç¬¬äžè
ã®ææç©ã§ããããïŒãè¡ã¯ prebuilt-not-pushedãpushed: false ãšå ±åããã--push ã§ multi-arch ã® manifest ã ghcr.io/rcosdp/<name>ïŒéå
¬éïŒãžéãã倱æã¯çµäº 30ã |
è§Šãã |
up / down / reset |
up ã¯äžæããã db ã®æäœããŸãå®äºãå·»ãæ»ãããruntime/volumes/postgres_data ãçææžã¿ã®ã€ã¡ãŒãžãšå¥ã® PostgreSQL ã®çã§æžãããŠãããçãèªããªããã°çµäº 15 ã§æ¢ãŸãïŒADR-12ïŒãããã§ãªããã°ãããã¡ã€ã«ãèµ·åãå¥åº·ã«ãªããŸã§åŸ
ã€ãããŒã¿ããŒã¹ã®ç¢ºèªã®åã«ãrender ãããã¡ã€ã«ã®ããªã¥ãŒã grdm-dev_<åå> ã Docker ã«æ¢ã«ããããã®ãã§ãã¯ã¢ãŠãã® runtime/volumes/<åå> ãšå¥ã®ãã£ã¬ã¯ããªã«çµã³ä»ããŠããã°ãup ã¯çµäº 13 ã§æ¢ãŸãïŒåããããžã§ã¯ãã®æ°ãã clone ãç§»ãããã£ã¬ã¯ããªãDocker ã¯ããªã¥ãŒã ãäœã£ãæ¥ã®ãªãã·ã§ã³ãèŠããCompose ã¯æ¯ã¹ãã«åå©çšããã®ã§ããã®ãã§ãã¯ã¢ãŠãã¯å¥ã®ãã§ãã¯ã¢ãŠãã®ããŒã¿ãèªåã®æ°ããç§å¯ã§éããŠããŸãïŒãäœãèµ·åãåé€ããããã¡ãã»ãŒãžã¯ãã®ããªã¥ãŒã ãšãè§£æŸããã³ãã³ãïŒããäžæ¹ã®ãã§ãã¯ã¢ãŠãã§ grdm-dev downãç¶ã㊠docker volume rm <åå>ããã¡ã€ã«ã¯ãã£ã¹ã¯ã«æ®ãïŒã瀺ããdown ã¯ã³ã³ãããæ¢ãããªã¥ãŒã ãæ®ããreset ã¯æ¢ããããã§ç¢ºèªã®åŸã« runtime/volumes/ ãæ¶ãïŒ--yes ã§ç¢ºèªãçãïŒãLinux ã§ã¯ãã¡ã€ã«ãã³ã³ããã® uid ã®ææã§ãã¹ãã®å©çšè
ã«ã¯æ¶ããªãã®ã§ãDAC_OVERRIDE ãš FOWNER ã ããæã€ root ã®ã³ã³ããã§äžèº«ã空ã«ãããäœããæ¢ãããæ¶ãããããåã«ãã¹ãåŽã§ãã¹ãæ€èšŒããã·ã³ããªãã¯ãªã³ã¯ã® runtime/ ãããªã¥ãŒã ã®ã«ãŒãããªããžããªã®å€ãžè§£æ±ºãããã«ãŒããã·ã³ããªãã¯ãªã³ã¯ã®ããªã¥ãŒã ãruntime/ ãããªã¥ãŒã ã®ã«ãŒãããã®äžã®ä»»æã®æ·±ãã® mountïŒãã¹ãã® mount 衚ããèªãã®ã§åããã¡ã€ã«ã·ã¹ãã ã® bind mount ãå«ãã衚ãèªããªããšããæãïŒã¯çµäº 14 ã§æ¢ãŸããreset 㯠down ã®åŸãšæ¶å»ã®åŸã«ãç¹°ãè¿ããããªã¥ãŒã ã®ã«ãŒããå¥ã®ãã£ã¬ã¯ããªã«å€ãã£ãŠããã°æ¢ãŸããcompose render ãš up ããææè
èšå®ã®æ®µãåããã¹ã« root ã§åãã®ã§ãåãæ€èšŒãçµäº 13 ã§è¡ãããããã¯æç¹ã®ç¢ºèªã§ãããDocker ã¯åŸã§ bind ã解決ããã®ã§ãã®ééã¯ã©ã®æ€æ»ã§ãå¡ããªãããªããžããªãä»ã®å©çšè
ãããã»ã¹ãåæã«å€æŽããªãããšãåæãšããã |
è§Šãã |
db status / db upgrade / db rollback / db recover |
status 㯠runtime/volumes/postgres_data ãšçææžã¿ã® postgres ã€ã¡ãŒãžã® PostgreSQL ã®çã衚瀺ããäœãå€ããªããupgradeïŒå
šãµãŒãã¹åæ¢äžã--yes ã§çãã確èªã®åŸïŒã¯ãã³ããšåŸ©å
ã§ããŒã¿ãçææžã¿ã®çãžç§»ããæ§çããããã¯ãŒã¯ãªãã§æ§ãã£ã¬ã¯ããªã®äžã«åãããæ°çã® pg_dumpall ã runtime/backups/postgres-<æ§>-to-<æ°>-<æå»>/ ã«æžããæ°ãããã£ã¬ã¯ããªãåæåã㊠ON_ERROR_STOP ã§åŸ©å
ããå
šè¡šã®è¡æ°ãšã·ãŒã±ã³ã¹ã®å€ãçªãåããããã®åŸã§åããŠæ§ãã£ã¬ã¯ããªãæ°ãããã®ã®é£ã® postgres_data.pg<æ§>-<æå»> ã«æ¹åãããrollback ã¯ãã®ãã£ã¬ã¯ããªãæ»ããã©ã¡ããäœããäœããæ¹åããåã«æä»ããã¯ïŒup ãš reset ã確èªãšèµ·åã»åé€ã®éã«åãïŒãåããæ°žç¶çãªæäœèšé²ïŒruntime/db-operation.jsonïŒãæžããrecoverããããŠåŸç¶ã®ãã¹ãŠã® db ã³ãã³ãã»resetã»up ã¯ãã¯ã©ãã·ã¥ãäžæãæ®ããæäœãæåã«å®äºãå·»ãæ»ããããæ§ãµãŒããŒã®èµ·ååã«ç©ºã容éã®èŠç©ãã確ãããã倱æããã°æ§ãæ°ã®ã¯ã©ã¹ã¿ã䜿ããç¶æ
ã§çµäº 15ãè£åã®æ¹åãŸã§å€±æãããšãã¯æäœèšé²ãæ®ããŠçµäº 15ãADR-12 ãåç
§ã |
è§Šãã |
health |
åãµãŒãã¹ã®å¥åº·ç¢ºèªçšã® URL ã調ã¹ããå
¬éããã«ãŒãããã¯ã®ããŒããžã® HTTP GETïŒå€ã㯠/ãweb 㯠/login/ãosf.io ã® / 㯠ember ãžè»¢éãã以åã®äºåãã«ãæžã¿ã® ember ããã«ãäžã¯ 500 ãè¿ããã宿©ç¬¬ 14 åãember_osf_web 㯠/healthz ã§ãHTTP 200 ã ããå¥åº·ãšæ°ããïŒã§ãäžåéãã®ãµãŒãã¹ã¯ 0 ã§çµäºããŠããã°å¥åº·ãšæ°ããã--network ãä»ãããšããã¹ãã§åŸ
ã¡åããŠãããœã±ãããäžèЧããã³ã³ããã®ããŒããã«ãŒãããã¯ä»¥å€ã®çªå°ã«çµã³ä»ããŠãããããããžã§ã¯ãã®ããŒãäžã®ã¯ã€ã«ãã«ãŒãã®åŸ
ã¡åãã®ææè
ãèŠããªããã°çµäº 40ïŒå®å
šåŽã«å€±æïŒãDocker ã§ãªãååã®åãããã¹ãã®ããã°ã©ã ããããžã§ã¯ãã®ããŒãã«ããå ŽåïŒmacOS ã® AirPlay ã¬ã·ãŒããŒã® *:5000ã宿©ç¬¬ 16 åïŒã¯ foreign-listener ã®èŠåãšããŠå ±åãã倱æã«ã¯ããªããæã
ã®æŒãã§ã¯ãªããruntime/.env ã® GRDM_PORT_<SERVICE> ã§æã
ã®ããŒããç§»ããã |
èªãã ã |
scan |
SPEC-03 ã®ã»ãã¥ãªãã£éãå
šéšåãããåºæ¬å¯ŸçãTrivy ã® SBOMïŒãœãããŠã§ã¢éšå衚ãã€ã¡ãŒãžã«å
¥ã£ãŠããéšåã®äžèЧïŒãš CVE ã®äžèЧãgitleaksãSemgrepãOWASP ZAPãruntime/reports/scan_<æ¥ä»>.json ãš TOON ãæžããmanifest/milestone.json ã®ç¯ç®ã«åãã㊠manifest/allowlist.json ãš manifest/allowlist.baseline.json ãšå·®åãåããé㯠ADR-03 ã©ãããM1ãM3 ã¯å ±åã®ã¿ãM4 㯠HIGH ã§çµäº 50ãM5 㯠CRITICAL ã HIGH ã§çµäº 50ããã©ã° --baselineã»--secretsã»--dynamic ã¯äžéšã ããåãããã¹ãã£ããŒãåããªããã°çµäº 51ããµãŒãã¹ãå¥å
šã§ãªãã®ã« --dynamic ãæ±ãããçµäº 52ã |
èªãã ã |
redteam preflight |
AI ã¬ããããŒã ã®å®è¡åã«ãã¬ããããŒã çš Compose ãããžã§ã¯ãã®æ»æåŽã³ã³ãããéé¢ãããŠããããšïŒå±ãã¯ãã®ã«ããªã¢ã§èšŒæãããSPEC-03 §6ïŒãmanifest/redteam-targets.json ã«ååã®ããã³ã³ããã ããæ¥ç¶ããŠããããšãæ¿èªèšé²ãããæ°ããããšã確ããããã©ã¡ãããå€ããã°çµäº 53ã詳现㯠SPEC-03 §6ã |
è§ŠããïŒæ€æ»çšã®ã«ããªã¢ã®ã³ã³ãããšãããã¯ãŒã¯ãäœã£ãŠæ¶ãïŒ |
accept |
Playwright Python ã®åå
¥è©Šéšãåã .venv/ ã§å®è¡ããã--only <ã·ããªãª> ã§äžã€ã ãã--seed ã§äœ¿ãæšãŠã®è©Šéšå©çšè
ãäœããäžä»¶ã§ã倱æããã°çµäº 60ã詳现㯠SPEC-04ã |
èªãã ã |
upstream mirror / upstream integrate |
SPEC-05 ã®æ¥æ¬¡ãã©ãŒãšé±æ¬¡çµ±åãæã§åãããéå
¬éã® -dev2027 ãžã® Git èªèšŒæ
å ±ãèŠãããã®ãªããžããªã® CI ã§ã¯æ±ºããŠåãããªããfetch ãæãŸããã»å€±æãããpush ã倱æãããããŒãžãè¡çªãããšãã¯çµäº 70ãå ±åã¯ã©ã®å Žåãæžãã |
è§ŠããªãïŒGit ã®ã¿ïŒ |
manifest check / manifest toon |
check 㯠manifest/upstreams.json ãæ€èšŒãïŒSPEC-01 §5ïŒãdocs/ å
ã® TOON ã®æé²ãš manifest/upstreams.toon ããããšäžèŽããã確ããããäžäžèŽã¯çµäº 20ãtoon 㯠upstreams.toon ãäžèŽãã¹ãæé²ãåºåããã |
è§Šããªã |
docs build / docs check |
build 㯠MkDocs ã§ site/ ãäœããcheck 㯠SPEC-06 §8 ã®ã¢ã³ã«ãŒãJump è¡ãçžå¯Ÿãªã³ã¯ãTOON ã®äžèŽãVersion è¡ãæ€æ»ããã |
è§Šããªã |
report |
doctorã»planã»healthã»scanã»accept ã®ææ°ã®å ±åã runtime/reports/<æå»>.toon ãš .json ã«ãŸãšããã |
è§Šããªã |
install |
æµãå³ã®é ã«å®è¡ãããæåã« 0 以å€ã§çµãã£ãæ®µã§æ¢ãŸããcompose render ã®çŽåŸã« up ã®èªã¿åãã ãã®ããªã¥ãŒã ã®æ€æ»ãè¡ãïŒãããžã§ã¯ãã® Docker ããªã¥ãŒã ãå¥ã®ãã§ãã¯ã¢ãŠããäœã£ãŠããã°çµäº 13ïŒããã®å Žå㯠build ã®åŸã§ãªãåã«æ¢ãŸãã |
è§Šãã |
profiles[3]{name,services,note}:
minimum,"osf_init volume_owner_init volume_access_check_1000 web api postgres elasticsearch8 elasticsearch8_setup rabbitmq fakecas",ãã°ã€ã³ãšãããžã§ã¯ãç»é¢ãèŠããæå°ã®çµ
core,"minimum + admin worker wb wb_worker mfr unoconv ember_osf_web cas wiki_assets elasticsearch6 redis y_websocket volume_access_check_999",ã³ã¢ 6 ãªããžããªãšåºç€ãWiki å
±åç·šéã® y_websocket ãå«ããwiki_assets ã¯ããªã¥ãŒã wiki_static ã« Wiki ãšãã£ã¿ã®æãåãäžåéãã®ãµãŒãã¹ïŒADR-06ïŒ
full,"core + rdmcp aipf_mcp_data_grdm oasys shibboleth_sp test_idp",å
šéšãshibboleth_sp 㯠fakecas ãšå
¥ãæ¿ãã
ãµãŒãã¹å㯠RDM-osf.io äžæµã® docker-compose.yml ã«åãããæ¢åã®æåŒãããã®ãŸãŸäœ¿ããããã«ããŸãããã㯠manifest ã® services[] ã®å€ã§ããããŸãïŒSPEC-01 §3ïŒãwiki-frontend éšå㯠osf.io ã®ãªãŒããŒã¬ã€ïŒoverlay_ofãADR-06ïŒã§ãããã®ãµãŒãã¹ã¯ãäžåéããïŒäžåºŠåããŠçµäºããã³ã³ãããrestart: "no"ïŒã§ãæãçµãã€ã¡ãŒãž grdm-dev/wiki-frontend:<osf ã® sha12>-<wiki ã® sha12> ãåãããŸããvolume_owner_init ãæ°ããããªã¥ãŒã wiki_static ã uid 1000 ã«æž¡ããåŸã§ãwiki_assets ã webpack ã®åºå /code/website/static/public/js/ ããããžåããŠçµäºããŸããwebã»apiã»adminã»worker ã¯ãã®ããªã¥ãŒã ã /code/website/static/public/js/wiki/ ã«èªã¿åãå°çšã§ mount ããcondition: service_completed_successfully ã§åŸ
ã€ã®ã§ãup ã¯æã眮ãããŠããããããèµ·åããŸããhealth ã¯çµäºã³ãŒã 0 ã§çµãã£ãäžåéãã®ãµãŒãã¹ãå¥åº·ãšæ°ããŸããCompose ãããã¡ã€ã« shibboleth ãšãµãŒãã¹ fakecas ã¯æä»ã§ããcompose render --profile full --auth shibboleth 㯠fakecas ãå€ã㊠shibboleth_sp ãš test_idp ãè¶³ããŸããfull ã®æ¢å®ã¯ fakecas ã§ããy_websocket 㯠full ã§ãªã core ã«å±ããŸããWiki å
±åç·šéã M2 ã®åå
¥ã·ããªãªïŒSPEC-04 §4 ã® C4ïŒã ããã§ããmanifest ã® y-websocket éšåã® profile ãããã«åãã㊠core ã§ãïŒSPEC-01 §3ïŒã
elasticsearch8 㯠build ã installer/images/elasticsearch8 ããçµãã€ã¡ãŒãž grdm-dev/elasticsearch8:<tag>ïŒmanifest ã® image_buildããã€ãžã§ã¹ãã§åºå®ããå
¬åŒã® Elasticsearch 8.19.24 ã«æ¥æ¬èªè§£æã®äºã€ã®ãã©ã°ã€ã³ãè¶³ãããã®ïŒã uid 1000ã»èªã¿åãå°çšã«ãŒãã§ãTLS ãšèªèšŒãããã¹ã¯ãªãããªãã§åãããããŒãã¯å
¬éããŸããïŒãã«ã¹ãã§ãã¯ã¯ 30 ç§ã«å ã㊠100 åïŒéé 10 ç§ã1 åã¯æé· 5 ç§ïŒã17ã26 åãŸã§åŸ
ã¡ãŸããæ©æ¢°å
šäœã amd64 ã§ãšãã¥ã¬ãŒã·ã§ã³ããç°å¢ã§èµ·åã« 8 å 10 ç§ãããã以åã® 12 åã§ã¯å¥å
šãªèµ·åãäžå¥å
šãšå€å®ã㊠up ãçµäº 40 ã§æ¢ãŸã£ãããã§ãïŒDEMO-22 0.7ïŒãèµ·åã§ããŠããã°ããéããçªã¯ up ã®æ¢å®ã®åŸ
ã¡ 1800 ç§ã®å
ã«åãŸããŸãïŒãelasticsearch8_setup ã¯äžåããã®æé ã§ãosf.io ãæ€çŽ¢ã«äœ¿ããwebsite* ã®çŽ¢åŒã«éã£ã role ãšå©çšè
grdm_osf ãäœããŸãïŒADR-14ïŒã以åã® elasticsearchïŒElasticsearch 2ãADR-07ïŒã¯ mongoã»sharejs ãšãšãã«é圹ããŸããïŒADR-13 §6ïŒãy_websocket ã¯ãã¡ã€ã«ããŒãžã®éšå±ã®äžæžããããªã¥ãŒã y_websocket_data ã«æ®ããŸãïŒYPERSISTENCEãæ¥é èŸ file-ïŒãäžåéãã® volume_owner_initïŒGNU ã®éå
·ãæã€ postgres ã€ã¡ãŒãžãæç€ºã® root ã§ãCAP_CHOWN ã®ã¿ãmanifest/hardening.json ã®äŸå€ã¯äžä»¶ïŒã¯ãæžã蟌ã¿ã§äœ¿ããã¹ãŠã® bind ããªã¥ãŒã ãããããæžã蟌ã¿ã§ mount ãããµãŒãã¹ã® user: ã«æž¡ããŸããæ°ãããã£ã¬ã¯ããªã¯ãã¹ãã®å©çšè
ã®ãPR #33 ã®æšã¯ uid 101 ã®ææã§ãuid ã®éã Linux ã WSL2 ã®ãã¹ãã§ã¯é root ã®æžãæïŒredis 㯠uid 999ãä»ã¯ 1000ïŒã䜿ããªãããã§ããroot ã®ãŸãŸã®ãµãŒãã¹ã¯ææè
ãæ±ºããŸãããpostgresã»rabbitmq ã¯èªåã§æŽããunoconv 㯠uid 1000 ã®æžãæãš wb_tmp ãå
±æã DAC_OVERRIDE ãæã¡ãŸãïŒéå®ããäŸå€ããããç¡ã root ã¯ãã¡ã€ã«æš©éã«åŸããLibreOffice ãããã«æžããŸããïŒãæžãæã¯ãã¹ãŠ condition: service_completed_successfully ã§åŸ
ã¡ãŸããç§»è¡ãšå詊è¡ã®çŽæã GNU ã® find ãš chown ãåæã«ããŸããã©ã® up ã§ããå°ãè¿éã䜿ããåããªã¥ãŒã ãå
šéšèŸ¿ãã®ã§ãéäžã§æ¢ãŸã£ãå®è¡ã¯æ¬¡ã®å®è¡ãå®äºãããäžçªäžã®ãã£ã¬ã¯ããªãæ£ãããŠãäžã®èª€ãã¯é ããŸãããCAP_CHOWN ã ããªã®ã§ãä»ã® uid ã®ç§çšãã£ã¬ã¯ããªã«ã¯å
ã«ææè
ã«ãªã£ãŠããå
¥ãããã¡ã€ã«ãç®çã® uid ã«æž¡ããŠæŒããç¡ãããšã確ããããã£ã¬ã¯ããªãæåŸã«æž¡ããŸããã·ã³ããªãã¯ãªã³ã¯ã¯èŸ¿ãããããªã¥ãŒã ã®å€ãžãåºãŸãããã¢ãŒã 000 ã®ãã£ã¬ã¯ããªãªã©ã®å€±æã§ã¯ãã¹ã瀺ããŠæ¢ãŸããæžãæã¯èµ·åããŸãããup ãããçŽãã reset ããŠãã ããã广ã®ç¡ã chown ã¯æ®µãæ¢ããŸãïŒçµæã¯ãã£ã¬ã¯ããªãå«ããŠèªã¿è¿ããŸãïŒãäŸå€ã¯ãã¹ãŠã®ãã¹ã root:root ãšèŠãã VM å
±æã ãã§ãïŒvirtiofs 㯠Colima ã§å®æž¬ãfakeownerã»fuse.grpcfuseã»fuse.sshfsã»9pïŒãããã§ãä»ã§ããäžåéãã® volume_access_check_1000 ãš volume_access_check_999 ãæžãæèªèº«ã® uid ã§åããäžæã®ååã®ãã¡ã€ã«ãæä»çã«äœã£ãŠïŒmktempãã·ã³ããªãã¯ãªã³ã¯ã蟿ããæ¢åã®ããŒã¿ã«è§ŠããªãïŒãã®ãã¡ã€ã«ã ããæ¶ããç¶ããŠæ¢åã®æšã蟿ã£ãŠããã® uid ãå
¥ããªãã»äžèЧã§ããªãã»æžããªããã£ã¬ã¯ããªãšèªããªããã¡ã€ã«ããäœãå€ããã«æã¿ãŸãããããæåããªããã°æžãæã¯èµ·åããŸãããosf_initïŒéšå osf.ioããããã¡ã€ã« minimumïŒãããäžã€ã®äžåéãã®ãµãŒãã¹ã§ããosf.io ã®ã€ã¡ãŒãžã§ uid 1000 ãšããŠãäžæµ README ãæ°ããããŒã¿ããŒã¹åãã«æããæé manage.py migrateã»scripts.populate_institutions -e test -aã»scripts.register_oauth_scopes ãå®è¡ããpostgres ãæ¥ç¶ãåãä»ãããŸã§ migrate ã 10 ç§ããšã«æé· 5 åããçŽããæ©é¢ã®æå
¥ã®åã« invoke search_ensure_indexïŒElasticsearch ã®çŽ¢åŒ website_v1 ãšãã®å¥åãå®å
šãªãããã³ã°ã§äœãïŒãå®è¡ã㊠0 ã§çµäºããŸãã管çç»é¢ã® 2 段éãµã€ã³ã€ã³ã® migrationïŒaddons_twofactor ã® 0006 ãš 0007ïŒããadmin ãããžã§ã¯ããèªåã§ã¯ migration ãå®è¡ããªãã®ã§ãããã§é©çšãããŸããwebã»apiã»adminã»worker 㯠condition: service_completed_successfully ã§ãããåŸ
ã¡ãŸããäžã€ã®æé ã¯ã©ããäœåºŠå®è¡ããŠãåãçµæã«ãªãã®ã§ããµãŒãã¹ã¯ up ã®ãã³ã«åããŸãïŒå®æ©ç¬¬ 12 å: ãããç¡ããšæ°ããããŒã¿ããŒã¹ã§ web ã relation "osf_institution" does not exist ã® 500 ãè¿ãããã®ãšã©ãŒããšã«éçºãµãŒããŒã postgres ã®æ¥ç¶ã 1 æ¬æŒãããïŒãember_osf_web ã¯ãbuild ã RDM-ember-osf-web-dev2027 ããçµãéçãªã€ã¡ãŒãžã§åããŸãããã® Dockerfile 㯠ember-cli ã®æ¬çªãã«ãããã«ããã¹ãèªèº«ã®ãã©ãããã©ãŒã ã§ Node ã®æ®µãšããŠå®è¡ãïŒææã¯ãã©ãããã©ãŒã ã«äŸããªãã®ã§ãamd64 ã arm64 ããšãã¥ã¬ãŒã·ã§ã³ããŸããïŒãçµæã nginx-unprivileged ã§ uid 101ã»ããŒã 4200 ããé
ä¿¡ããŸããã«ãŒãã¯èªã¿åãå°çšã§ãæžã蟌ããã®ã¯ /tmpïŒtmpfsïŒã ããããªã¥ãŒã ã depends_on ããããŸãããã€ã¡ãŒãžãèªãã®ã¯ OSF_URLã»OSF_API_URLã»OSF_RENDER_URLã»OSF_FILE_URLã»OSF_HELP_URLã»CAS_URL = {{AUTH_URL}}ã»OSF_COOKIE_DOMAINã»CSP_MODEïŒenforceïŒãšãä»»æã® CSP_EXTRA_SOURCES ã ãã§ããèµ·åæã«ãšã³ããªãã€ã³ãã URL ã /tmp ã®äžã® index.html ã«æžã蟌ã¿ããã ã® http(s) ã® URL ã§ãªãå€ïŒcookie ã®ãã¡ã€ã³ã¯ãã¹ãåïŒã§ã¯çµäº 1 ã§æ¢ãŸããããŒãžã« Google Analytics ã®ã¢ããã¿ãŒãããã°é
ä¿¡ãæã¿ããããã®ãªãªãžã³ãã Content-Security-Policy ãèšå®ã㊠nginx ãèµ·åããã®ã§ãèµ·åã¯æ°ç§ã§ããember serve ãã©ã€ããªããŒãããããŸãããCompose ã®å¥åº·ç¢ºèªã¯ /healthz ãžã® wget ã§ãïŒã€ã¡ãŒãžã« curl ã¯ãããŸããïŒã
å
¬éããŒãã æ¢å®ã®ãã¹ãåŽããŒããå®ããã®ã¯ãã®è¡šã ãã§ããADR-02ãSPEC-03ãREF-01 ã¯ãããæããŸãããã¹ãŠ 127.0.0.1 ã«ã ãå
¬éããŸãã
ports[8]{service,host_port,profile,url}:
web,5000,minimum,http://127.0.0.1:5000
api,8000,minimum,http://127.0.0.1:8000
admin,8001,core,http://127.0.0.1:8001
wb,7777,core,http://127.0.0.1:7777
mfr,7778,core,http://127.0.0.1:7778
fakecas,8080,minimum,http://127.0.0.1:8080
ember_osf_web,4200,core,http://127.0.0.1:4200
y_websocket,1234,core,http://127.0.0.1:1234
ã»ãã®ãµãŒãã¹ïŒcasãvolume_owner_initãwiki_assetsããµãã·ã¹ãã ãtest_idpãããŒã¿ããŒã¹ãšãã¥ãŒïŒã«ã¯ Compose ãããã¯ãŒã¯ã®äžããã ãå±ããŸãããã©ãŠã¶åãã®ããŒããèŠããšã㯠compose render ãå²ãåœãŠãplan ã衚瀺ããŸããcompose render ã¯éžãã ãã¹ãåŽããŒãããã¹ãŠ runtime/.env ã« GRDM_PORT_<SERVICE>ïŒå€§æåïŒãšããŠæžããåå
¥è©Šéšã¯ãããèªã¿ãŸãïŒSPEC-04 §1ïŒãæ¢å®ã®ããŒãã䜿çšäžãªãïŒmacOS ã® AirPlay ãš 5000 ãæ¢ç¥ã®äŸïŒãcompose render ã¯æ¬¡ã®ç©ºãããŒããåããå°å
¥å ±åæžã«èšé²ããŸããçµäº 12 ã¯ç©ºãããŒããèŠã€ãããªããšãã ãã§ãã
admin ãµãŒãã¹ã¯ Django ã®éçºçšãµãŒããŒã manage.py runserver 0.0.0.0:8001 --insecure ã§ãapi 㯠manage.py runserver 0.0.0.0:8000 ã§ãã©ã¡ããã¹ã¬ããããã§åãããŸãã--nothreadingïŒinvoke apiserver ãš invoke adminserver ãè¶³ãïŒã¯ Django 2.2ïŒRDM-osf.io-dev2027 PR #13ïŒã§æ¢ãŸãããã§ãã2.2 ã®éçºçšãµãŒããŒã¯æ¬¡ã®èŠæ±ã®ããã«æ¥ç¶ãéãããŸãŸã«ããåäžã¹ã¬ããã®ãµãŒããŒã¯ãã©ãŠã¶ã®äœ¿ãããªãäºæ¬ç®ã®æ¥ç¶ã 30 ç§åŸ
ã¡ããã®éã»ãã®ã¯ã©ã€ã¢ã³ãã¯ãã¹ãŠã¿ã€ã ã¢ãŠãããŸããã©ã¡ãã DEBUG_MODE 㯠True ã®ãŸãŸãªã®ã§ãapi/base/wsgi.py 㯠gevent ãã¢ã³ããŒããããããåã¹ã¬ãããèªåã®ããŒã¿ããŒã¹æ¥ç¶ãéããŸããDEBUG = FalseïŒdebug_toolbar ãèªã¿èŸŒãŸããªãããã«çæãã admin_local.py ã®èšå®ïŒã§ã¯ runserver ãéçãã¡ã€ã«ãé
ä¿¡ããªãããã管çç»é¢ã¯ã¹ã¿ã€ã«ã·ãŒãã»ã¹ã¯ãªããã»ã¢ã€ã³ã³ãã©ã³ããªãã§è¡šç€ºãããŸãã--insecure ã¯ãã¢ããªã®éçãã£ã¬ã¯ããªãã runserver ã«ããããé
ä¿¡ãããŸããããã¯éçºå°çšã®äŸå€ã§ããããŒãã¯ãã®è¡šã®ã»ãã®ããŒããšåãã 127.0.0.1 ã«ã ãå
¬éãïŒADR-02ïŒããã®ãµãŒããŒã¯æ¬çªçšã® Web ãµãŒããŒã§ã¯ãããŸãããæ¬çªã®é
åã§ã¯ããã®ãã©ã°ã䜿ãããèªåã® Web ãµãŒããŒã§ç®¡çç»é¢ã®éçãã¡ã€ã«ãé
ä¿¡ããŠãã ããïŒããšãã° collectstatic ã®åŸïŒãå
¬éããŒãããã¹ãŠã«ãŒãããã¯ã¢ãã¬ã¹ã«ããããšã¯åäœè©Šéšã§ç¢ºãããŠããŸãã
| ãã©ã° | æå³ |
|---|---|
--yes |
ãã¹ãŠã®è³ªåã«æ¢å®ã§çããã端æ«ããªããšãã¯å¿ é ã |
--profile minimum|core|full |
æ¢å®ã¯ coreãruntime/.env ã« GRDM_PROFILE ãšããŠä¿åããæ¬¡å以éã䜿ãã |
--platform linux/arm64,linux/amd64 |
build ã® platform ãäžæžããããæ¢å®ã¯ãã¹ãã® platform ã ãã |
--memory-gib <GiB> |
doctorã»compose renderã»install ã§ãæ€åºå€ã®ä»£ããã«ãã®å€§ããã§å¶éãæ±ºããããããã¡ã€ã«ã®äžéãåãŸããªããšãã®æ¿ç¥ã®äžã®éå°å²åœã |
--public-access true|false |
compose render ãš install: osf.io ã®ãã¹ãŠã®ããã»ã¹ã® ENABLE_PUBLIC_ACCESSãæ¢å®ã¯ falseïŒèªèšŒå¿
é ïŒãruntime/.env ã« GRDM_ENABLE_PUBLIC_ACCESS ãšããŠä¿åããã |
--timeout <ç§> |
up ãš installïŒup ã ãã«æž¡ããæéå¶éã®ç¡ã build ã«ã¯å¹ããªãïŒ: health ãåŸ
ã€é·ããæç€ºãã 0 ããã®ãŸãŸæž¡ããæ¢å®ã¯ 1800 ç§ãamd64 ã®ãµãŒãã¹ããã Linux arm64 ã§ã¯ 5400 ç§ãé
ããå
šäœããšãã¥ã¬ãŒã·ã§ã³ããæ©æ¢°ã§ã¯å»¶ã°ãã |
--no-open |
up ã®åŸã«ãã©ãŠã¶ãéããªãã |
--json |
å ±åã TOON ã§ãªã JSON ã§åºãã |
exit_codes[17]{code,meaning}:
0,æå
2,æå®ã®èª€ããäžæãªãã©ã°ãå€ã®åœ¢ã®èª€ã
10,察象å€ã®ãã¹ããOSã»CPUã»ã¡ã¢ãªããŸã㯠Python ãå€ã
11,Docker ãç¡ãã»åããŠããªãããŸã㯠Compose / buildx ãã©ã°ã€ã³ãç¡ã
12,å¿
èŠãªããŒãã 127.0.0.1 ã§äœ¿çšäžã§ã空ãã®ä»£ãããèŠã€ãããªã
13,å°å
¥ã®åæãäžè¶³ãgitããªããžããªã®èªã¿åãæš©éãamd64 ãšãã¥ã¬ãŒã·ã§ã³ããŸã㯠Docker ã䜿ããªãé
眮å
14,reset ã runtime/volumes/ ãåé€ã§ããªã
15,PostgreSQL ã®ããŒã¿ãã£ã¬ã¯ããªã« `grdm-dev db upgrade` ãèŠãããŸãã¯æŽæ°ãå·»ãæ»ãã«å€±æïŒæ§ãã£ã¬ã¯ããªã¯æ®ãïŒ
20,manifest ãäžæ£ããŸã㯠TOON ã®æé²ã JSON ãšäžèŽããªã
30,ã€ã¡ãŒãžã®ãã«ãã«å€±æ
40,å¥åº·ç¢ºèªã«å€±æããŸãã¯ã«ãŒãããã¯ä»¥å€ã®çªå°ã§åŸ
ã¡åããŠãã
50,ä»ã®ç¯ç®ã®ã»ãã¥ãªãã£ã¹ãã£ã³ã®éã§äžåæ Œ
51,ã¹ãã£ããŒãåããªããéå
·ãç¡ãããŸãã¯è匱æ§ããŒã¿ããŒã¹ã®ååŸã«å€±æ
52,ãµãŒãã¹ãå¥å
šã§ãªã scan --dynamic ãå®è¡ã§ããªã
53,ã¬ããããŒã ã®äºå確èªã«å€±æãå€åãéä¿¡ãå¯èœããŸã㯠redteam-targets.json å€ã®å¯Ÿè±¡
60,åå
¥è©Šéšã«å€±æ
70,äžæµã®ãã©ãŒãçµ±åã«å€±æãfetch ãæãŸãããpush ã倱æããããŸãã¯ããŒãžãè¡çªãã
çªå·ãå¥ã®æå³ã«äœ¿ãåããŸãããæ°ããåå ã«ã¯æ°ããçªå·ãæ¯ããŸããæ£æ¬ã¯ installer/grdm_dev/messages.tsv ã§ããã® TOON ãããã¯ã¯ãããšäžèŽããŠããªããã°ãªããŸããïŒmanifest check ã確ãããŸãïŒã50ã53 ã®è©³çŽ°ã¯ SPEC-03 §8ã70 㯠SPEC-05 §2ã§4 ã«ãããŸãã
- 察話ãªãã§åãã
stdinã端æ«ã§ãªã--yesããªããšãããã¹ãŠã®è³ªåã¯ããããããšæ±ãã--yesãä»ããããä¿ããŠçµäº 2 ã§çµããã - äœåºŠã§ãåãçµæã ã©ã®ãµãã³ãã³ããäºåºŠå®è¡ããŠåãçµæã«ãªãã
secrets initã¯æ¢åã®ç§å¯ãæ®ããcompose renderã¯çæãã¡ã€ã«ã ããäžæžãããbuild㯠buildx ã®ãã£ãã·ã¥ã䜿ããupã¯å¥åº·ãªãµãŒãã¹ã«ã¯äœãããªãã - ç§å¯ã Git ã«å
¥ããªãã
runtime/ã¯.gitignoreã«å ¥ãããruntime/ã®äžã®ãã¡ã€ã«ãç§å¯ã«èŠããå€ãã³ãããããããšãdocs checkãš CI ã®ç§å¯ã¹ãã£ã³ãäžåæ Œã«ããã - ãã¹ãã®ãããã¯ãŒã¯ãå€ããªãã æ§æåŒãã®ã«ãŒãããã¯å¥å
192.168.168.167ã¯äœããªããcompose renderãäžæµã®local.pyãš.docker-compose.*.envã®èšå®ããCompose ãããã¯ãŒã¯å ã§ã¯ãµãŒãã¹åããã©ãŠã¶åãã«ã¯127.0.0.1ã䜿ãããæžãæããïŒADR-02ïŒã - ååã®èµ·åã¯é
ããäºåºŠç®ããã¯éãã
up㯠health ãæé· 1800 ç§ïŒ--timeoutïŒåŸ ã€ãååã®upã¯osf_initãå®è¡ãããã®çµæãååä»ãããªã¥ãŒã ã«æ®ãã®ã§ãäºåºŠç®ã®up㯠1ã2 åã§å¥åº·ã«ãªããæ¢å®ã®å€ã¯ãååã®upã Apple Silicon ã§ ember-osf-web ããšãã¥ã¬ãŒã·ã§ã³äžã§çµãã§ããæã«æ±ºããïŒ13ã25 åã宿©ç¬¬ 10ã18 åïŒãããŸã® ember-osf-web ã¯buildãéçãªã€ã¡ãŒãžã«çµã¿ãæ°ç§ã§èµ·åããããã®ãã«ãã®ç¡ãã³ãŒã«ãã¹ã¿ãŒãã宿ž¬ãããŸã§æ¢å®ã¯å€ããªããLinux arm64 ã§ã¯ãšãã¥ã¬ãŒã·ã§ã³ã QEMU ã§ã以åã® ember ã®ååãã«ã㯠1 ã³ã¢ã§ 44 åããã£ãããããããã¡ã€ã«ã« amd64 ã®ãµãŒãã¹ïŒããŸãmfrïŒããããšãã®æ¢å®ã¯ 5400 ç§ãšããïŒDEMO-21ïŒã--timeoutã§äžæžãã§ããinstall --timeoutã¯upã«æž¡ããamd64 ãå šäœãšãã¥ã¬ãŒã·ã§ã³ããæ©æ¢°ã§ã¯ãããèŠããããããã§ã¯ïŒember ãéçãªã€ã¡ãŒãžã«ãªãåã®ïŒember ã®ååãã«ãã 1 æé 46 åãupã 2 æé 19 åããã£ãïŒDEMO-22ïŒã -privateã®ã³ãŒãã眮ããªãã ã€ã³ã¹ããŒã©ãŒã¯å®è¡æã« manifest ã®ååãš SHAïŒã³ãããäžã€ã®æçŽãREF-01ïŒã§çµ±åãªããžããªãååŸããããã®å ¬éãªããžããªã«ã¯ãããã®ã³ãŒãã眮ããªãïŒPOL-01ïŒã
ã¡ã¢ãªã compose render ã¯ãã¹ãã®ã¡ã¢ãªãš Docker ãšã³ãžã³ã® VM ã¡ã¢ãªã®å°ããæ¹ã® 70 % ãäºç®ãšãããµãŒãã¹ããšã®äžéãåãŸããªããããã¡ã€ã«ã¯å¿
èŠéã瀺ããŠæãïŒçµäº 10ïŒã--memory-gib ã¯æ€åºãäžæžãããæ¿ç¥ã®äžã®éå°å²åœã«ãªãïŒPR #33 ã¬ãã¥ãŒ r1 R1-04ïŒãdoctor ã¯åãèšç®ãå
ã«è¡ãããã¹ãã«å¿ãã察åŠã瀺ããmacOS ã§ã¯ Docker Desktop ã® Resources ãŸã㯠colima start --memoryãWSL2 ã§ã¯ .wslconfigïŒWSL 2 ããã¯ãšã³ãã® Resources ã«ã¯ã¡ã¢ãªã®èšå®ããªãïŒãcore ãããã¡ã€ã«ã®äžéïŒäžåéãã®ãµãŒãã¹ãå«ãããµãŒãã¹ã®ãã³ãã¬ãŒãã® mem_min_mbïŒã®åèšã¯ 8512 MiB ãªã®ã§ãcore ã«ã¯æ€åºãããã¡ã¢ãªãå°ãªããšã 8512 / 0.7 / 1024 â 11.9 GiBãã€ãŸã 12 GiB ã® Docker VM ãèŠãïŒfull 㯠fakecas ã§ 9536 MiBãçŽ 13.3 GiBã--auth shibboleth ã§ 9856 MiBãçŽ 13.7 GiBïŒãããã¯äžéããèšç®ããå€ã§ã宿ž¬ã®æå€§å€ã§ã¯ãªããbuild ã¯å«ãŸããember-osf-web ã® Node ã®æ®µã¯åããŠããéãšã³ãžã³ã®ã¡ã¢ãªãæ° GiB 䜿ãã以åã®çŽ 24 GiB ã¯ãèµ·åã®ãã³ã«ãšãã¥ã¬ãŒã·ã§ã³äžã§äžé 8 GiB ã®ããšæãçµã¿çŽãäºåãã«ãæžã¿ã® ember-osf-web ã®ã€ã¡ãŒãžããæ¥ãŠãããéçãªã€ã¡ãŒãžã®äžé㯠128 MiB ã§ãããminimum 㯠8 GiB ã«åãŸãã
| ãã¹ã | CPU | å¯Ÿå¿ |
|---|---|---|
| macOS 14 ä»¥äž ãš Docker Desktop | arm64 | æ£åŒïŒM2 ã®åå ¥ã¯ããã§å®è¡ïŒ |
| Ubuntu 24.04 ãš Docker Engine | amd64ã»arm64 | æ£åŒ |
| Windows 11 ã® WSL2ïŒUbuntu 24.04ïŒãš Docker Desktop | amd64 | åãããšãå¿
é ãšãããCI 㯠install-windows.ps1 ã®è§£æãš dry run ã®ã¿ã§ãå®éã®å®è¡ã«ã¯ææè
ã®å®æ©ãèŠãïŒADR-08 §5ïŒ |
| ãã®ä»ã® LinuxãIntel ã® macOS | ä»»æ | ã§ããç¯å²ã§å¯Ÿå¿ãdoctor ãèŠåããŠç¶è¡ |
layout:
installer/install.sh: bash 3.2 ã®èµ·åã¹ã¯ãªãã
installer/install-ubuntu.sh: Ubuntu 24.04 ãš WSL2 ã®åææ¡ä»¶ïŒÂ§2.3ïŒ
installer/install-macos.sh: macOS ã®åææ¡ä»¶ïŒÂ§2.3ïŒ
installer/install-windows.ps1: Windows 11 ã®åææ¡ä»¶ãš WSL2 ãžã®åãæž¡ãïŒÂ§2.3ïŒ
installer/prereq-lib.sh: bash ã®åææ¡ä»¶ã¹ã¯ãªããäºã€ãå
±æããéšå
installer/pyproject.toml: ããã±ãŒãžæ
å ±ãã³ã³ãœãŒã«ã¹ã¯ãªãã grdm-devã远å accept
installer/grdm_dev/:
cli.py: åŒæ°ã®è§£éããµãã³ãã³ãã®æ¯ãåããçµäºã³ãŒã
host.py: OSã»CPUã»ã¡ã¢ãªã»ãã£ã¹ã¯ã»Docker ã®å€å®
manifest.py: manifest/upstreams.json ã®èªã¿èŸŒã¿ãšæ€èšŒãTOON ãšã®æ¯èŒ
secrets.py: ä¹±æ°ã®ç§å¯ã®çæãã¢ãŒã 0600 ã® runtime/.env
compose.py: manifest ãšãããã¡ã€ã«ãã runtime/docker-compose.yml ãçæ
database.py: PostgreSQL ã®ããŒã¿ãã£ã¬ã¯ããªã®ç¶æ
ããã³ããšåŸ©å
ã«ããæŽæ°ãå·»ãæ»ãïŒADR-12ïŒ
build.py: buildx ã®åŒã³åºããplatform ã®äžèЧãä»»æã® push
health.py: ãµãŒãã¹ã®å¥åº·ç¢ºèªãšã«ãŒãããã¯éå®ã®ç¢ºèª
scan.py: åºæ¬å¯ŸçãTrivy ã® SBOM ãš CVEãgitleaksãSemgrepãZAPã蚱容ãªã¹ããšã®å·®åãæ®µéçãªéïŒSPEC-03ïŒ
redteam.py: ã¬ããããŒã ã®äºå確èªïŒSPEC-03 §6ïŒ
upstream.py: ãã©ãŒãšçµ±åïŒSPEC-05ïŒ
accept.py: åã venv ã§ pytest-playwright ãå®è¡
docs.py: MkDocs ã®ãã«ããš SPEC-06 ã®æ€æ»
report.py: TOON ãš JSON ã®å ±åããŸãšãã
messages.tsv: çµäºã³ãŒããè±èªã®æèšãæ¥æ¬èªã®æèš
installer/tests/: unittestããã¡ã€ã«å㯠test_*.py
installer/acceptance/: Playwright PythonãSPEC-04 ãåç
§
manifest/:
upstreams.json: manifest ã®æ£æ¬ïŒSPEC-01ïŒ
upstreams.toon: grdm-dev manifest toon ãçæããæé²ïŒSPEC-01ïŒ
allowlist.json: 蚱容ããæ€åºïŒSPEC-03 §5.1ïŒ
allowlist.baseline.json: åã®ç¯ç®ã®çµäºæã®èš±å®¹ãªã¹ãä»¶æ°ãææè
ãä¿å®ïŒSPEC-03 §5.1ïŒ
milestone.json: çŸåšã®ç¯ç®ãææè
ãä¿å®ïŒSPEC-03 §5.2ïŒ
hardening.json: èªã¿åãå°çšã«ãŒããš cap_drop ã®ãµãŒãã¹ããšã®äŸå€ãšçç±ïŒSPEC-03 §3.3ïŒ
redteam-targets.json: AI ã¬ããããŒã ãè§ŠããŠããã³ã³ããåïŒSPEC-03 §6ïŒ
runtime/: çæç©ãGit ã¯ç¡èŠïŒ.envãdocker-compose.ymlãvolumes/ãreports/ãbackups/ãdb-operation.json ãš .lockïŒ
python3 -m unittest discover -s installer/tests ã¯ãã¹ãŠã® PRïŒãã«ãªã¯ãšã¹ããã¬ãã¥ãŒåŸ
ã¡ã®å€æŽã®ææ¡ãREF-01ïŒã§åæ ŒããŠããªããã°ãªããŸãããåã¢ãžã¥ãŒã«ã« test_<ã¢ãžã¥ãŒã«>.py ã眮ããæåã±ãŒã¹ãšæåŠã±ãŒã¹ãå°ãªããšãäžã€ãã€å«ããæåŠã±ãŒã¹ã§ã¯ §6 ã®çµäºã³ãŒãã assert ããŸããåäœè©Šéšã¯ Docker ãèŠæ±ããŸãããhost.py ãš build.py ã¯å®è¡åšãå·®ãæ¿ããããäœãã«ãã詊éšã§ã¯åœã® docker ã®åºåãæž¡ããŸããçµ±åãšåå
¥ã®æ®µã¯ SPEC-04 ã§å®ããŸãã
§2.3 ã®åææ¡ä»¶ã¹ã¯ãªããã¯ããã¹ãŠã® PR ã§ installer-prereq-lint.yml ã確ãããŸããbash -nãshellcheckãwindows-latest ã® PowerShell ããŒãµãŒãå OS ã§ã® dry run ã§ããåäœè©Šéšã¯ã¹ã¿ãã ãã® PATH ã®äžã§ --dry-run ã --help ã§ã ãå®è¡ããŸããæã§èµ·åãã installer-full.yml 㯠ubuntu-24.04 ãš ubuntu-24.04-arm ã§ minimum ã®å®å
šãªå°å
¥ãè¡ãããªããžããªã®ã·ãŒã¯ã¬ãã GRDM_INTEGRATION_READ_TOKEN ãå¿
èŠãšããŸãããããã®ã©ã³ããŒã§èšŒæã§ããªãããšã¯ ADR-08 §5 ã«æããŠããŸãã
| Term | English note | æ¥æ¬èªæ³š |
|---|---|---|
| Virtual environment (venv) | A private folder of Python and its libraries, separate from the system's. | ã·ã¹ãã ãšã¯å¥ã®ãPython ãšã©ã€ãã©ãªã ãã®ç§çšãã©ã«ãã |
| buildx | The part of Docker that builds images for more than one kind of CPU at once. | è€æ°ã®çš®é¡ã® CPU åãã®ã€ã¡ãŒãžãäžåºŠã«äœã Docker ã®æ©èœã |
| Loopback / 127.0.0.1 | The address that means "this same computer"; nothing outside can reach it. | ããã®åãã³ã³ãã¥ãŒã¿ããæãçªå°ãå€ããã¯å±ããªãã |
| SBOM | A list of every software part inside an image, like an ingredients label. | ã€ã¡ãŒãžã«å ¥ã£ãŠããéšåã®äžèЧãé£åã®åææè¡šç€ºã®ãããªãã®ã |
| CVE | A public record number for one known security weakness. | äžã€ã®æ¢ç¥ã®åŒ±ç¹ã«ä»ããå ¬éã®çªå·ã |
| Exit code | The number a program returns when it stops; 0 means success. | ããã°ã©ã ãçµãããšãã«è¿ãæ°ã0 ãæåã |