Open nzhang-zh opened 5 years ago
Emergence would need to refer to the configuration graph to build Artefacts and configure and deploy Automatons.
We could have build dependencies represented in the configuration graph. In container based Artefact, this would be multi-layered image referencing blobs of layers. In Nix based Artefact, this would be package level dependencies similar to Nix's dependency graph.
These nodes would be created/written by Forge and read by Emergence.
Most runtime configurations are optional at Artefact building stage but are required to create or start an Automaton. So they should be represented in the configuration graph external to Artefact nodes.
The configuration node could be related to Artefacts and/or Automatons.
The Automaton itself should be present in the configuration graph. We need to distinguish between the abstract Automaton as created by the operator and actual running Automaton instances. For example, from an operator's perspective, an Automaton could be simply a webserver. But in matrix network, there could several instances of the webserver running in different Automatons based on number of user requests, latency, location, etc.
For lack of better words,
Since we can separate nix based images from their closures https://github.com/MatrixAI/Emergence/issues/46#issuecomment-446100144, we need the capability to create a closure from an artefact's dependency nodes.
Nix has this capability natively.
Each configuration is in one of the following catagories:
drv :: string
, Required
imageName :: string
, RequiredimageDigest :: string
, Requiredsha256 :: string
, Required,
node :: string
, Encapsulated, Need default
artefact :: string
, Required
Refer to OCI runtime spec.
ociVersion :: string
: Encapsulated, "1.0.0"
root :: object
, Optional
path :: string
, Encapsulatedreadonly :: bool
, Optionalfalse
, orfalse
if no state volume mounted and true
otherwisemounts :: [object]
, Optional
/proc
/sys
/dev/pts
etc, Encapsulatedprocess :: object
, Required
terminal :: bool
, Encapsulated, false
or true
if debug modeconsoleSize :: object
, Encapuslated, omittedcwd :: string
, Optional, default to "/"
env :: [string]
, Optional, default to "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
args :: [string]
, Requiredrlimits :: [object]
, Optional, default to omittedapparmorProfile :: string
, Encapsulated, omittedcapabilities :: string
, Optional, Need DefaultnoNewPrivileges :: bool
, Optional, default to true
oomScoreAdj :: int
, Encapsulated, omittedselinuxLabel :: string
, Encapsulated/Optional, Need Defaultuser :: object
, Encapsulated, uid:0 gid:0
hostname :: string
, Optional, default to artefact namehooks :: object
, Optional, default to omitted
prestart :: [object]
, Optional, default to omittedpoststart :: [object]
, Optional, default to omittedpoststop :: [object]
, Optional, default to omittednamespaces :: [object]
, Encapsulated, all annotations :: object
, Encapsulated, omittedEncapsulated: Value is defined from within Emergence.
I think you mean the container/artifact runtime. The emergence module involves the config graph as well.
@CMCDragonkai
Our release.nix should have a debug flag that allows one to add a small busybox shell into the container builds to allow a debuggable container.
Process.terminal
is still encapsulated but changed to true
in debug mode
Oh that's not related to each other. I'm talking about release.nix
for building any our applications and making them debuggable. Nothing to do with OCI.
Actually I don't even know what does Process.terminal
does?
Actually I don't even know what does
Process.terminal
does?
From oci runtime spec,
terminal (bool, OPTIONAL) specifies whether a terminal is attached to the process, defaults to false. As an example, if set to true on Linux a pseudoterminal pair is allocated for the process and the pseudoterminal slave is duplicated on the process's standard streams.
Also need to represent available hosts and their available resources as nodes in the configuration graph.
List up all the configuration parameters that should be present in the configuration graph. Consider this from the perspective of each Matrix system component.