mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-15 06:34:03 +00:00
architecture: add OCI cmd diagrams
Create docker example UML flows. Signed-off-by: Eric Ernst <eric.ernst@intel.com>
This commit is contained in:
parent
4602ef5a60
commit
eb035e167f
27
arch-images/kata-oci-create.svg
Normal file
27
arch-images/kata-oci-create.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 14 KiB |
31
arch-images/kata-oci-create.txt
Normal file
31
arch-images/kata-oci-create.txt
Normal file
@ -0,0 +1,31 @@
|
||||
Title: Kata Flow
|
||||
participant Docker
|
||||
participant Kata Runtime
|
||||
participant virtcontainers
|
||||
participant hypervisor
|
||||
participant agent
|
||||
participant shim-pod
|
||||
participant shim-ctr
|
||||
participant proxy
|
||||
|
||||
#Docker Create!
|
||||
Docker->Kata Runtime: create
|
||||
Kata Runtime->virtcontainers: CreateSandbox()
|
||||
Note left of virtcontainers: Sandbox\nReady
|
||||
virtcontainers->virtcontainers: createNetwork()
|
||||
virtcontainers->virtcontainers: Execute PreStart Hooks
|
||||
virtcontainers->+hypervisor: Start VM (inside the netns)
|
||||
hypervisor-->-virtcontainers: VM started
|
||||
virtcontainers->proxy: Start Proxy
|
||||
proxy->hypervisor: Connect the VM
|
||||
virtcontainers->+agent: CreateSandbox()
|
||||
agent-->-virtcontainers: Sandbox Created
|
||||
virtcontainers->+agent: CreateContainer()
|
||||
agent-->-virtcontainers: Container Created
|
||||
virtcontainers->shim-pod: Start Shim
|
||||
shim->agent: ReadStdout() (blocking call)
|
||||
shim->agent: ReadStderr() (blocking call)
|
||||
shim->agent: WaitProcess() (blocking call)
|
||||
Note left of virtcontainers: Container\nReady
|
||||
virtcontainers-->Kata Runtime: End of CreateSandbox()
|
||||
Kata Runtime-->Docker: End of create
|
11
arch-images/kata-oci-exec.svg
Normal file
11
arch-images/kata-oci-exec.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 7.8 KiB |
20
arch-images/kata-oci-exec.txt
Normal file
20
arch-images/kata-oci-exec.txt
Normal file
@ -0,0 +1,20 @@
|
||||
Title: Docker Exec
|
||||
participant Docker
|
||||
participant kata-runtime
|
||||
participant virtcontainers
|
||||
participant shim
|
||||
participant hypervisor
|
||||
participant agent
|
||||
participant proxy
|
||||
|
||||
#Docker Exec
|
||||
Docker->kata-runtime: exec
|
||||
kata-runtime->virtcontainers: EnterContainer()
|
||||
virtcontainers->agent: exec
|
||||
agent->virtcontainers: Process started in the container
|
||||
virtcontainers->shim: start shim
|
||||
shim->agent: ReadStdout()
|
||||
shim->agent: ReadStderr()
|
||||
shim->agent: WaitProcess()
|
||||
virtcontainers->kata-runtime: End of EnterContainer()
|
||||
kata-runtime-->Docker: End of exec
|
9
arch-images/kata-oci-start.svg
Normal file
9
arch-images/kata-oci-start.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 7.3 KiB |
20
arch-images/kata-oci-start.txt
Normal file
20
arch-images/kata-oci-start.txt
Normal file
@ -0,0 +1,20 @@
|
||||
Title: Docker Start
|
||||
participant Docker
|
||||
participant Kata Runtime
|
||||
participant virtcontainers
|
||||
participant hypervisor
|
||||
participant agent
|
||||
participant shim-pod
|
||||
participant shim-ctr
|
||||
participant proxy
|
||||
|
||||
#Docker Start
|
||||
Docker->Kata Runtime: start
|
||||
Kata Runtime->virtcontainers: StartSandbox()
|
||||
Note left of virtcontainers: Sandbox\nRunning
|
||||
virtcontainers->+agent: StartContainer()
|
||||
agent-->-virtcontainers: Container Started
|
||||
Note left of virtcontainers: Container-pod\nRunning
|
||||
virtcontainers->virtcontainers: Execute PostStart Hooks
|
||||
virtcontainers-->Kata Runtime: End of StartSandbox()
|
||||
Kata Runtime-->Docker: End of start
|
@ -176,7 +176,7 @@ For example, when `docker run -ti ubuntu date` is run:
|
||||
- The agent will create a new confined context to run the specified command in
|
||||
(`date` in this example).
|
||||
- The agent will then execute the command (`date` in this example) inside this
|
||||
new context, first setting the root filesystem to the expected Ubuntu* root
|
||||
new context, first setting the root filesystem to the expected Ubuntu\* root
|
||||
filesystem.
|
||||
|
||||
##### Initrd image
|
||||
@ -286,6 +286,8 @@ container. In Kata Containers, this is handled as follows:
|
||||
|
||||
Now the `exec`'ed process is running within the VM, sharing `uts`, `pid`, `mnt` and `ipc` namespaces with the container process.
|
||||
|
||||

|
||||
|
||||
#### [`kill`](https://github.com/kata-containers/runtime/blob/master/cli/kill.go)
|
||||
|
||||
When sending the OCI `kill` command, the container runtime should send a
|
||||
@ -347,9 +349,6 @@ process representing this container process.
|
||||
4. Communicate with `kata-agent` (connecting the proxy) to remove the container configuration from the VM.
|
||||
4. Return container status.
|
||||
|
||||

|
||||
|
||||
|
||||
## Proxy
|
||||
|
||||
Communication with the VM can be achieved by either `virtio-serial` or, if the host
|
||||
|
Loading…
Reference in New Issue
Block a user