kata-deploy: add docker details to readme

Add details for Docker configuration to the kata-deploy README

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
This commit is contained in:
Eric Ernst
2019-01-30 10:34:01 -08:00
parent c0cdc045a5
commit 53115c0de9

View File

@@ -2,7 +2,11 @@
- [kata-deploy](#kata-deploy)
* [Quick start](#quick-start-)
* [Docker quick start](#docker-quick-start-)
+ [Install Kata and configure Docker](#install-kata-and-configure-docker)
+ [Run a sample workload](#run-a-sample-workload-utilizing-kata-containers)
+ [Remove Kata](#remove-kata)
* [Kubernetes quick start](#kubernetes-quick-start-)
+ [Install Kata on a running Kubernetes cluster](#install-kata-on-a-running-kubernetes-cluster)
+ [Run a sample workload](#run-a-sample-workload-)
+ [Remove Kata from the Kubernetes cluster](#remove-kata-from-the-kubernetes-cluster-)
@@ -16,12 +20,54 @@
[kata-deploy](kata-deploy) provides a Dockerfile, which contains all of the binaries
and artifacts required to run Kata Containers, as well as reference daemonsets, which can
be utilized to install Kata Containers on a running Kubernetes cluster.
be utilized to install Kata Containers for both Docker and on a running Kubernetes cluster.
Note, installation through daemonsets successfully installs `kata-containers.io/kata-runtime` on
a node only if it uses either containerd or CRI-O CRI-shims.
## Quick start:
## Docker quick start:
The kata-deploy container image makes use of a script, `kata-deploy-docker`, for installation of
Kata artifacts and configuration of Docker to utilize the runtime. The following volumes are required to be mounted
to aid in this:
- /opt/kata: this is where all kata artifacts are installed on the system
- /var/run/dbus, /run/systemd: this is require for reloading the the Docker service
- /etc/docker: this is required for updating `daemon.json` in order to configure the kata runtimes in Docker
### Install Kata and configure Docker
To install:
```
docker run -v /opt/kata:/opt/kata -v /var/run/dbus:/var/run/dbus -v /run/systemd:/run/systemd -v /etc/docker:/etc/docker -it katadocker/kata-deploy kata-deploy-docker install
```
Once complete, `/etc/docker/daemon.json` is updated or created to include the Kata runtimes: kata-qemu and kata-fc, for utilizing
QEMU and Firecracker, respectively, for the VM isolation layer.
### Run a sample workload utilizing Kata containers:
Run a QEMU QEMU isolated Kata container:
```
docker run --runtime=kata-qemu -itd alpine
```
Run a Firecracker isolated Kata container:
```
docker run --runtime=kata-fc -itd alpine
```
### Remove Kata
To uninstall:
```
docker run -v /opt/kata:/opt/kata -v /var/run/dbus:/var/run/dbus -v /run/systemd:/run/systemd -v /etc/docker:/etc/docker -it katadocker/kata-deploy kata-deploy-docker remove
```
After completing, the original daemon.json, if it existed, is restored and all Kata artifacts from /opt/kata are removed.
## Kubernetes quick start
### Install Kata on a running Kubernetes cluster