From ba9fa49a533ba4a33242f8dd224c9247fba636e5 Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Mon, 25 Jan 2021 13:22:00 -0500 Subject: [PATCH 1/3] osbuilder: Use Fedora and CentOS registries To avoid hitting quota limit on docker.io, this changes the Fedora and CentOS dockerfiles to pull the image from the projects registries. Fixes #1324 Signed-off-by: Wainer dos Santos Moschetta --- tools/osbuilder/image-builder/Dockerfile | 2 +- tools/osbuilder/rootfs-builder/centos/Dockerfile.in | 2 +- tools/osbuilder/rootfs-builder/fedora/Dockerfile.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/osbuilder/image-builder/Dockerfile b/tools/osbuilder/image-builder/Dockerfile index c32792258..535136aa0 100644 --- a/tools/osbuilder/image-builder/Dockerfile +++ b/tools/osbuilder/image-builder/Dockerfile @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: Apache-2.0 -From docker.io/fedora:latest +From registry.fedoraproject.org/fedora:latest RUN [ -n "$http_proxy" ] && sed -i '$ a proxy='$http_proxy /etc/dnf/dnf.conf ; true diff --git a/tools/osbuilder/rootfs-builder/centos/Dockerfile.in b/tools/osbuilder/rootfs-builder/centos/Dockerfile.in index c7714ad18..2e29195ea 100644 --- a/tools/osbuilder/rootfs-builder/centos/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/centos/Dockerfile.in @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: Apache-2.0 -From docker.io/centos:@OS_VERSION@ +From registry.centos.org/centos:@OS_VERSION@ @SET_PROXY@ diff --git a/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in b/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in index b67203341..5d66c5c47 100644 --- a/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: Apache-2.0 -From docker.io/fedora:@OS_VERSION@ +From registry.fedoraproject.org/fedora:@OS_VERSION@ @SET_PROXY@ From 1273e485d8b8537cca4daac237768807b97f50e0 Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Mon, 25 Jan 2021 14:55:31 -0500 Subject: [PATCH 2/3] osbuilder: Fix urls to repositories Changed the user-visible urls to point to the right Kata Containers files/repositories. Fixes #234 Signed-off-by: Wainer dos Santos Moschetta --- tools/osbuilder/image-builder/image_builder.sh | 2 +- tools/osbuilder/rootfs-builder/README.md | 2 +- tools/osbuilder/rootfs-builder/rootfs.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/osbuilder/image-builder/image_builder.sh b/tools/osbuilder/image-builder/image_builder.sh index 1cc18552c..6f18946b4 100755 --- a/tools/osbuilder/image-builder/image_builder.sh +++ b/tools/osbuilder/image-builder/image_builder.sh @@ -113,7 +113,7 @@ Rootfs: partition that contains the root filesystem (/usr, /bin, ect). Kernels and hypervisors that support DAX/NVDIMM read the MBR #2, otherwise MBR #1 is read. -[1] - https://github.com/kata-containers/osbuilder/blob/master/image-builder/nsdax.gpl.c +[1] - https://github.com/kata-containers/kata-containers/blob/main/tools/osbuilder/image-builder/nsdax.gpl.c [2] - https://github.com/torvalds/linux/blob/master/drivers/nvdimm/pfn.h EOT diff --git a/tools/osbuilder/rootfs-builder/README.md b/tools/osbuilder/rootfs-builder/README.md index 9ceb1b7a2..c49b58f86 100644 --- a/tools/osbuilder/rootfs-builder/README.md +++ b/tools/osbuilder/rootfs-builder/README.md @@ -50,7 +50,7 @@ $ ./rootfs.sh -r "$PWD/kata-overlay" The rootfs must provide at least the following components: -- [Kata agent](https://github.com/kata-containers/agent) +- [Kata agent](https://github.com/kata-containers/kata-containers/tree/main/src/agent) Path: `/bin/kata-agent` - Kata Containers guest. diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 4d69e89d9..b2330040b 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -147,7 +147,7 @@ DOCKER_RUNTIME Docker runtime to use when USE_DOCKER is set. Refer to the Platform-OS Compatibility Matrix for more details on the supported architectures: -https://github.com/kata-containers/osbuilder#platform-distro-compatibility-matrix +https://github.com/kata-containers/kata-containers/tree/main/tools/osbuilder#platform-distro-compatibility-matrix EOT exit "${error}" From fd39f0fa00da388d81d8c06d2e595f7a525bbf0b Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Wed, 2 Dec 2020 13:48:49 -0500 Subject: [PATCH 3/3] osbuilder: Add "Agent init" on terms glossary Include on the terms glossary some words about the agent init as later on README its explain how the agent can be switched between systemd and init. Signed-off-by: Wainer dos Santos Moschetta --- tools/osbuilder/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/osbuilder/README.md b/tools/osbuilder/README.md index 783a535a4..b6f9bd161 100644 --- a/tools/osbuilder/README.md +++ b/tools/osbuilder/README.md @@ -65,6 +65,13 @@ This section describes the terms used for all documentation in this repository. A guest OS build method where the building host is used as the Base OS. For more information refer to the [dracut homepage](https://dracut.wiki.kernel.org/index.php/Main_Page). +- Agent init + + The Guest OS should have the Kata Containers agent started on boot time. + + That is achieved by using a system manager (for example, systemd) which + will evoke the agent binary; or having the agent itself as the init process. + ## Building The top-level `Makefile` contains an example of how to use the available components.