isle/docs/dev/daemon-process-tree.svg
2022-10-16 16:52:07 +02:00

88 lines
18 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="739px" preserveAspectRatio="none" style="width:1695px;height:739px;background:#FFFFFF;" version="1.1" viewBox="0 0 1695 739" width="1695px" zoomAndPan="magnify"><defs/><g><!--MD5=[94d69829b8642ebae4272c0fe4460dd1]
cluster AppDir--><g id="cluster_AppDir"><path d="M19.5,110 L1669.5,110 A12.5,12.5 0 0 1 1682,122.5 L1682,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="623" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;fill:none;" width="1675" x="7" y="110"/><line style="stroke:#181818;stroke-width:0.5;fill:none;" x1="7" x2="1682" y1="136.2969" y2="136.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="46" x="821.5" y="126.9951">AppDir</text></g><g id="elem_N1"><path d="M1156.5,159 L1156.5,184.1328 L1519.5,184.1328 L1519.5,169 L1509.5,159 L1156.5,159 " fill="#FEFFDD" style="stroke:#181818;stroke-width:0.5;"/><path d="M1509.5,159 L1509.5,169 L1519.5,169 L1509.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="1162.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="662.5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="397" x="28.5" y="687.3467">./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="662.5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="370" x="471" y="687.3467">./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="662.5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="407" x="886.5" y="687.3467">./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="618" y="145"/><line style="stroke:#181818;stroke-width:0.5;" x1="618" x2="814" y1="171.2969" y2="171.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="64" x="684" y="162.9951">./AppRun</text><ellipse cx="628.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="636" y="189.292">Set PATH to APPDIR/bin</text></g><g id="AppDir.entrypoint"><rect fill="#F1F1F1" height="134.0781" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="434" x="499" y="275"/><line style="stroke:#181818;stroke-width:0.5;" x1="499" x2="933" y1="301.2969" y2="301.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="395" x="518.5" y="292.9951">./bin/cryptic-net-main entrypoint daemon -c ./daemon.yml</text><ellipse cx="509.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="517" y="319.292">Create runtime dir at $_RUNTIME_DIR_PATH</text><ellipse cx="509.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="517" y="335.5889">Lock runtime dir</text><ellipse cx="509.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="517" y="351.8857">Merge given and default daemon.yml files</text><ellipse cx="509.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="517" y="368.1826">Copy bootstrap.tgz into $_DATA_DIR_PATH, if it's not there</text><ellipse cx="509.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="517" y="384.4795">Merge daemon.yml config into bootstrap.tgz</text><ellipse cx="509.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="141" x="517" y="400.7764">Run child processes</text></g><g id="AppDir.dnsmasqEntrypoint"><rect fill="#F1F1F1" height="52.5938" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="340" x="23" y="502"/><line style="stroke:#181818;stroke-width:0.5;" x1="23" x2="363" y1="528.2969" y2="528.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="174" x="106" y="519.9951">./bin/dnsmasq-entrypoint</text><ellipse cx="33.5" cy="542.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="307" x="41" y="546.292">Create $_RUNTIME_DIR_PATH/dnsmasq.conf</text></g><g id="AppDir.nebulaEntrypoint"><rect fill="#F1F1F1" height="52.5938" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="316" x="398" y="502"/><line style="stroke:#181818;stroke-width:0.5;" x1="398" x2="714" y1="528.2969" y2="528.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="272" x="420" y="519.9951">./bin/cryptic-net-main nebula-entrypoint</text><ellipse cx="408.5" cy="542.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="283" x="416" y="546.292">Create $_RUNTIME_DIR_PATH/nebula.yml</text></g><g id="AppDir.garageEntrypoint"><rect fill="#F1F1F1" height="85.1875" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="339" x="749.5" y="486"/><line style="stroke:#181818;stroke-width:0.5;" x1="749.5" x2="1088.5" y1="512.2969" y2="512.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="273" x="782.5" y="503.9951">./bin/cryptic-net-main garage-entrypoint</text><ellipse cx="760" cy="526.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="306" x="767.5" y="530.292">Create $_RUNTIME_DIR_PATH/garage-N.toml</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="190" x="762.5" y="546.5889">(one per storage allocation)</text><ellipse cx="760" cy="558.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="141" x="767.5" y="562.8857">Run child processes</text></g><g id="AppDir.garageApplyLayoutDiff"><rect fill="#F1F1F1" height="68.8906" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="215" x="1333.5" y="648"/><line style="stroke:#181818;stroke-width:0.5;" x1="1333.5" x2="1548.5" y1="674.2969" y2="674.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="195" x="1343.5" y="665.9951">./bin/garage-apply-layout-diff</text><ellipse cx="1344" cy="688.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="147" x="1351.5" y="692.292">Runs once then exits</text><ellipse cx="1344" cy="704.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="145" x="1351.5" y="708.5889">Updates cluster topo</text></g><g id="AppDir.updateGlobalBucket"><rect fill="#F1F1F1" height="68.8906" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="542" x="1124" y="494"/><line style="stroke:#181818;stroke-width:0.5;" x1="1124" x2="1666" y1="520.2969" y2="520.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="298" x="1246" y="511.9951">./bin/cryptic-net-main update-global-bucket</text><ellipse cx="1134.5" cy="534.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="147" x="1142" y="538.292">Runs once then exits</text><ellipse cx="1134.5" cy="550.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="509" x="1142" y="554.5889">Updates the bootstrap data for the host in garage for other hosts to query</text></g><rect fill="#F1F1F1" height="40" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="267" x="582.5" y="7"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="257" x="587.5" y="31.8467">./cryptic-net daemon -c ./daemon.yml</text><!--MD5=[99e1226540a30c5125aeac95dc2932fd]
link init to AppRun--><g id="link_init_AppRun"><path d="M716,47.22 C716,70.96 716,111.66 716,139.76 " fill="none" id="init-to-AppRun" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="716,144.85,720,135.85,716,139.85,712,135.85,716,144.85" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="30" x="717" y="90.0669">exec</text></g><!--MD5=[973be3d7ea581194d5ee3fc39a24a200]
link AppRun to entrypoint--><g id="link_AppRun_entrypoint"><path d="M716,198.09 C716,217.17 716,244.2 716,269.64 " fill="none" id="AppRun-to-entrypoint" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="716,274.7,720,265.7,716,269.7,712,265.7,716,274.7" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="30" x="717" y="241.0669">exec</text></g><!--MD5=[083a25c5b19d53ca66969ca5947a1cf6]
link entrypoint to dnsmasqEntrypoint--><g id="link_entrypoint_dnsmasqEntrypoint"><path d="M528.66,409.09 C439.64,440.49 338.12,476.3 270.26,500.25 " fill="none" id="entrypoint-to-dnsmasqEntrypoint" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="265.43,501.95,275.2486,502.7219,270.1442,500.2837,272.5824,495.1793,265.43,501.95" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="29" x="439" y="452.0669">child</text></g><!--MD5=[c7ea69d4ff6721f817d13683540cf18f]
link dnsmasqEntrypoint to dnsmasq--><g id="link_dnsmasqEntrypoint_dnsmasq"><path d="M198.77,555.28 C205.15,583.83 215.36,629.48 221.6,657.35 " fill="none" id="dnsmasqEntrypoint-to-dnsmasq" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="222.71,662.34,224.6294,652.68,221.6087,657.4628,216.8259,654.4421,222.71,662.34" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="30" x="213" y="614.0669">exec</text></g><!--MD5=[e57db689e698a4cac2a90f0a38fcb110]
link entrypoint to nebulaEntrypoint--><g id="link_entrypoint_nebulaEntrypoint"><path d="M658.69,409.09 C632.41,439.39 602.57,473.79 581.86,497.68 " fill="none" id="entrypoint-to-nebulaEntrypoint" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="578.36,501.72,587.2801,497.5449,581.6374,497.9439,581.2384,492.3011,578.36,501.72" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="29" x="632" y="452.0669">child</text></g><!--MD5=[b8917cf0c8fa712950e6c2e129fc0a6a]
link nebulaEntrypoint to nebula--><g id="link_nebulaEntrypoint_nebula"><path d="M572.96,555.28 C591.9,584.07 622.28,630.24 640.57,658.04 " fill="none" id="nebulaEntrypoint-to-nebula" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="643.4,662.34,641.7744,652.6262,640.643,658.1688,635.1004,657.0374,643.4,662.34" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="30" x="612" y="614.0669">exec</text></g><!--MD5=[b16f4e4f6f0194775e8cc00ba594229f]
link entrypoint to garageEntrypoint--><g id="link_entrypoint_garageEntrypoint"><path d="M788.71,409.09 C815.5,433.43 845.19,460.42 869.46,482.48 " fill="none" id="entrypoint-to-garageEntrypoint" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="873.31,485.97,869.3516,476.9516,869.6142,482.6024,863.9634,482.8649,873.31,485.97" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="371" x="836" y="452.0669">child (only if &gt;1 storage allocation defined in daemon.yml)</text></g><!--MD5=[7604ba225da9a0d6f108d03d7e486e8b]
link garageEntrypoint to garage--><g id="link_garageEntrypoint_garage"><path d="M965.73,571.03 C997.45,599.24 1038.22,635.47 1064.23,658.6 " fill="none" id="garageEntrypoint-to-garage" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="1068.28,662.19,1064.1938,653.2288,1064.5367,658.8753,1058.8902,659.2182,1068.28,662.19" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="210" x="1015" y="614.0669">child (one per storage allocation)</text></g><!--MD5=[7472d79ac569d4db6634ba16e8ae6010]
link garageEntrypoint to garageApplyLayoutDiff--><g id="link_garageEntrypoint_garageApplyLayoutDiff"><path d="M1088.57,566.87 C1154.86,581.7 1218.75,596.33 1234,601 C1275.46,613.69 1320.44,630.77 1357.84,645.92 " fill="none" id="garageEntrypoint-to-garageApplyLayoutDiff" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="1362.83,647.95,1356.0044,640.85,1358.1995,646.0635,1352.986,648.2587,1362.83,647.95" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="29" x="1281" y="614.0669">child</text></g><!--MD5=[4233354f179cceff861e35de62bdca51]
link entrypoint to updateGlobalBucket--><g id="link_entrypoint_updateGlobalBucket"><path d="M933.08,371.59 C1022.15,386.68 1125.41,408.53 1216,439 C1256.25,452.54 1298.97,473.38 1332.57,491.44 " fill="none" id="entrypoint-to-updateGlobalBucket" style="stroke:#181818;stroke-width:1.0;"/><polygon fill="#181818" points="1337.04,493.86,1331.0348,486.0538,1332.6445,491.4767,1327.2216,493.0865,1337.04,493.86" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="29" x="1257" y="452.0669">child</text></g><!--MD5=[282cac2ac98d05852bae94f25970d56b]
@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/cryptic-net-main 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 : * Run child processes
}
init - -> AppRun : exec
AppRun - -> entrypoint : exec
state "./bin/dnsmasq-entrypoint" as dnsmasqEntrypoint {
dnsmasqEntrypoint : * Create $_RUNTIME_DIR_PATH/dnsmasq.conf
}
state "./bin/dnsmasq -d -C $_RUNTIME_DIR_PATH/dnsmasq.conf" as dnsmasq
entrypoint - -> dnsmasqEntrypoint : child
dnsmasqEntrypoint - -> dnsmasq : exec
state "./bin/cryptic-net-main nebula-entrypoint" as nebulaEntrypoint {
nebulaEntrypoint : * Create $_RUNTIME_DIR_PATH/nebula.yml
}
state "./bin/nebula -config $_RUNTIME_DIR_PATH/nebula.yml" as nebula
entrypoint - -> nebulaEntrypoint : child
nebulaEntrypoint - -> nebula : exec
state "./bin/cryptic-net-main garage-entrypoint" as garageEntrypoint {
garageEntrypoint : * Create $_RUNTIME_DIR_PATH/garage-N.toml\n (one per storage allocation)
garageEntrypoint : * Run child processes
}
state "./bin/garage -c $_RUNTIME_DIR_PATH/garage-N.toml server" as garage
state "./bin/garage-apply-layout-diff" as garageApplyLayoutDiff {
garageApplyLayoutDiff : * Runs once then exits
garageApplyLayoutDiff : * Updates cluster topo
}
entrypoint - -> garageEntrypoint : child (only if >1 storage allocation defined in daemon.yml)
garageEntrypoint - -> garage : child (one per storage allocation)
garageEntrypoint - -> garageApplyLayoutDiff : child
state "./bin/cryptic-net-main update-global-bucket" as updateGlobalBucket {
updateGlobalBucket : * Runs once then exits
updateGlobalBucket : * Updates the bootstrap data for the host in garage for other hosts to query
}
entrypoint - -> updateGlobalBucket : child
}
@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>