MatrixAI / Emergence

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

Design an API for container runtime #27

Closed mokuki082 closed 5 years ago

mokuki082 commented 6 years ago

Design an API for create/start/delete/kill/stat for containers.

Take into consideration that:

mokuki082 commented 5 years ago

Runc actually makes a lot of assumptions on the filesystem. It saves the container information at /run/runc if the container is created by root user, and a custom location otherwise. There are also other dependencies such as unix socket location (which seems to be relied heavily by docker and runc), rootfs, config path, not mentioning one of the underlying technology: cgroups relies on a virtual fs as its API. Runc already has the config file parser set up, is it really worth it to go through the hassle of serialising the entire config file for the sake of not interacting with the filesystem?

mokuki082 commented 5 years ago

According to OCI Runtime Operations Specification, to have the bare minimum container runtime we need the following operations:

Notation: API-name(<arg1>, <arg2>...): <return-value>

mokuki082 commented 5 years ago

Closing this as we are utilising RunC as a whole, hence the API would be the same as RunC's commands.