Giter VIP home page Giter VIP logo

kubevirt-test-vm's Introduction

Run benchmark tests in containers and VMs in Kubernetes

This repository aims to collect best practise for running reproducible tests in containers and KubeVirt VMs in Kubernetes. Currently, it focuses on running storage benchmarks using fio.

KubeVirt VMs

For running the tests in the VM, cloud-init, podman, qemu-guest-agent and ssh-server need to be installed and enabled in the VM. We build containerdisk with all the required software needed to setup the VM.

The binary virtctl-test helps you in creating a test VM for running fio test in a containerized way. You need to have install on your system kubectl binary as virtctl-test calls it in order to copy the output from the VMs and the pods.

Create a test VM

You can use the command virtctl-test createVM in order to create a test VM. Example:

$ virtctl-test createVM --name vm-test --pvc pvc 

The KubeVirt VM is configured to start the fio container using podman at boot time and running the test on the volume specified with the PVC. Optionally, you can also configure ssh in order to access the VM (use --help option for more information).

Create test pod

The command virtctl createPod helps you to create a pod to deploy the same test in a container

$ virtctl-test createPod --pod pod-test --pvc pvc

Running fio tests inside with standard containers can be compared to the fio test run in the VM, if the PVC is a block.

Copy the output locally

When the test pod or VM are in a Completed/Succeded state, you can use the output command to retrive the test output locally:

$ virtctl-test output --name <podName/vmName>

Delete the setup

The command delete helps you to clean up:

$ virtctl-test output --name <podName/vmName>

Create the fio tests

You can rely on the defaults fio test and create them with make generate-fio-jobs. Otherwise, you can simply create your own tests under the directory tests-setup/fio-jobs/ and build your custom image with make FIO_IMAGE_NAME=fio-demo fio-image. The onyl requirements for the test is that the device needs to be /dev/device-to-test as the container will bind the device to test as /dev/device-to-test

kubevirt-test-vm's People

Contributors

alicefr avatar

Stargazers

Vlastimil Holer avatar Andrei Kvapil avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.