osbuilder: Remove debian as a rootfs

Currently we do not have debian as part of the kata CI as we
do not have a mantainer, this PR removes debian as a supported
rootfs in order to have only the distros that we are supporting
and mantainining.

Fixes #3153

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
Gabriela Cervantes 2021-11-30 19:31:33 +00:00
parent 3e3e3a0253
commit 923e098db6
12 changed files with 10 additions and 113 deletions

View File

@ -235,7 +235,7 @@ then [Kata-deploy](https://github.com/kata-containers/kata-containers/tree/main/
is use to install Kata. This will make sure that the correct `agent` version
is installed into the rootfs in the steps below.
The following instructions use Debian as the root filesystem with systemd as
The following instructions use Ubuntu as the root filesystem with systemd as
the init and will add in the `kmod` binary, which is not a standard binary in
a Kata rootfs image. The `kmod` binary is necessary to load the Intel® QAT
kernel modules when the virtual machine rootfs boots.
@ -257,7 +257,7 @@ $ cd $GOPATH
$ export AGENT_VERSION=$(kata-runtime version | head -n 1 | grep -o "[0-9.]\+")
$ cd ${OSBUILDER}/rootfs-builder
$ sudo rm -rf ${ROOTFS_DIR}
$ script -fec 'sudo -E GOPATH=$GOPATH USE_DOCKER=true SECCOMP=no ./rootfs.sh debian'
$ script -fec 'sudo -E GOPATH=$GOPATH USE_DOCKER=true SECCOMP=no ./rootfs.sh ubuntu'
```
### Compile Intel® QAT drivers for Kata Containers kernel and add to Kata Containers rootfs

View File

@ -43,7 +43,6 @@ type testDataDistro struct {
var distros = []string{
"centos",
"clear-linux-os",
"debian",
"fedora",
"opensuse",
"rhel",

View File

@ -16,7 +16,7 @@ ENV QAT_DRIVER_URL "https://downloadmirror.intel.com/649693/${QAT_DRIVER_VER}"
ENV QAT_CONFIGURE_OPTIONS "--enable-icp-sriov=guest"
ENV KATA_REPO_VERSION "main"
ENV AGENT_VERSION ""
ENV ROOTFS_OS "debian"
ENV ROOTFS_OS "ubuntu"
ENV OUTPUT_DIR "/output"
RUN dnf install -y \

View File

@ -10,7 +10,6 @@ to use. The following rootfs OS's have been tested with this Dockerfile.
* CentOS
* Clear Linux
* Debian
* Fedora
* SUSE
* Ubuntu
@ -75,7 +74,7 @@ latest stable version of Kata Containers.
| `QAT_CONFIGURE_OPTIONS` | `configure` options for QAT driver | `--enable-icp-sriov=guest` |
| `QAT_DRIVER_URL` | URL to curl QAT driver from | `https://01.org/sites/default/files/downloads/${QAT_DRIVER_VER}` |
| `QAT_DRIVER_VER` | QAT driver version to use | `qat1.7.l.4.9.0-00008.tar.gz` |
| `ROOTFS_OS` | Operating system to use for the rootfs | `debian` |
| `ROOTFS_OS` | Operating system to use for the rootfs | `ubuntu` |
Variables can be set on the `docker run` commandline, for example:

View File

@ -71,7 +71,7 @@ build_rootfs()
# This should only be done for Ubuntu and Debian based OS's. Other OS
# distributions had issues if building the rootfs from /proc
if [ "${ROOTFS_OS}" == "debian" ] || [ "${ROOTFS_OS}" == "ubuntu" ]; then
if [ "${ROOTFS_OS}" == "ubuntu" ]; then
cd /proc
fi
/bin/echo -e "\n\e[1;42mDownload ${ROOTFS_OS} based rootfs\e[0m"

View File

@ -1,34 +0,0 @@
#
# Copyright (c) 2020 ARM Limited
#
# SPDX-License-Identifier: Apache-2.0
ARG IMAGE_REGISTRY=docker.io
# NOTE: OS_VERSION is set according to config.sh
FROM ${IMAGE_REGISTRY}/debian:@OS_VERSION@
# RUN commands
RUN apt-get update && apt-get install -y \
autoconf \
automake \
binutils \
build-essential \
chrony \
coreutils \
curl \
debianutils \
debootstrap \
g++ \
gcc \
git \
libc-dev \
libstdc++-6-dev \
m4 \
make \
sed \
systemd \
tar \
vim
# This will install the proper packages to build Kata components
@INSTALL_MUSL@
@INSTALL_RUST@

View File

@ -1,40 +0,0 @@
#
# Copyright (c) 2018 SUSE
#
# SPDX-License-Identifier: Apache-2.0
ARG IMAGE_REGISTRY=docker.io
# NOTE: OS_VERSION is set according to config.sh
FROM ${IMAGE_REGISTRY}/debian:@OS_VERSION@
# RUN commands
RUN apt-get update && apt-get --no-install-recommends install -y \
apt-utils \
autoconf \
automake \
binutils \
build-essential \
ca-certificates \
chrony \
coreutils \
curl \
debianutils \
debootstrap \
g++ \
gcc \
git \
libc-dev \
libstdc++-6-dev \
m4 \
make \
musl \
musl-dev \
musl-tools \
sed \
systemd \
tar \
vim \
wget
# This will install the proper packages to build Kata components
@INSTALL_RUST@

View File

@ -1,20 +0,0 @@
#
# Copyright (c) 2018 SUSE
#
# SPDX-License-Identifier: Apache-2.0
OS_VERSION=${OS_VERSION:-9.5}
# Set OS_NAME to the desired debian "codename"
OS_NAME=${OS_NAME:-"stretch"}
PACKAGES="systemd coreutils init chrony kmod"
# NOTE: Re-using ubuntu rootfs configuration, see 'ubuntu' folder for full content.
source $script_dir/ubuntu/$CONFIG_SH
# Init process must be one of {systemd,kata-agent}
INIT_PROCESS=systemd
# List of zero or more architectures to exclude from build,
# as reported by `uname -m`
ARCH_EXCLUDE_LIST=()

View File

@ -1,7 +0,0 @@
#
# Copyright (c) 2018 SUSE
#
# SPDX-License-Identifier: Apache-2.0
# NOTE: Re-using ubuntu rootfs lib, see 'ubuntu' folder for details.
source ${script_dir}/ubuntu/$LIB_SH

View File

@ -193,7 +193,7 @@ docker_extra_args()
args+=" -v ${gentoo_local_portage_dir}:/usr/portage/packages"
args+=" --volumes-from ${gentoo_portage_container}"
;;
debian | ubuntu | suse)
ubuntu | suse)
source /etc/os-release
case "$ID" in
@ -519,8 +519,8 @@ EOT
chrony_conf_file="${ROOTFS_DIR}/etc/chrony/chrony.conf"
chrony_systemd_service="${ROOTFS_DIR}/lib/systemd/system/chronyd.service"
;;
"ubuntu" | "debian")
echo "I am ubuntu or debian"
"ubuntu")
echo "I am ubuntu"
chrony_conf_file="${ROOTFS_DIR}/etc/chrony/chrony.conf"
chrony_systemd_service="${ROOTFS_DIR}/lib/systemd/system/chrony.service"
;;

View File

@ -122,7 +122,7 @@ setup()
case "$distro" in
centos|rhel) $chronic sudo -E yum -y install "$pkg" ;;
debian|ubuntu) $chronic sudo -E apt-get --no-install-recommends install -y "$pkg" ;;
ubuntu) $chronic sudo -E apt-get --no-install-recommends install -y "$pkg" ;;
fedora) $chronic sudo -E dnf -y install "$pkg" ;;
opensuse|sles) $chronic sudo -E zypper -y install "$pkg" ;;
*) die "do not know how to install command $pkg' for distro '$distro'" ;;

View File

@ -290,7 +290,7 @@ check_deps()
case "$ID" in
centos|rhel) sudo yum -y install $packages ;;
debian|ubuntu) sudo apt-get -y install $packages ;;
ubuntu) sudo apt-get -y install $packages ;;
fedora) sudo dnf -y install $packages ;;
opensuse*|sles) sudo zypper install -y $packages ;;
*) die "Unsupported distro: $ID"