From 287313e00aadb9aa8565017245e485b13baac7e7 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sun, 30 Oct 2022 00:38:26 +0200 Subject: [PATCH] Update daemon-process-tree --- docs/dev/daemon-process-tree.plantuml | 40 ++++-------------- docs/dev/daemon-process-tree.svg | 59 +++++++-------------------- 2 files changed, 23 insertions(+), 76 deletions(-) diff --git a/docs/dev/daemon-process-tree.plantuml b/docs/dev/daemon-process-tree.plantuml index 4e1c38d..c44ba0d 100644 --- a/docs/dev/daemon-process-tree.plantuml +++ b/docs/dev/daemon-process-tree.plantuml @@ -11,55 +11,31 @@ state AppDir { AppRun : * Set PATH to APPDIR/bin } - state "./bin/cryptic-net-main entrypoint daemon -c ./daemon.yml" as entrypoint { + 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-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 - } + entrypoint --> dnsmasq : child state "./bin/nebula -config $_RUNTIME_DIR_PATH/nebula.yml" as nebula + entrypoint --> nebula : child - entrypoint --> nebulaEntrypoint : child - nebulaEntrypoint --> nebula : exec - - state "Garage processes (only if any storage allocs are defined)" as garageChildren { - - 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 - } - } - + state "./bin/garage -c $_RUNTIME_DIR_PATH/garage-N.toml server" as garage entrypoint --> garage : child (one per storage allocation) - entrypoint --> 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 diff --git a/docs/dev/daemon-process-tree.svg b/docs/dev/daemon-process-tree.svg index f673f0d..a64a983 100644 --- a/docs/dev/daemon-process-tree.svg +++ b/docs/dev/daemon-process-tree.svg @@ -1,15 +1,10 @@ -AppDirGarage processes (only if any storage allocs are defined)All relative paths are relative to the root of the AppDir./bin/dnsmasq -d -C $_RUNTIME_DIR_PATH/dnsmasq.conf./bin/nebula -config $_RUNTIME_DIR_PATH/nebula.yml./AppRunSet PATH to APPDIR/bin./bin/cryptic-net-main entrypoint daemon -c ./daemon.ymlCreate runtime dir at $_RUNTIME_DIR_PATHLock runtime dirMerge given and default daemon.yml filesCopy bootstrap.tgz into $_DATA_DIR_PATH, if it's not thereMerge daemon.yml config into bootstrap.tgzCreate $_RUNTIME_DIR_PATH/garage-N.toml(one per storage allocation)Run child processes./bin/dnsmasq-entrypointCreate $_RUNTIME_DIR_PATH/dnsmasq.conf./bin/cryptic-net-main nebula-entrypointCreate $_RUNTIME_DIR_PATH/nebula.yml./bin/cryptic-net-main update-global-bucketRuns once then exitsUpdates the bootstrap data for the host in garage for other hosts to query./bin/garage -c $_RUNTIME_DIR_PATH/garage-N.toml server./bin/garage-apply-layout-diffRuns once then exitsUpdates cluster topo./cryptic-net daemon -c ./daemon.ymlexecexecchildexecchildexecchild (one per storage allocation)childchildAppDirAll relative paths are relative to the root of the AppDir./bin/dnsmasq -d -C $_RUNTIME_DIR_PATH/dnsmasq.conf./bin/nebula -config $_RUNTIME_DIR_PATH/nebula.yml./bin/garage -c $_RUNTIME_DIR_PATH/garage-N.toml server./AppRunSet PATH to APPDIR/bin./bin/entrypoint daemon -c ./daemon.ymlCreate runtime dir at $_RUNTIME_DIR_PATHLock runtime dirMerge given and default daemon.yml filesCopy bootstrap.tgz into $_DATA_DIR_PATH, if it's not thereMerge daemon.yml config into bootstrap.tgzCreate $_RUNTIME_DIR_PATH/dnsmasq.confCreate $_RUNTIME_DIR_PATH/nebula.ymlCreate $_RUNTIME_DIR_PATH/garage-N.toml(one per storage allocation)Run child processes(in the background) Updates garage cluster layout(in the background) Stores host info in global bucket./cryptic-net daemon -c ./daemon.ymlexecexecchildchildchild (one per storage allocation)