forked from kata-containers/kata-containers
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a containerd installation guide and a new `kata-manager` script for 2.0 that automated the steps outlined in the guide. Also cleaned up and improved the installation documentation in various ways, the most significant being: - Added legacy install link for 1.x installs. - Official packages section: - Removed "Contact" column (since it was empty!) - Reworded "Versions" column to clarify the versions are a minimum (to reduce maintenance burden). - Add a column to show which installation methods receive automatic updates. - Modified order of installation options in table and document to de-emphasise automatic installation and promote official packages and snap more. - Removed sections no longer relevant for 2.0. Fixes: kata-containers#738. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
- Loading branch information
1 parent
5d8d1bf
commit 7553724
Showing
6 changed files
with
809 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
docs/install/container-manager/containerd/containerd-install.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# Install Kata Containers with containerd | ||
|
||
> **Note:** | ||
> | ||
> - If Kata Containers and / or containerd are packaged by your distribution, | ||
> we recommend you install these versions to ensure they are updated when | ||
> new releases are available. | ||
> **Warning:** | ||
> | ||
> - These instructions install the **newest** versions of Kata Containers and | ||
> containerd from binary release packages. These versions may not have been | ||
> tested with your distribution version. | ||
> | ||
> - Since your package manager is not being used, it is **your** | ||
> responsibility to ensure these packages are kept up-to-date when new | ||
> versions are released. | ||
> | ||
> - If you decide to proceed and install a Kata Containers release, you can | ||
> still check for the latest version of Kata Containers by running | ||
> `kata-runtime kata-check --only-list-releases`. | ||
> | ||
> - These instructions will not work for Fedora 31 and higher since those | ||
> distribution versions only support cgroups version 2 by default. However, | ||
> Kata Containers currently requires cgroups version 1 (on the host side). See | ||
> https://github.com/kata-containers/kata-containers/issues/927 for further | ||
> details. | ||
## Install Kata Containers | ||
|
||
> **Note:** | ||
> | ||
> If your distribution packages Kata Containers, we recommend you install that | ||
> version. If it does not, or you wish to perform a manual installation, | ||
> continue with the steps below. | ||
- Download a release from: | ||
|
||
- https://github.com/kata-containers/kata-containers/releases | ||
|
||
Note that Kata Containers uses [semantic versioning](https://semver.org) so | ||
you should install a version that does *not* include a dash ("-"), since this | ||
indicates a pre-release version. | ||
|
||
- Unpack the downloaded archive. | ||
|
||
Kata Containers packages use a `/opt/kata/` prefix so either add that to | ||
your `PATH`, or create symbolic links for the following commands. The | ||
advantage of using symbolic links is that the `systemd(1)` configuration file | ||
for containerd will not need to be modified to allow the daemon to find this | ||
binary (see the [section on installing containerd](#install-containerd) below). | ||
|
||
| Command | Description | | ||
|-|-| | ||
| `/opt/kata/bin/containerd-shim-kata-v2` | The main Kata 2.x binary | | ||
| `/opt/kata/bin/kata-collect-data.sh` | Data collection script used for [raising issues](https://github.com/kata-containers/kata-containers/issues) | | ||
| `/opt/kata/bin/kata-runtime` | Utility command | | ||
|
||
- Check installation by showing version details: | ||
|
||
```bash | ||
$ kata-runtime --version | ||
``` | ||
|
||
## Install containerd | ||
|
||
> **Note:** | ||
> | ||
> If your distribution packages containerd, we recommend you install that | ||
> version. If it does not, or you wish to perform a manual installation, | ||
> continue with the steps below. | ||
- Download a release from: | ||
|
||
- https://github.com/containerd/containerd/releases | ||
|
||
- Unpack the downloaded archive. | ||
|
||
- Configure containerd | ||
|
||
- Download the standard `systemd(1)` service file and install to | ||
`/etc/systemd/system/`: | ||
|
||
- https://raw.githubusercontent.com/containerd/containerd/master/containerd.service | ||
|
||
> **Notes:** | ||
> | ||
> - You will need to reload the systemd configuration after installing this | ||
> file. | ||
> | ||
> - If you have not created a symbolic link for | ||
> `/opt/kata/bin/containerd-shim-kata-v2`, you will need to modify this | ||
> file to ensure the containerd daemon's `PATH` contains `/opt/kata/`. | ||
> See the `Environment=` command in `systemd.exec(5)` for further | ||
> details. | ||
- Add the Kata Containers configuration to the containerd configuration file: | ||
|
||
```toml | ||
[plugins] | ||
[plugins.cri] | ||
[plugins.cri.containerd] | ||
default_runtime_name = "kata" | ||
|
||
[plugins.cri.containerd.runtimes.kata] | ||
runtime_type = "io.containerd.kata.v2" | ||
``` | ||
|
||
> **Note:** | ||
> | ||
> The containerd daemon needs to be able to find the | ||
> `containerd-shim-kata-v2` binary to allow Kata Containers to be created. | ||
- Start the containerd service. | ||
|
||
## Test the installation | ||
|
||
You are now ready to run Kata Containers. You can perform a simple test by | ||
running the following commands: | ||
|
||
```bash | ||
$ image="docker.io/library/busybox:latest" | ||
$ sudo ctr image pull "$image" | ||
$ sudo ctr run --runtime "io.containerd.kata.v2" --rm -t "$image" test-kata uname -r | ||
``` | ||
|
||
The last command above shows details of the kernel version running inside the | ||
container, which will likely be different to the host kernel version. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.