From a67bdc369adef1720a68d210433b84c224542a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 31 Mar 2021 15:26:03 +0200 Subject: [PATCH] docs: Update snap install guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As this repo is specific to the kata-containers 2.x, let's stop mentioning / referring to the 1.x here, including how to setup and use the snap package for 1.x. Fixes: #1601 Signed-off-by: Fabiano FidĂȘncio (cherry picked from commit 4a38ff41f08760f2c2ef1c93730732f2dd42be18) --- docs/install/snap-installation-guide.md | 59 ++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 7 deletions(-) diff --git a/docs/install/snap-installation-guide.md b/docs/install/snap-installation-guide.md index a4660511fc..3a96b12a3f 100644 --- a/docs/install/snap-installation-guide.md +++ b/docs/install/snap-installation-guide.md @@ -1,13 +1,58 @@ -# Install Kata Containers from `snapcraft.io` +# Kata Containers snap package + +* [Install Kata Containers](#install-kata-containers) +* [Configure Kata Containers](#configure-kata-containers) +* [Integration with shim v2 Container Engines](#integration-with-shim-v2-container-engines) +* [Remove Kata Containers snap package](#remove-kata-containers-snap-package) + + +## Install Kata Containers Kata Containers can be installed in any Linux distribution that supports [snapd](https://docs.snapcraft.io/installing-snapd). -Run the following command to install Kata Containers: +Run the following command to install **Kata Containers**: - ```bash - $ sudo snap install kata-containers --classic - ``` +```sh +$ sudo snap install kata-containers --candidate --classic +``` -For further information on integrating and configuring the `snap` Kata Containers install, -refer to the [Kata Containers packaging `snap` documentation](https://github.com/kata-containers/packaging/blob/master/snap/README.md#configure-kata-containers). +## 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 Containers supports loading a configuration file from another +path than the default. + +```sh +$ 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 shim v2 Container Engines + +The Container engine daemon (`cri-o`, `containerd`, etc) needs to be able to find the +`containerd-shim-kata-v2` binary to allow Kata Containers to be created. +Run the following command to create a symbolic link to the shim v2 binary. + +```sh +$ sudo ln -sf /snap/kata-containers/current/usr/bin/containerd-shim-kata-v2 /usr/local/bin/containerd-shim-kata-v2 +``` + +Once the symbolic link has been created and the engine daemon configured, `io.containerd.kata.v2` +can be used as runtime. + +Read the following documents to know how to run Kata Containers 2.x with `containerd`. + +* [How to use Kata Containers and Containerd](https://github.com/kata-containers/kata-containers/blob/main/docs/how-to/containerd-kata.md) +* [Install Kata Containers with containerd](https://github.com/kata-containers/kata-containers/blob/main/docs/install/container-manager/containerd/containerd-install.md) + + +## Remove Kata Containers snap package + +Run the following command to remove the Kata Containers snap: + +```sh +$ sudo snap remove kata-containers +```