Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add kata-container support docs #1295

Merged
merged 1 commit into from
May 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions docs/features/pouch_with_kata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Pouch with kata

## Introduction

Kata Containers combines technology from Intel® Clear Containers and Hyper runV to provide the speed of containers with the security of virtual machines, the core technology is same with runV, about the detail information in vm container , you can see [runV doc](https://github.com/alibaba/pouch/blob/master/docs/features/pouch_with_runV.md).

## Prerequisites Installation

kata announces that it not provide an installation option yet, so some installation methods we get from [clear container project](https://github.com/clearcontainers), for more detail, see [kata-containers](https://github.com/kata-containers/community#users).

### Installation

1. install qemu

[QEMU](https://www.qemu.org) is required to run VMs. We can execute following commands to easily install QEMU related tools.

On physical machine with Ubuntu OS installed:

```
sudo apt-get install -y qemu qemu-kvm
```

On physical machine with RedHat series OS installed:

```
sudo yum install -y qemu qemu-kvm
```

2. Install guest kernel and guest image

[kata-containers/osbuilder](https://github.com/kata-containers/osbuilder) provide a tool to create guest image, see the [detail steps](https://github.com/kata-containers/osbuilder#usage). Since the tool is not giving method to build guest kernel, you can see the detail steps in [clearcontainers/osbuilder](https://github.com/clearcontainers/osbuilder#build-guest-kernel).

3. install kata-runtime

In this step, we need three binary to install, [kata-runtime](https://github.com/kata-containers/runtime), [kata-proxy](https://github.com/kata-containers/proxy) and [kata-shim](https://github.com/kata-containers/shim), kata-proxy and kata-shim will called by kata-runtime in running a kata container.
It is quite easy to get the binary from the source code, let's take kata runtime for example, clone code from github, then make.

```shell
git clone https://github.com/kata-containers/runtime.git
cd runtime
make
```

### Configure kata runtime

Kata runtime read config from configuration file, it default path is `/etc/kata-containers/configuration.toml`.
Get default configuration file:

```shell
git clone https://github.com/kata-containers/runtime.git
cd runtime
make
```

File will be generated in `cli/config/configuration.toml`, copy the file into default path

```shell
cp cli/config/configuration.toml /etc/kata-containers/configuration.toml
```

You might need to modify this file, make sure that all binaries have right path in system.

### Start kata container

With all the steps finish, you can play with kata container.

```shell
$ pouch run -d --runtime=kata-runtime 8ac48589692a top
00d1f38250fc76b5e66e7fa05a41d342d1b48202d24e2dbf06b20a113b2a008c

$ pouch ps
Name ID Status Created Image Runtime
00d1f3 00d1f3 Up 5 seconds 7 seconds ago docker.io/library/busybox:latest kata-runtime
```

Enter into the kata container.

```shell
$ pouch exec -it 00d1f3 sh
/ # uname -r
4.9.47-77.container
```