-
Notifications
You must be signed in to change notification settings - Fork 0
Overview: Nest
Dargon.Nest is our application distribution system. Features include automated deployment, installation, and error reporting.
Eggs
represent standalone packages. For example, modifications are eggs. Eggs may be executed by the Nest Exeggutor
. Eggs are spawned
and instances are referred to as hatchlings
. Individual C# projects are somewhat equatable to executable eggs.
Bundles
represent collections of tightly-coupled eggs. Think of bundles as logical dependency-level releases. For example, the nest
bundle contains nestd
, nest-host
, and nest-spawner
, explained later. Eggs within bundles have full names defined as {bundle-name}/{egg-name}
e.g. nest/nest-host
. Standalone C# solutions are somewhat equatable to bundles.
Deployments
represent collections of bundles. Think of deployments as application releases. For example, the dargon-client
deployment contains core
, client
, trinket
, and nest
.
Eggs
, Bundles
, and Deployments
all contain VERSION
files, which are formatted semver-style; that is, in major.minor.patch-prerelease
format. They also contain REMOTE
files, which indicate their patching servers.
Executable eggs deploy a file named {egg-name}.dll
or {egg-name.exe}
which export a public class implementing NestApplication
.
public interface NestApplication {
NestResult Start(HatchlingParameters parameters);
NestResult Shutdown(ShutdownReason reason);
}
Executable eggs may leverage Dargon.Services
to communicate with nestd
in order to enumerate
, spawn
, and kill
other eggs via the ExeggutorService
.
- User downloads and executes
nest-spawner
, our installer. -
nest-spawner
creates nest directory and downloads application packages. -
nest-spawner
fetchesinit
package and places it indeployment
directory. -
nest-spawner
registersinit/init.exe
to run at startup. -
nest-spawner
executesinit/init.exe
.
-
init/init.exe
is executed.
a. Moves change fromstage
tobundles
.
b. Clearstemp
directory.
c. Compactslog
directories. d. Startsbundles/nest/nestd.exe
. -
bundles/nest/nestd.exe
is executed.
a. Iterates throughbundles
, processing theirinit.json
scripts.
b. Iterates throughrestart
signals (see below).
init.json
scripts and restart
signals may trigger further operations, such as spawning hatchlings.
-
nest/nestd.exe
is the parent process of allhatchlings
. -
nest/nest-host.exe
handles loading allhatchlings
, instantiating theirNestApplication
implementations, and invokingStart(HatchlingParameters)
.
Upon shutdown, nestd
sends a shutdown signal to hosted hatchlings. The shutdown signal includes a ShutdownReason
. Hatchlings may call host.SetRestartToken(HatchlingParameters hatchlingParameters)
where hatchlingParameters
contains the parameters to restart the egg.
The below installation layout is copied from Dargon.Nest/InstallationLayout.txt
root
:- deployments
: '- dargon-client
: :- CHANNEL stable
: :- REMOTE https://packages.dargon.io
: :- VERSION 0.0.0
: :- LOCK
: :- bundles
: : :- client
: : : :- init.json
: : : :- REMOTE
: : : :- VERSION
: : : :- cored
: : : :- dargon-cli
: : : '- dargon-client
: : '- nest
: : :- REMOTE
: : :- VERSION
: : :- nest
: : :- nestd
: : : :- nestd.exe
: : : '- NEST_INIT
: : '- nest-host
: : '- nest-host.exe
: :- cache
: : :- 3d72a9ce
: : '- b45a81f1
: :- config
: : :- client
: : : '- system-state.json
: : '- nest
: : '- system-state.json
: :- init
: : :- init.exe
: : :- FILELIST
: : :- REMOTE
: : '- VERSION
: :- logs
: : :- client
: : : '- cored.log
: : '- nest
: : '- nestd.log
: :- restart
: : '- trinket-10382
: :- stage
: : '- client
: : '- cored
: : '- NEST_READY
: '- temp
: '- a9fe3452
: '- cored
'- stage
'- dargon-client