isle/docs/dev/daemon-process-tree.svg
2022-10-30 00:38:26 +02:00

57 lines
11 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="646px" preserveAspectRatio="none" style="width:1327px;height:646px;background:#FFFFFF;" version="1.1" viewBox="0 0 1327 646" width="1327px" zoomAndPan="magnify"><defs/><g><!--MD5=[94d69829b8642ebae4272c0fe4460dd1]
cluster AppDir--><g id="cluster_AppDir"><path d="M19.5,110 L1301.5,110 A12.5,12.5 0 0 1 1314,122.5 L1314,136.2969 L7,136.2969 L7,122.5 A12.5,12.5 0 0 1 19.5,110 " fill="#F1F1F1" style="stroke:#F1F1F1;stroke-width:1.0;"/><rect height="530" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;fill:none;" width="1307" x="7" y="110"/><line style="stroke:#181818;stroke-width:0.5;fill:none;" x1="7" x2="1314" y1="136.2969" y2="136.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="46" x="637.5" y="126.9951">AppDir</text></g><g id="elem_N1"><path d="M862.5,159 L862.5,184.1328 L1225.5,184.1328 L1225.5,169 L1215.5,159 L862.5,159 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M1215.5,159 L1215.5,169 L1225.5,169 L1215.5,159 " fill="#FEFFDD" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="342" x="868.5" y="176.0669">All relative paths are relative to the root of the AppDir</text></g><rect fill="#F1F1F1" height="40" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="407" x="23.5" y="584"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="397" x="28.5" y="608.8467">./bin/dnsmasq -d -C $_RUNTIME_DIR_PATH/dnsmasq.conf</text><rect fill="#F1F1F1" height="40" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="380" x="466" y="584"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="370" x="471" y="608.8467">./bin/nebula -config $_RUNTIME_DIR_PATH/nebula.yml</text><rect fill="#F1F1F1" height="40" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="417" x="881.5" y="584"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="407" x="886.5" y="608.8467">./bin/garage -c $_RUNTIME_DIR_PATH/garage-N.toml server</text><g id="AppDir.AppRun"><rect fill="#F1F1F1" height="52.5938" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="196" x="558" y="145"/><line style="stroke:#181818;stroke-width:0.5;" x1="558" x2="754" y1="171.2969" y2="171.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="64" x="624" y="162.9951">./AppRun</text><ellipse cx="568.5" cy="185.0938" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="163" x="576" y="189.292">Set PATH to APPDIR/bin</text></g><g id="AppDir.entrypoint"><rect fill="#F1F1F1" height="231.8594" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="434" x="439" y="275"/><line style="stroke:#181818;stroke-width:0.5;" x1="439" x2="873" y1="301.2969" y2="301.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="280" x="516" y="292.9951">./bin/entrypoint daemon -c ./daemon.yml</text><ellipse cx="449.5" cy="315.0938" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="299" x="457" y="319.292">Create runtime dir at $_RUNTIME_DIR_PATH</text><ellipse cx="449.5" cy="331.3906" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="110" x="457" y="335.5889">Lock runtime dir</text><ellipse cx="449.5" cy="347.6875" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="285" x="457" y="351.8857">Merge given and default daemon.yml files</text><ellipse cx="449.5" cy="363.9844" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="401" x="457" y="368.1826">Copy bootstrap.tgz into $_DATA_DIR_PATH, if it's not there</text><ellipse cx="449.5" cy="380.2813" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="305" x="457" y="384.4795">Merge daemon.yml config into bootstrap.tgz</text><ellipse cx="449.5" cy="396.5781" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="307" x="457" y="400.7764">Create $_RUNTIME_DIR_PATH/dnsmasq.conf</text><ellipse cx="449.5" cy="412.875" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="283" x="457" y="417.0732">Create $_RUNTIME_DIR_PATH/nebula.yml</text><ellipse cx="449.5" cy="429.1719" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="306" x="457" y="433.3701">Create $_RUNTIME_DIR_PATH/garage-N.toml</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="190" x="452" y="449.667">(one per storage allocation)</text><ellipse cx="449.5" cy="461.7656" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="141" x="457" y="465.9639">Run child processes</text><ellipse cx="449.5" cy="478.0625" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="346" x="457" y="482.2607">(in the background) Updates garage cluster layout</text><ellipse cx="449.5" cy="494.3594" fill="#000000" rx="2.5" ry="2.5" style="stroke:#000000;stroke-width:0.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="362" x="457" y="498.5576">(in the background) Stores host info in global bucket</text></g><rect fill="#F1F1F1" height="40" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="267" x="522.5" y="7"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="257" x="527.5" y="31.8467">./cryptic-net daemon -c ./daemon.yml</text><!--MD5=[99e1226540a30c5125aeac95dc2932fd]
link init to AppRun--><g id="link_init_AppRun"><path d="M656,47.22 C656,70.96 656,111.66 656,139.76 " fill="none" id="init-to-AppRun" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="656,144.85,660,135.85,656,139.85,652,135.85,656,144.85" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="30" x="657" y="90.0669">exec</text></g><!--MD5=[973be3d7ea581194d5ee3fc39a24a200]
link AppRun to entrypoint--><g id="link_AppRun_entrypoint"><path d="M656,198.3 C656,216.63 656,242.69 656,269.72 " fill="none" id="AppRun-to-entrypoint" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="656,274.77,660,265.77,656,269.77,652,265.77,656,274.77" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="30" x="657" y="241.0669">exec</text></g><!--MD5=[e434b5382339aa93f4b4af3863d5866f]
link entrypoint to dnsmasq--><g id="link_entrypoint_dnsmasq"><path d="M438.99,498.74 C374.88,530.27 311.07,561.65 270.48,581.62 " fill="none" id="entrypoint-to-dnsmasq" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="265.64,583.99,275.4818,583.6183,270.1292,581.7883,271.9591,576.4356,265.64,583.99" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="29" x="354" y="550.0669">child</text></g><!--MD5=[2ec7f39cf7359814e08342510a2551d7]
link entrypoint to nebula--><g id="link_entrypoint_nebula"><path d="M656,507.07 C656,534.16 656,560.41 656,578.57 " fill="none" id="entrypoint-to-nebula" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="656,583.95,660,574.95,656,578.95,652,574.95,656,583.95" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="29" x="657" y="550.0669">child</text></g><!--MD5=[dfc682edd6f75b156d1c4e2d31fc76ae]
link entrypoint to garage--><g id="link_entrypoint_garage"><path d="M873.32,497.65 C938.96,529.57 1004.56,561.46 1046.1,581.66 " fill="none" id="entrypoint-to-garage" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="1050.79,583.94,1044.442,576.4098,1046.2925,581.7555,1040.9468,583.6059,1050.79,583.94" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="210" x="986" y="550.0669">child (one per storage allocation)</text></g><!--MD5=[3a9ea1be35909f0c519370d5420def71]
@startuml
hide empty description
state "./cryptic-net daemon -c ./daemon.yml" as init
state AppDir {
note "All relative paths are relative to the root of the AppDir" as N1
state "./AppRun" as AppRun {
AppRun : * Set PATH to APPDIR/bin
}
state "./bin/entrypoint daemon -c ./daemon.yml" as entrypoint {
entrypoint : * Create runtime dir at $_RUNTIME_DIR_PATH
entrypoint : * Lock runtime dir
entrypoint : * Merge given and default daemon.yml files
entrypoint : * Copy bootstrap.tgz into $_DATA_DIR_PATH, if it's not there
entrypoint : * Merge daemon.yml config into bootstrap.tgz
entrypoint : * Create $_RUNTIME_DIR_PATH/dnsmasq.conf
entrypoint : * Create $_RUNTIME_DIR_PATH/nebula.yml
entrypoint : * Create $_RUNTIME_DIR_PATH/garage-N.toml\n (one per storage allocation)
entrypoint : * Run child processes
entrypoint : * (in the background) Updates garage cluster layout
entrypoint : * (in the background) Stores host info in global bucket
}
init - -> AppRun : exec
AppRun - -> entrypoint : exec
state "./bin/dnsmasq -d -C $_RUNTIME_DIR_PATH/dnsmasq.conf" as dnsmasq
entrypoint - -> dnsmasq : child
state "./bin/nebula -config $_RUNTIME_DIR_PATH/nebula.yml" as nebula
entrypoint - -> nebula : child
state "./bin/garage -c $_RUNTIME_DIR_PATH/garage-N.toml server" as garage
entrypoint - -> garage : child (one per storage allocation)
}
@enduml
PlantUML version 1.2022.5(Sat Apr 30 10:55:52 UTC 2022)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: ANSI_X3.4-1968
Language: en
Country: US
--></g></svg>