mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-04 14:37:25 +00:00
metrics: Enable kata runtime in K8s for FIO test.
This PR configures the corresponding kata runtime in K8s based on the tested hypervisor. This PR also enables FIO metrics test in the kata metrics-ci. Fixes: #7665 Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
This commit is contained in:
parent
c358056a3f
commit
fb571f8be9
@ -87,10 +87,8 @@ function run_test_tensorflow() {
|
|||||||
|
|
||||||
function run_test_fio() {
|
function run_test_fio() {
|
||||||
info "Running FIO test using ${KATA_HYPERVISOR} hypervisor"
|
info "Running FIO test using ${KATA_HYPERVISOR} hypervisor"
|
||||||
# ToDo: remove the exit once the metrics workflow is stable
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
bash storage/fio-k8s/fio-test-ci.sh
|
bash tests/metrics/storage/fio-k8s/fio-test-ci.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_test_iperf() {
|
function run_test_iperf() {
|
||||||
|
@ -24,5 +24,8 @@ test: build
|
|||||||
run: build
|
run: build
|
||||||
make -C $(MKFILE_DIR)/scripts/dax-compare-test/ run
|
make -C $(MKFILE_DIR)/scripts/dax-compare-test/ run
|
||||||
|
|
||||||
test-ci: build
|
test-qemu: build
|
||||||
make -C $(MKFILE_DIR)/cmd/fiotest/ runci
|
make -C $(MKFILE_DIR)/cmd/fiotest/ run-qemu
|
||||||
|
|
||||||
|
test-clh: build
|
||||||
|
make -C $(MKFILE_DIR)/cmd/fiotest/ run-clh
|
||||||
|
@ -20,5 +20,8 @@ gomod:
|
|||||||
go mod edit -replace=github.com/kata-containers/kata-containers/tests/metrics/env=../../pkg/env
|
go mod edit -replace=github.com/kata-containers/kata-containers/tests/metrics/env=../../pkg/env
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
|
||||||
runci: build
|
run-qemu: build
|
||||||
$(MKFILE_DIR)/fio-k8s --debug --fio.size 10M --output-dir test-results --test-name kata $(MKFILE_DIR)/../../configs/example-config/
|
$(MKFILE_DIR)/fio-k8s --debug --fio.size 10M --output-dir test-results --test-name kata --container-runtime kata-qemu $(MKFILE_DIR)/../../configs/example-config/
|
||||||
|
|
||||||
|
run-clh: build
|
||||||
|
$(MKFILE_DIR)/fio-k8s --debug --fio.size 10M --output-dir test-results --test-name kata --container-runtime kata-clh $(MKFILE_DIR)/../../configs/example-config/
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
## Copyright (c) 2021 Intel Corporation
|
||||||
|
#
|
||||||
|
## SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: iometrics
|
||||||
|
spec:
|
||||||
|
runtimeClassName: kata-clh
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- sleep
|
||||||
|
- infinity
|
||||||
|
image: ubuntu:latest
|
||||||
|
name: iometrics
|
||||||
|
imagePullPolicy: Always
|
@ -0,0 +1,17 @@
|
|||||||
|
## Copyright (c) 2021 Intel Corporation
|
||||||
|
#
|
||||||
|
## SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: iometrics
|
||||||
|
spec:
|
||||||
|
runtimeClassName: kata-qemu
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- sleep
|
||||||
|
- infinity
|
||||||
|
image: ubuntu:latest
|
||||||
|
name: iometrics
|
||||||
|
imagePullPolicy: Always
|
@ -18,11 +18,12 @@ function main() {
|
|||||||
check_processes
|
check_processes
|
||||||
init_env
|
init_env
|
||||||
|
|
||||||
export KUBECONFIG="$HOME/.kube/config"
|
|
||||||
|
|
||||||
pushd "${FIO_PATH}"
|
pushd "${FIO_PATH}"
|
||||||
echo "INFO: Running K8S FIO test"
|
[ -z "${KATA_HYPERVISOR}" ] && die "Hypervisor ID is missing."
|
||||||
make test-ci
|
[ "${KATA_HYPERVISOR}" != "qemu" ] && [ "${KATA_HYPERVISOR}" != "clh" ] && die "Hypervisor not recognized: ${KATA_HYPERVISOR}"
|
||||||
|
|
||||||
|
echo "INFO: Running K8S FIO test using ${KATA_HYPERVISOR} hypervisor"
|
||||||
|
make "test-${KATA_HYPERVISOR}"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
test_result_file="${FIO_PATH}/cmd/fiotest/test-results/kata/randrw-sync.job/output.json"
|
test_result_file="${FIO_PATH}/cmd/fiotest/test-results/kata/randrw-sync.job/output.json"
|
||||||
|
Loading…
Reference in New Issue
Block a user