From 6bdc6d6864d94518f5b6175f8d18ac160910847d Mon Sep 17 00:00:00 2001 From: jakub-racek-swi Date: Tue, 8 Oct 2024 08:55:05 +0000 Subject: [PATCH 01/18] Add 'rocky' to supported kernels Signed-off-by: jakub-racek-swi --- collector/kernel/kernel_headers.sh | 7 +++++-- common/linux_distro.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/collector/kernel/kernel_headers.sh b/collector/kernel/kernel_headers.sh index e8509061..189b0046 100755 --- a/collector/kernel/kernel_headers.sh +++ b/collector/kernel/kernel_headers.sh @@ -56,7 +56,7 @@ function detect_distro { if [[ -e "${os_release_file}" ]]; then os_id="$(grep '^ID=' "${os_release_file}" 2> /dev/null | sed -e 's/ID=\(.*\)/\1/g' -e 's/"//g')" case "${os_id}" in - debian | ubuntu | centos | amazon | rhel) + debian | ubuntu | centos | amazon | rhel | rocky) echo "${os_id}" return ;; @@ -79,6 +79,9 @@ function detect_distro { elif grep 'RHEL' "${system_release_file}" > /dev/null 2> /dev/null; then echo "rhel" return + elif grep 'Rocky Linux' "${system_release_file}" > /dev/null 2> /dev/null; then + echo "rocky" + return elif grep 'Amazon Linux' "${system_release_file}" > /dev/null 2> /dev/null; then echo "amazon" return @@ -391,7 +394,7 @@ function install_kernel_headers { debian | ubuntu) install_apt_kernel_headers ;; - centos | rhel | amazon) + centos | rhel | amazon | rocky) install_yum_kernel_headers ;; gcp_cos) diff --git a/common/linux_distro.h b/common/linux_distro.h index b9df96f0..fd6eb352 100644 --- a/common/linux_distro.h +++ b/common/linux_distro.h @@ -16,6 +16,7 @@ X(rhel, 3, "") \ X(centos, 4, "") \ X(amazon, 5, "") \ - X(gcp_cos, 6, "") + X(gcp_cos, 6, "") \ + X(rocky, 7, "") #define ENUM_DEFAULT unknown #include From fb5e6f758333e3a6c3366122e03be214f545fbfc Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Wed, 9 Oct 2024 10:09:04 +0200 Subject: [PATCH 02/18] Add rocky linux to test --- test/kernel/distros-and-kernels.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/kernel/distros-and-kernels.sh b/test/kernel/distros-and-kernels.sh index f93a52fa..e0d34c28 100644 --- a/test/kernel/distros-and-kernels.sh +++ b/test/kernel/distros-and-kernels.sh @@ -8,5 +8,6 @@ distros_and_kernels=( "ubuntu bionic64" "ubuntu focal64" "ubuntu jammy64" +"rockylinux 8" ) From aa61b89861b05d981b3b765d212f43e084421c26 Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Wed, 9 Oct 2024 10:56:01 +0200 Subject: [PATCH 03/18] Try another box --- test/kernel/distros-and-kernels.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/kernel/distros-and-kernels.sh b/test/kernel/distros-and-kernels.sh index e0d34c28..d0dd813f 100644 --- a/test/kernel/distros-and-kernels.sh +++ b/test/kernel/distros-and-kernels.sh @@ -8,6 +8,6 @@ distros_and_kernels=( "ubuntu bionic64" "ubuntu focal64" "ubuntu jammy64" -"rockylinux 8" +"bento rockylinux-8" ) From a2a177b85b4b41546ab6aeea3b7e185c53581ce7 Mon Sep 17 00:00:00 2001 From: etichy Date: Wed, 9 Oct 2024 13:06:40 +0200 Subject: [PATCH 04/18] Fix --- .../data/bento-install-kernel-headers.sh | 11 ++++++ test/kernel/source/data/bento-provision.sh | 38 +++++++++++++++++++ .../data/bento-uninstall-kernel-headers.sh | 15 ++++++++ 3 files changed, 64 insertions(+) create mode 100644 test/kernel/source/data/bento-install-kernel-headers.sh create mode 100644 test/kernel/source/data/bento-provision.sh create mode 100644 test/kernel/source/data/bento-uninstall-kernel-headers.sh diff --git a/test/kernel/source/data/bento-install-kernel-headers.sh b/test/kernel/source/data/bento-install-kernel-headers.sh new file mode 100644 index 00000000..d6470f5f --- /dev/null +++ b/test/kernel/source/data/bento-install-kernel-headers.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +set -xe + +uname -a + +export RUNNING_KERNEL_VERSION="`uname -r`" + +sudo yum install -y kernel-devel "${RUNNING_KERNEL_VERSION}" diff --git a/test/kernel/source/data/bento-provision.sh b/test/kernel/source/data/bento-provision.sh new file mode 100644 index 00000000..279455fc --- /dev/null +++ b/test/kernel/source/data/bento-provision.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +set -xe + +uname -a + +yum list + +yum install -y \ + curl \ + openssl + +if ! grep 'ID="amzn"' /etc/os-release +then + curl -fsSL https://get.docker.com/ | sh +else + # get.docker.com does not currently support amazon linux + yum install -y docker +fi + +usermod -aG docker vagrant +systemctl enable docker + +export RUNNING_KERNEL_VERSION="`uname -r`" +export RUNNING_KERNEL_ARCH="${RUNNING_KERNEL_VERSION##*-}" + +if [[ -n "${KERNEL_VERSION}" ]]; then + yum install -y kernel-"${KERNEL_VERSION}" + + if [ "${RUNNING_KERNEL_VERSION}" != "${KERNEL_VERSION}" ]; then + yum autoremove -y kernel-"${RUNNING_KERNEL_VERSION}" || true + yum autoremove -y kernel-"${RUNNING_KERNEL_ARCH}" || true + fi +else + yum update -y kernel +fi diff --git a/test/kernel/source/data/bento-uninstall-kernel-headers.sh b/test/kernel/source/data/bento-uninstall-kernel-headers.sh new file mode 100644 index 00000000..504c5776 --- /dev/null +++ b/test/kernel/source/data/bento-uninstall-kernel-headers.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +set -xe + +uname -a + +export RUNNING_KERNEL_VERSION="`uname -r`" +export RUNNING_KERNEL_ARCH="${RUNNING_KERNEL_VERSION##*-}" + +sudo yum autoremove -y kernel-devel "${RUNNING_KERNEL_VERSION}" || true +sudo yum autoremove -y kernel-headers "${RUNNING_KERNEL_VERSION}" || true +sudo yum autoremove -y kernel-devel "${RUNNING_KERNEL_ARCH}" || true +sudo yum autoremove -y kernel-headers "${RUNNING_KERNEL_ARCH}" || true From cae128f54e5644521312a93ae33fe2e7026a61ed Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Wed, 9 Oct 2024 13:12:06 +0200 Subject: [PATCH 05/18] Move centos scirpts to bento scripts --- .../data/centos-install-kernel-headers.sh | 11 ------ test/kernel/source/data/centos-provision.sh | 38 ------------------- .../data/centos-uninstall-kernel-headers.sh | 15 -------- 3 files changed, 64 deletions(-) delete mode 100755 test/kernel/source/data/centos-install-kernel-headers.sh delete mode 100755 test/kernel/source/data/centos-provision.sh delete mode 100755 test/kernel/source/data/centos-uninstall-kernel-headers.sh diff --git a/test/kernel/source/data/centos-install-kernel-headers.sh b/test/kernel/source/data/centos-install-kernel-headers.sh deleted file mode 100755 index d6470f5f..00000000 --- a/test/kernel/source/data/centos-install-kernel-headers.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -set -xe - -uname -a - -export RUNNING_KERNEL_VERSION="`uname -r`" - -sudo yum install -y kernel-devel "${RUNNING_KERNEL_VERSION}" diff --git a/test/kernel/source/data/centos-provision.sh b/test/kernel/source/data/centos-provision.sh deleted file mode 100755 index 279455fc..00000000 --- a/test/kernel/source/data/centos-provision.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -set -xe - -uname -a - -yum list - -yum install -y \ - curl \ - openssl - -if ! grep 'ID="amzn"' /etc/os-release -then - curl -fsSL https://get.docker.com/ | sh -else - # get.docker.com does not currently support amazon linux - yum install -y docker -fi - -usermod -aG docker vagrant -systemctl enable docker - -export RUNNING_KERNEL_VERSION="`uname -r`" -export RUNNING_KERNEL_ARCH="${RUNNING_KERNEL_VERSION##*-}" - -if [[ -n "${KERNEL_VERSION}" ]]; then - yum install -y kernel-"${KERNEL_VERSION}" - - if [ "${RUNNING_KERNEL_VERSION}" != "${KERNEL_VERSION}" ]; then - yum autoremove -y kernel-"${RUNNING_KERNEL_VERSION}" || true - yum autoremove -y kernel-"${RUNNING_KERNEL_ARCH}" || true - fi -else - yum update -y kernel -fi diff --git a/test/kernel/source/data/centos-uninstall-kernel-headers.sh b/test/kernel/source/data/centos-uninstall-kernel-headers.sh deleted file mode 100755 index 504c5776..00000000 --- a/test/kernel/source/data/centos-uninstall-kernel-headers.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -set -xe - -uname -a - -export RUNNING_KERNEL_VERSION="`uname -r`" -export RUNNING_KERNEL_ARCH="${RUNNING_KERNEL_VERSION##*-}" - -sudo yum autoremove -y kernel-devel "${RUNNING_KERNEL_VERSION}" || true -sudo yum autoremove -y kernel-headers "${RUNNING_KERNEL_VERSION}" || true -sudo yum autoremove -y kernel-devel "${RUNNING_KERNEL_ARCH}" || true -sudo yum autoremove -y kernel-headers "${RUNNING_KERNEL_ARCH}" || true From ab7aac872c5cf56e4ecbb228416bb2bb0db8e0b2 Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Wed, 9 Oct 2024 15:31:23 +0200 Subject: [PATCH 06/18] Install docker with yum on rocky --- test/kernel/source/data/bento-provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/kernel/source/data/bento-provision.sh b/test/kernel/source/data/bento-provision.sh index 279455fc..626fc1ed 100644 --- a/test/kernel/source/data/bento-provision.sh +++ b/test/kernel/source/data/bento-provision.sh @@ -12,7 +12,7 @@ yum install -y \ curl \ openssl -if ! grep 'ID="amzn"' /etc/os-release +if ! grep 'ID="amzn"' /etc/os-release && ! grep 'ID="rocky"' /etc/os-release then curl -fsSL https://get.docker.com/ | sh else From 5345b3a8f74c60f6b061aea59413bb50853d42a4 Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Wed, 9 Oct 2024 16:58:44 +0200 Subject: [PATCH 07/18] Fix docker installation rocky --- test/kernel/source/data/bento-provision.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/kernel/source/data/bento-provision.sh b/test/kernel/source/data/bento-provision.sh index 626fc1ed..a216168e 100644 --- a/test/kernel/source/data/bento-provision.sh +++ b/test/kernel/source/data/bento-provision.sh @@ -16,8 +16,13 @@ if ! grep 'ID="amzn"' /etc/os-release && ! grep 'ID="rocky"' /etc/os-release then curl -fsSL https://get.docker.com/ | sh else - # get.docker.com does not currently support amazon linux - yum install -y docker + # get.docker.com does not currently support rocky linux + dnf check-update + dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + dnf install docker-ce docker-ce-cli containerd.io + systemctl start docker + systemctl status docker + systemctl enable docker fi usermod -aG docker vagrant From df57c17637e2ed463751264754b7fd85f1cf5979 Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Wed, 9 Oct 2024 17:42:46 +0200 Subject: [PATCH 08/18] Skip update --- test/kernel/source/data/bento-provision.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/test/kernel/source/data/bento-provision.sh b/test/kernel/source/data/bento-provision.sh index a216168e..e374c307 100644 --- a/test/kernel/source/data/bento-provision.sh +++ b/test/kernel/source/data/bento-provision.sh @@ -17,7 +17,6 @@ then curl -fsSL https://get.docker.com/ | sh else # get.docker.com does not currently support rocky linux - dnf check-update dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo dnf install docker-ce docker-ce-cli containerd.io systemctl start docker From 0eaea37762e97cec618482c4935bcf4d9782d3da Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Thu, 10 Oct 2024 15:28:26 +0200 Subject: [PATCH 09/18] Non-interactive install --- test/kernel/source/data/bento-provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/kernel/source/data/bento-provision.sh b/test/kernel/source/data/bento-provision.sh index e374c307..2378619e 100644 --- a/test/kernel/source/data/bento-provision.sh +++ b/test/kernel/source/data/bento-provision.sh @@ -18,7 +18,7 @@ then else # get.docker.com does not currently support rocky linux dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo - dnf install docker-ce docker-ce-cli containerd.io + dnf install -y docker-ce docker-ce-cli containerd.io systemctl start docker systemctl status docker systemctl enable docker From f3cfcc6f4274f9f560039c0009b137fb1ca2456c Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Thu, 10 Oct 2024 16:23:15 +0200 Subject: [PATCH 10/18] Add execution right to bento sh scripts --- test/kernel/source/data/bento-install-kernel-headers.sh | 0 test/kernel/source/data/bento-provision.sh | 0 test/kernel/source/data/bento-uninstall-kernel-headers.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 test/kernel/source/data/bento-install-kernel-headers.sh mode change 100644 => 100755 test/kernel/source/data/bento-provision.sh mode change 100644 => 100755 test/kernel/source/data/bento-uninstall-kernel-headers.sh diff --git a/test/kernel/source/data/bento-install-kernel-headers.sh b/test/kernel/source/data/bento-install-kernel-headers.sh old mode 100644 new mode 100755 diff --git a/test/kernel/source/data/bento-provision.sh b/test/kernel/source/data/bento-provision.sh old mode 100644 new mode 100755 diff --git a/test/kernel/source/data/bento-uninstall-kernel-headers.sh b/test/kernel/source/data/bento-uninstall-kernel-headers.sh old mode 100644 new mode 100755 From 78d26a80018a9958c9c6390182358ac3752d483b Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Thu, 10 Oct 2024 17:16:34 +0200 Subject: [PATCH 11/18] Enable devel repo --- test/kernel/source/data/bento-install-kernel-headers.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/kernel/source/data/bento-install-kernel-headers.sh b/test/kernel/source/data/bento-install-kernel-headers.sh index d6470f5f..aa60f11e 100755 --- a/test/kernel/source/data/bento-install-kernel-headers.sh +++ b/test/kernel/source/data/bento-install-kernel-headers.sh @@ -8,4 +8,6 @@ uname -a export RUNNING_KERNEL_VERSION="`uname -r`" +dnf config-manager --set-enabled devel + sudo yum install -y kernel-devel "${RUNNING_KERNEL_VERSION}" From 4f35157ac7c8376af17a8103a49a447dd5144fab Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Thu, 10 Oct 2024 17:19:20 +0200 Subject: [PATCH 12/18] Change order of distro test --- test/kernel/distros-and-kernels.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/kernel/distros-and-kernels.sh b/test/kernel/distros-and-kernels.sh index d0dd813f..663ac63d 100644 --- a/test/kernel/distros-and-kernels.sh +++ b/test/kernel/distros-and-kernels.sh @@ -3,11 +3,11 @@ # SPDX-License-Identifier: Apache-2.0 distros_and_kernels=( +"bento rockylinux-8" "debian bullseye64" "bento amazonlinux-2" "ubuntu bionic64" "ubuntu focal64" "ubuntu jammy64" -"bento rockylinux-8" ) From 87574fd3917ad583736eaf085908d4538dffc169 Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Fri, 11 Oct 2024 08:08:38 +0200 Subject: [PATCH 13/18] Another way to enable devel repo --- test/kernel/source/data/bento-install-kernel-headers.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/kernel/source/data/bento-install-kernel-headers.sh b/test/kernel/source/data/bento-install-kernel-headers.sh index aa60f11e..f59010c6 100755 --- a/test/kernel/source/data/bento-install-kernel-headers.sh +++ b/test/kernel/source/data/bento-install-kernel-headers.sh @@ -8,6 +8,8 @@ uname -a export RUNNING_KERNEL_VERSION="`uname -r`" -dnf config-manager --set-enabled devel +sudo dnf install -y dnf-utils + +sudo dnf config-manager --set-enabled devel sudo yum install -y kernel-devel "${RUNNING_KERNEL_VERSION}" From 9687b3463612fce87ea3f9649dd2a3017b6dba74 Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Fri, 11 Oct 2024 10:07:37 +0200 Subject: [PATCH 14/18] Fix yum command for rockylinux --- test/kernel/source/data/bento-install-kernel-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/kernel/source/data/bento-install-kernel-headers.sh b/test/kernel/source/data/bento-install-kernel-headers.sh index f59010c6..882e7e44 100755 --- a/test/kernel/source/data/bento-install-kernel-headers.sh +++ b/test/kernel/source/data/bento-install-kernel-headers.sh @@ -12,4 +12,4 @@ sudo dnf install -y dnf-utils sudo dnf config-manager --set-enabled devel -sudo yum install -y kernel-devel "${RUNNING_KERNEL_VERSION}" +sudo yum install -y kernel-devel-"${RUNNING_KERNEL_VERSION}" From 3f7d08600c474bb910056ced1e7616991d1b401f Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Fri, 11 Oct 2024 12:14:36 +0200 Subject: [PATCH 15/18] Remove if for amazonlinux --- test/kernel/bootstrap.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/kernel/bootstrap.sh b/test/kernel/bootstrap.sh index eb840b7f..4c2e3b09 100755 --- a/test/kernel/bootstrap.sh +++ b/test/kernel/bootstrap.sh @@ -27,12 +27,7 @@ fi mkdir -p "${distro_path}" pushd "${distro_path}" -if [[ "${distro_name}" == "bento" && "${distro_version}" == "amazonlinux-2" ]] -then - script_distro_name="centos" -else - script_distro_name="${distro_name}" -fi +script_distro_name="${distro_name}" sed_args=( \ -e "s/PLACEHOLDER_BOX_DISTRO_NAME/${distro_name}/g" From 2ec0b146ec20e13ab546d912bcafc725d4019f99 Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Fri, 11 Oct 2024 13:06:04 +0200 Subject: [PATCH 16/18] Use yum because of amzn linux --- test/kernel/source/data/bento-install-kernel-headers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/kernel/source/data/bento-install-kernel-headers.sh b/test/kernel/source/data/bento-install-kernel-headers.sh index 882e7e44..0d6b219d 100755 --- a/test/kernel/source/data/bento-install-kernel-headers.sh +++ b/test/kernel/source/data/bento-install-kernel-headers.sh @@ -8,8 +8,8 @@ uname -a export RUNNING_KERNEL_VERSION="`uname -r`" -sudo dnf install -y dnf-utils +sudo yum install -y dnf-utils -sudo dnf config-manager --set-enabled devel +sudo yum config-manager --set-enabled devel sudo yum install -y kernel-devel-"${RUNNING_KERNEL_VERSION}" From e1ef9d6090a02855c31ff6bfb6a487d3c5bc5289 Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Fri, 11 Oct 2024 13:59:17 +0200 Subject: [PATCH 17/18] Another left dnf configs --- test/kernel/source/data/bento-provision.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/kernel/source/data/bento-provision.sh b/test/kernel/source/data/bento-provision.sh index 2378619e..6e0c2f39 100755 --- a/test/kernel/source/data/bento-provision.sh +++ b/test/kernel/source/data/bento-provision.sh @@ -17,8 +17,8 @@ then curl -fsSL https://get.docker.com/ | sh else # get.docker.com does not currently support rocky linux - dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo - dnf install -y docker-ce docker-ce-cli containerd.io + yum config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + yum install -y docker-ce docker-ce-cli containerd.io systemctl start docker systemctl status docker systemctl enable docker From fb56c9108753df25637d83f18b10d97132b458e1 Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Fri, 11 Oct 2024 14:38:47 +0200 Subject: [PATCH 18/18] Use if to switch between amzn and rocky --- .../source/data/bento-install-kernel-headers.sh | 12 +++++++++--- test/kernel/source/data/bento-provision.sh | 8 ++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/test/kernel/source/data/bento-install-kernel-headers.sh b/test/kernel/source/data/bento-install-kernel-headers.sh index 0d6b219d..8ec1326b 100755 --- a/test/kernel/source/data/bento-install-kernel-headers.sh +++ b/test/kernel/source/data/bento-install-kernel-headers.sh @@ -8,8 +8,14 @@ uname -a export RUNNING_KERNEL_VERSION="`uname -r`" -sudo yum install -y dnf-utils -sudo yum config-manager --set-enabled devel +if ! grep 'ID="amzn"' /etc/os-release +then + # rocky linux + sudo yum install -y dnf-utils + sudo yum config-manager --set-enabled devel + sudo yum install -y kernel-devel-"${RUNNING_KERNEL_VERSION}" +else + sudo yum install -y kernel-devel "${RUNNING_KERNEL_VERSION}" +fi -sudo yum install -y kernel-devel-"${RUNNING_KERNEL_VERSION}" diff --git a/test/kernel/source/data/bento-provision.sh b/test/kernel/source/data/bento-provision.sh index 6e0c2f39..6b9c9ce4 100755 --- a/test/kernel/source/data/bento-provision.sh +++ b/test/kernel/source/data/bento-provision.sh @@ -12,16 +12,16 @@ yum install -y \ curl \ openssl -if ! grep 'ID="amzn"' /etc/os-release && ! grep 'ID="rocky"' /etc/os-release +if ! grep 'ID="amzn"' /etc/os-release then - curl -fsSL https://get.docker.com/ | sh -else - # get.docker.com does not currently support rocky linux + # rocky linux yum config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum install -y docker-ce docker-ce-cli containerd.io systemctl start docker systemctl status docker systemctl enable docker +else + yum install -y docker fi usermod -aG docker vagrant