From 2d76821f423b62df3ed4c2e2991d653d1cc31526 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Fri, 26 Apr 2019 10:33:11 +0100 Subject: [PATCH 1/6] docs: Make CentOS docker guide consistent Fix wording in CentOS docker install guide to make it consistent with the others. Signed-off-by: James O. D. Hunt --- install/docker/centos-docker-install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/docker/centos-docker-install.md b/install/docker/centos-docker-install.md index bb58e8c83e..1bb4ea638c 100644 --- a/install/docker/centos-docker-install.md +++ b/install/docker/centos-docker-install.md @@ -65,4 +65,4 @@ ``` The previous command shows details of the kernel version running inside the - container, which is different from the host kernel version. + container, which is different to the host kernel version. From adb1ca046f44c5327f64a4766a91db54aa250c70 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Fri, 26 Apr 2019 11:01:12 +0100 Subject: [PATCH 2/6] docs: Make SLES docker guide consistent Fix wording to make the SUSE SLES docker install guide consistent with the others. Signed-off-by: James O. D. Hunt --- install/docker/sles-docker-install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/docker/sles-docker-install.md b/install/docker/sles-docker-install.md index 206b37bd23..23c5cf4c5c 100644 --- a/install/docker/sles-docker-install.md +++ b/install/docker/sles-docker-install.md @@ -20,7 +20,7 @@ For more information on installing Docker please refer to the [Docker Guide](https://www.suse.com/documentation/sles-12/singlehtml/book_sles_docker/book_sles_docker.html). -2. Configure Docker to use Kata Containers with one of the following methods: +2. Configure Docker to use Kata Containers by default with one of the following methods: 1. systemd From 74bbd537d93f33054d44aae194123b755aaad52a Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Fri, 26 Apr 2019 10:46:34 +0100 Subject: [PATCH 3/6] docs: Fix debian docker install Fix installing docker on Debian by changing the docker install guide to ensure that only the `kata-containers.conf` systemd service snippet is created. Previously, both the snippet and the `daemon.json` Docker config files were being updated because the latter also specified a bash code block. Note that the `daemon.json` section is now consistent with the other install guides - it just displays the JSON code to add rather than trying to set it. Also, added missing shell prompts, changed code blocks into shell (but not bash) code blocks and fixed a few minor grammar and whitespace issues. For further details, see: - https://github.com/kata-containers/documentation/blob/master/Documentation-Requirements.md - https://github.com/kata-containers/tests/tree/master/cmd/kata-manager Fixes #442. Signed-off-by: James O. D. Hunt --- install/docker/debian-docker-install.md | 29 +++++++++++-------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/install/docker/debian-docker-install.md b/install/docker/debian-docker-install.md index 9cf9bbc7fa..136d308cc3 100644 --- a/install/docker/debian-docker-install.md +++ b/install/docker/debian-docker-install.md @@ -31,7 +31,7 @@ a. sysVinit - with sysVinit, docker config is stored in `/etc/default/docker`, edit the options similar to the following: - ``` + ```sh $ sudo sh -c "echo '# specify docker runtime for kata-containers DOCKER_OPTS=\"-D --add-runtime kata-runtime=/usr/bin/kata-runtime --default-runtime=kata-runtime\"' >> /etc/default/docker" ``` @@ -47,34 +47,34 @@ b. systemd EOF ``` -c. systemd Docker `daemon.json` +c. Docker `daemon.json` Add the following definitions to `/etc/docker/daemon.json`: - ```bash - $ sudo sh -c "echo '{ - \"default-runtime\": \"kata-runtime\", - \"runtimes\": { - \"kata-runtime\": { - \"path\": \"/usr/bin/kata-runtime\" + ```json + { + "default-runtime": "kata-runtime", + "runtimes": { + "kata-runtime": { + "path": "/usr/bin/kata-runtime" } } - }' >> /etc/docker/daemon.json" + } ``` 3. Restart the Docker systemd service with one of the following (depending on init choice): a. sysVinit - ```bash + ```sh $ sudo /etc/init.d/docker stop $ sudo /etc/init.d/docker start ``` - to watch for errors: + To watch for errors: - ```bash - tail -f /var/log/docker.log + ```sh + $ tail -f /var/log/docker.log ``` b. systemd @@ -94,6 +94,3 @@ c. systemd Docker `daemon.json` The previous command shows details of the kernel version running inside the container, which is different to the host kernel version. - - - From a943be8da130e25ac2a8d62e00205551b721ebea Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Fri, 26 Apr 2019 11:01:55 +0100 Subject: [PATCH 4/6] docs: Fix indent in docker install guides Don't indent unnecessarily. Signed-off-by: James O. D. Hunt --- install/docker/centos-docker-install.md | 62 ++++++++++++------------- install/docker/fedora-docker-install.md | 42 ++++++++--------- install/docker/rhel-docker-install.md | 42 ++++++++--------- install/docker/ubuntu-docker-install.md | 42 ++++++++--------- 4 files changed, 94 insertions(+), 94 deletions(-) diff --git a/install/docker/centos-docker-install.md b/install/docker/centos-docker-install.md index 1bb4ea638c..a4023ca841 100644 --- a/install/docker/centos-docker-install.md +++ b/install/docker/centos-docker-install.md @@ -23,46 +23,46 @@ 2. Configure Docker to use Kata Containers by default with one of the following methods: - 1. systemd + 1. systemd - ```bash - $ sudo mkdir -p /etc/systemd/system/docker.service.d/ - $ cat < Date: Fri, 26 Apr 2019 11:06:53 +0100 Subject: [PATCH 5/6] docs: Fix whitespace in Ubuntu install guide Fix missing newline. Signed-off-by: James O. D. Hunt --- install/ubuntu-installation-guide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/install/ubuntu-installation-guide.md b/install/ubuntu-installation-guide.md index ba1fe37993..a42283eb92 100644 --- a/install/ubuntu-installation-guide.md +++ b/install/ubuntu-installation-guide.md @@ -1,6 +1,7 @@ # Install Kata Containers on Ubuntu 1. Install the Kata Containers components with the following commands: + ```bash $ ARCH=$(arch) $ BRANCH="${BRANCH:-master}" From 2f3a8f51f7b2077760a6815d94733c71be4eb46e Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Fri, 26 Apr 2019 11:07:19 +0100 Subject: [PATCH 6/6] docs: Fix outdent in Debian install guide Remove the outdent in the Debian install guide. Signed-off-by: James O. D. Hunt --- install/debian-installation-guide.md | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/install/debian-installation-guide.md b/install/debian-installation-guide.md index 6897d1d455..470aab64e4 100644 --- a/install/debian-installation-guide.md +++ b/install/debian-installation-guide.md @@ -2,30 +2,30 @@ 1. Install the unsatisfied dependencies - Kata Containers packages depends on a version of `librbd1` that's not yet available in the `stable` repo. - A more recent version of `librbd1` can be installed from the `unstable` repo: https://packages.debian.org/sid/librbd1 + Kata Containers packages depends on a version of `librbd1` that's not yet available in the `stable` repo. + A more recent version of `librbd1` can be installed from the `unstable` repo: https://packages.debian.org/sid/librbd1 - Add `unstable` repo to `/etc/apt/sources.list.d/unstable.list` sources list: - - ```bash - $ sudo sh -c "echo '# for unstable packages - deb http://ftp.debian.org/debian/ unstable main contrib non-free - deb-src http://ftp.debian.org/debian/ unstable main contrib non-free' > /etc/apt/sources.list.d/unstable.list" - ``` - - Set the repository to a lower priority than stable, to ensures that APT will prefer stable packages over unstable ones. This can be specified in `/etc/apt/preferences.d/unstable`: - - ```bash - $ sudo sh -c "echo 'Package: * - Pin: release a=unstable - Pin-Priority: 10' >> /etc/apt/preferences.d/unstable" - ``` + Add `unstable` repo to `/etc/apt/sources.list.d/unstable.list` sources list: - Finally, install `librbd1`: + ```bash + $ sudo sh -c "echo '# for unstable packages + deb http://ftp.debian.org/debian/ unstable main contrib non-free + deb-src http://ftp.debian.org/debian/ unstable main contrib non-free' > /etc/apt/sources.list.d/unstable.list" + ``` - ```bash - $ sudo apt-get update && sudo apt-get install -y -t unstable librbd1 - ``` + Set the repository to a lower priority than stable, to ensures that APT will prefer stable packages over unstable ones. This can be specified in `/etc/apt/preferences.d/unstable`: + + ```bash + $ sudo sh -c "echo 'Package: * + Pin: release a=unstable + Pin-Priority: 10' >> /etc/apt/preferences.d/unstable" + ``` + + Finally, install `librbd1`: + + ```bash + $ sudo apt-get update && sudo apt-get install -y -t unstable librbd1 + ``` 2. Install the Kata Containers components with the following commands: