MatrixAI / Emergence

Distributed Infrastructure Orchestration
Apache License 2.0
1 stars 0 forks source link

Configuration Graph Nodes #50

Open nzhang-zh opened 5 years ago

nzhang-zh commented 5 years ago

List up all the configuration parameters that should be present in the configuration graph. Consider this from the perspective of each Matrix system component.

nzhang-zh commented 5 years ago

Emergence would need to refer to the configuration graph to build Artefacts and configure and deploy Automatons.

Artefacts

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.

Runtime configs

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.

Automaton

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,

nzhang-zh commented 5 years ago

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.

nzhang-zh commented 5 years ago

Emergence Configurations

Notations

Each configuration is in one of the following catagories:

Artefact Configuration

Nix Artefact

OCI Artefact

Automaton Configuration

Runtime Configuration

Refer to OCI runtime spec.

Spec Version

Root Filesystem

Mounts

Process

Hostname

Hooks

Linux Specific Configs

Annotations

CMCDragonkai commented 5 years ago

Encapsulated: Value is defined from within Emergence.

I think you mean the container/artifact runtime. The emergence module involves the config graph as well.

nzhang-zh commented 5 years ago

@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

CMCDragonkai commented 5 years ago

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.

CMCDragonkai commented 5 years ago

Actually I don't even know what does Process.terminal does?

nzhang-zh commented 5 years ago

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.

nzhang-zh commented 5 years ago

Also need to represent available hosts and their available resources as nodes in the configuration graph.