mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 06:52:13 +00:00
tests: Make install_kata take care of the links
It makes the kata-containers installation more complete. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
13715db1f8
commit
db77c9a438
@ -266,19 +266,6 @@ function restart_containerd_service() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_symbolic_links() {
|
|
||||||
local KATA_HYPERVISOR="${1}"
|
|
||||||
|
|
||||||
local link_configuration_file="/opt/kata/share/defaults/kata-containers/configuration.toml"
|
|
||||||
local source_configuration_file="/opt/kata/share/defaults/kata-containers/configuration-${KATA_HYPERVISOR}.toml"
|
|
||||||
|
|
||||||
if [ "${KATA_HYPERVISOR}" != 'qemu' ] && [ "${KATA_HYPERVISOR}" != 'clh' ]; then
|
|
||||||
die "Failed to set the configuration.toml: '${KATA_HYPERVISOR}' is not recognized as a valid hypervisor name."
|
|
||||||
fi
|
|
||||||
|
|
||||||
sudo ln -sf "${source_configuration_file}" "${link_configuration_file}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Configures containerd
|
# Configures containerd
|
||||||
function overwrite_containerd_config() {
|
function overwrite_containerd_config() {
|
||||||
containerd_config="/etc/containerd/config.toml"
|
containerd_config="/etc/containerd/config.toml"
|
||||||
@ -316,6 +303,14 @@ function install_kata() {
|
|||||||
sudo ln -sf "${b}" "${local_bin_dir}/$(basename $b)"
|
sudo ln -sf "${b}" "${local_bin_dir}/$(basename $b)"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ ${KATA_HYPERVISOR} == "dragonball" ]]; then
|
||||||
|
sudo ln -sf "${katadir}/runtime-rs/bin/containerd-shim-kata-v2" "${local_bin_dir}/containerd-shim-kata-${KATA_HYPERVISOR}-v2"
|
||||||
|
else
|
||||||
|
sudo ln -sf "${katadir}/bin/containerd-shim-kata-v2" "${local_bin_dir}/containerd-shim-kata-${KATA_HYPERVISOR}-v2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo ln -sf ${katadir}/share/defaults/kata-containers/configuration-${KATA_HYPERVISOR}.toml ${katadir}/share/defaults/kata-containers/configuration.toml
|
||||||
|
|
||||||
check_containerd_config_for_kata
|
check_containerd_config_for_kata
|
||||||
restart_containerd_service
|
restart_containerd_service
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,6 @@ function install_dependencies() {
|
|||||||
function run() {
|
function run() {
|
||||||
info "Running cri-containerd tests using ${KATA_HYPERVISOR} hypervisor"
|
info "Running cri-containerd tests using ${KATA_HYPERVISOR} hypervisor"
|
||||||
|
|
||||||
create_symbolic_links ${KATA_HYPERVISOR}
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,28 +56,24 @@ function make_tarball_results() {
|
|||||||
function run_test_launchtimes() {
|
function run_test_launchtimes() {
|
||||||
info "Running Launch Time test using ${KATA_HYPERVISOR} hypervisor"
|
info "Running Launch Time test using ${KATA_HYPERVISOR} hypervisor"
|
||||||
|
|
||||||
create_symbolic_links ${KATA_HYPERVISOR}
|
|
||||||
bash tests/metrics/time/launch_times.sh -i public.ecr.aws/ubuntu/ubuntu:latest -n 20
|
bash tests/metrics/time/launch_times.sh -i public.ecr.aws/ubuntu/ubuntu:latest -n 20
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_test_memory_usage() {
|
function run_test_memory_usage() {
|
||||||
info "Running memory-usage test using ${KATA_HYPERVISOR} hypervisor"
|
info "Running memory-usage test using ${KATA_HYPERVISOR} hypervisor"
|
||||||
|
|
||||||
create_symbolic_links ${KATA_HYPERVISOR}
|
|
||||||
bash tests/metrics/density/memory_usage.sh 20 5
|
bash tests/metrics/density/memory_usage.sh 20 5
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_test_memory_usage_inside_container() {
|
function run_test_memory_usage_inside_container() {
|
||||||
info "Running memory-usage inside the container test using ${KATA_HYPERVISOR} hypervisor"
|
info "Running memory-usage inside the container test using ${KATA_HYPERVISOR} hypervisor"
|
||||||
|
|
||||||
create_symbolic_links ${KATA_HYPERVISOR}
|
|
||||||
bash tests/metrics/density/memory_usage_inside_container.sh 5
|
bash tests/metrics/density/memory_usage_inside_container.sh 5
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_test_blogbench() {
|
function run_test_blogbench() {
|
||||||
info "Running Blogbench test using ${KATA_HYPERVISOR} hypervisor"
|
info "Running Blogbench test using ${KATA_HYPERVISOR} hypervisor"
|
||||||
|
|
||||||
create_symbolic_links ${KATA_HYPERVISOR}
|
|
||||||
bash tests/metrics/storage/blogbench.sh
|
bash tests/metrics/storage/blogbench.sh
|
||||||
|
|
||||||
check_metrics
|
check_metrics
|
||||||
@ -88,7 +84,6 @@ function run_test_tensorflow() {
|
|||||||
# ToDo: remove the exit once the metrics workflow is stable
|
# ToDo: remove the exit once the metrics workflow is stable
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
create_symbolic_links ${KATA_HYPERVISOR}
|
|
||||||
bash tests/metrics/machine_learning/tensorflow.sh 1 20
|
bash tests/metrics/machine_learning/tensorflow.sh 1 20
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user