Files
kata-containers/snap
Jose Carlos Venegas Munoz dce0558ec6 kernel: use patches per kernel version.
Using only one directory to hold kernel patches lead to
difficult maintenance. Instead use a list of patches per
kernel version.

If patches for a kernel version does not exist, dont fail.

Fixes: #308

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-04-24 16:25:13 -05:00
..

Kata Containers snap image

This directory contains the resources needed to build the Kata Containers snap image.

Initial setup

Ubuntu 18.04

$ sudo apt-get install -y snapd snapcraft

Install snap

You can install the Kata Containers snap from the snapcraft store or by running the following command:

$ sudo snap install kata-containers

Build and install snap image

Run next command at the root directory of the packaging repository.

$ make snap

To install the resulting snap image, snap must be put in classic mode and the security confinement must be disabled (--classic). Also since the resulting snap has not been signed the verification of signature must be omitted (--dangerous).

$ sudo snap install --classic --dangerous kata-containers_[VERSION]_[ARCH].snap

Replace VERSION with the current version of Kata Containers and ARCH with the system architecture.

Configure Kata Containers

By default Kata Containers snap image is mounted at /snap/kata-containers as a read-only file system, therefore default configuration file can not be edited. Fortunately kata-runtime supports loading a configuration file from another path than the default.

$ sudo mkdir -p /etc/kata-containers
$ sudo cp /snap/kata-containers/current/usr/share/defaults/kata-containers/configuration.toml /etc/kata-containers/
$ $EDITOR /etc/kata-containers/configuration.toml

Integration with docker and kubernetes

The path to the runtime provided by the Kata Containers snap image is /snap/kata-containers/current/usr/bin/kata-runtime. You should use it to run Kata Containers with docker and kubernetes.

Remove snap

You can remove the Kata Containers snap by running the following command:

$ sudo snap remove kata-containers

Limitations

The miniOS image is not included in the snap image as it is not possible for QEMU to open a guest RAM backing store on a read-only filesystem. Fortunately, you can start Kata Containers with a Linux initial RAM disk (initrd) that is included in the snap image. If you want to use the miniOS image instead of initrd, then a new configuration file can be created and configured.