-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding KVM tier-0 rpm subpackage testing
KVM tier-0 tests dedicated for kvm tests. It checks /dev/kvm. nested virtualization exist. In case not, it removes qm_mount_bind_kvm rpm, in case installed by packit. Test check_qm_setup_succeeds is the irst test to run, The test check repo setup script is working properly Packit support for nested kvm support added currently for fedora/c9s Kvm tests should be introduced later. Introducing QM quadlets drop-ins for extending qm.container base quadlet. Using as single point of configuration. Replacing the usage of containers.conf Fedora is failing due to #666 Signed-off-by: Yariv Rachmani <[email protected]>
- Loading branch information
Showing
15 changed files
with
153 additions
and
68 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
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
8 changes: 3 additions & 5 deletions
8
...ners.conf.d/qm_dropin_mount_bind_kvm.conf → ...container.d/qm_dropin_mount_bind_kvm.conf
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# Drop-in configuration for Podman to mount bind /dev/kvm from host to container | ||
# | ||
[containers] | ||
devices = [ | ||
"/dev/kvm:/dev/kvm", | ||
"/dev/net/tun:/dev/net/tun" | ||
] | ||
[Container] | ||
AddDevice=-/dev/net/tun | ||
AddDevice=-/dev/kvm |
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,19 @@ | ||
summary: Kvm Tier 0 - QM sanity test | ||
|
||
discover: | ||
how: fmf | ||
filter: 'tier:0&tag:kvm' | ||
|
||
prepare+: | ||
#Enable copr and install rpms | ||
- name: Expose /dev kvm to QM | ||
script: | | ||
cd tests/e2e | ||
bash ./lib/repoutils | ||
|
||
execute: | ||
how: tmt | ||
|
||
report: | ||
how: junit | ||
|
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
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
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
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
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,78 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright 2023 The qm Authors | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; If not, see <http://www.gnu.org/licenses/>. | ||
|
||
install_autosd_repo() { | ||
########################################################################### | ||
# Description: # | ||
# Install autosd repository # | ||
# # | ||
# Arguments: # | ||
# None # | ||
########################################################################### | ||
|
||
touch /etc/yum.repos.d/autosd.repo | ||
cat > "/etc/yum.repos.d/autosd.repo" << EOF | ||
[autosd] | ||
name=Automotive-Sig \$releasever | ||
baseurl=https://autosd.sig.centos.org/AutoSD-9/nightly/repos/AutoSD/compose/AutoSD/\$basearch/os | ||
enabled=1 | ||
gpgcheck=0 | ||
EOF | ||
} | ||
|
||
|
||
install_qm_rpms() { | ||
########################################################################### | ||
# Description: # | ||
# Enable and install necessary qm rpms and eendencies # | ||
# # | ||
# Arguments: Should be exported by calling script # | ||
# USE_QM_COPR: copr repo to install # | ||
########################################################################### | ||
|
||
if [[ -n "${USE_QM_COPR}" ]]; then | ||
USE_QM_COPR="${PACKIT_COPR_PROJECT:-rhcontainerbot/qm}" | ||
fi | ||
info_message "Installing qm setup rpm" | ||
info_message "Installing qm using ${USE_QM_COPR} repo" | ||
info_message "==============================" | ||
dnf install -y 'dnf-command(config-manager)' | ||
dnf config-manager --set-enabled crb | ||
|
||
local release_id | ||
release_id=$(grep -oP '(?<=^ID=)\w+' <<< "$(tr -d '"' < /etc/os-release)") | ||
local version_id | ||
version_id=$(grep -oP '(?<=^VERSION_ID=)\w+' <<< "$(tr -d '"' < /etc/os-release)") | ||
if [[ "$release_id" == "centos" ]]; then | ||
release_id=epel | ||
fi | ||
|
||
if [[ -n "${USE_QM_COPR}" ]]; then | ||
if [[ "${USE_QM_COPR}" != "release" ]]; then | ||
dnf copr enable -y @centos-automotive-sig/bluechi-snapshot "$release_id-$version_id-$(arch)" | ||
dnf copr enable -y "${USE_QM_COPR}" "$release_id-$version_id-$(arch)" | ||
elif [[ "${USE_QM_COPR}" == "release" && "${release_id}" =~ (centos|epel|fedora) ]]; then | ||
if [ ! -f /etc/yum.repos.d/autosd.repo ]; then | ||
info_message "Installing autosd repository" | ||
info_message "==============================" | ||
install_autosd_repo | ||
fi | ||
fi | ||
fi | ||
|
||
dnf install -y bluechi-ctl bluechi-agent bluechi-controller qm hostname | ||
} |
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
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
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
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
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
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