MatrixAI / Emergence

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

List down all OCI Runtime specifications #36

Open mokuki082 opened 6 years ago

mokuki082 commented 6 years ago

We should list down all OCI container runtime specifications, and what we need to implement to be inline with the standard.

mokuki082 commented 6 years ago

I have listed down all of OCI runtime spec in a list structure. This is a reference to track our implementation progress, it is recommended to look up the official OCI runtime spec for documentation and data structures prior to implementation.

This is basically a copy of the OCI runtime spec although I've taken out some non-Linux related specifications as they are not necessary at the current stage. I wasn't entirely sure on the format or the usecase for this documentation so I have put in everything that I thought could be used for either implementing the runtime or generating test cases.

OCI Runtime Spec

OCI specification for stand container defines:

  1. Configuration file formats
  2. A set of standard operations
  3. An execution environment

The goal is to create a container that is portable, content-agnostic, infrastructure-agnostic, with self-describing dependencies.

Filesystem Bundle

A filesystem bundle MUST consists of:

Lifecycle

Errors and Warnings

Operations

Runtimes must support the following operations:

Query state

state <container-id>

Create

create <container-id> <path-to-bundle>

Start

start <container-id>

Kill

kill <container-id> <signal>

Delete

delete <container-id>

Configuration

The configuration file contains metadata necessary to implement standard operations against the container. Detailed description (for all OSes) of each field can be found here.

Root

Mounts

Hostname

Linux Specific Configuration

Source

The following are under the linux (object, OPTIONAL) property.

POSIX-platform Hooks

Annotations

Extensibility

Valid Values

File Descriptors

CMCDragonkai commented 6 years ago

A filesystem bundle is the "container image artifact" that we are specifying in our artifact specification right?

CMCDragonkai commented 6 years ago

I'll review this after the R&D and hiring work is done. In the mean time, which ones do you think we need to implement? I'm assuming the filesystem bundle first. Whereas a lot of the other runtime specs are already handled by runc. But for certain management requirements of containers/automatons in Emergence (which we need to spec out), we'll need to use the above specs to gather information about the containers.

Remember due to QoS constraints, we'll eventually derive resource requirements. So I need to have a list of resources that can be constrained by the container runtime, and which resources can be adjusted dynamically, and which resources must require redeployment. I have some notes about this already that I can send to you.

mokuki082 commented 6 years ago

A filesystem bundle should be the result from unpacking the artifact.

I have some concerns regarding some of the bundle contents such as mount points and resource constraints. These can be affected by matters outside of the Artifact declaration (for example from StateSpec and the orchestrator).