kubevirt
kubevirt-ansible
Go

Set of Ansible roles & playbooks for KubeVirt deployment

Last updated Nov 19, 2024
92
Stars
71
Forks
0
Issues
0
Stars/day
Attention Score
34
Language breakdown
No language data available.
Files click to expand
README
Warning
This repository is obsolete. The recommendation is to use kubernetes.core for virtualization machine management.

KubeVirt Ansible

Tools to provision resources, deploy clusters and install KubeVirt.

Overview

KubeVirt Ansible consists of a set of Ansible playbooks that deploy fully functional virtual machine management add-on for Kubernetes - KubeVirt. Optionally, a Kuberenetes or OpenShift cluster can also be configured.

Contents

  • automation/: CI scripts to verify the functionality of playbooks.
  • playbooks/: Ansible playbooks to provision resources, deploy a cluster and install KubeVirt for various scenarios.
  • roles/: Roles to use in playbooks.
  • vars/: Variables to use in playbooks.
  • inventory: A template for the cluster and nodes configuration.
  • requirements.yml: A list of required Ansible-Galaxy roles to use in playbooks.
  • stdci.yaml: A configuration file for CI system.

Usage

Deploy

To deploy KubeVirt on an existing OpenShift cluster run the commands below. For more information on clusters and other deployment scenarious see playbooks instructions.
oc login -u <adminuser> -p <adminpassword>

ansible-playbook -i localhost playbooks/kubevirt.yml -e@vars/all.yml

>Note: Check default variables in vars/all.yml and update them if needed.

E2E Testing

  • Ensure it is possible to login into the cluster
oc login
  • Compile tests from the tests directory inside the docker container and copy it to the kubevirt-ansible/out directory.
make build-tests
  • Run all the e2e tests with the ~/.kube/config file
make test

If you'd like to run specific tests only, you can leverage ginkgo command line options as follows (run a specified suite):

FUNCTESTARGS='-ginkgo.focus=sanity_test -ginkgo.regexScansFilePath' make test

or you can pass it to tests via:

./out/tests/<name>.test -kubeconfig=yourkubeconfig -tag=kubevirtimagestag -prefix=kubevirt -test.timeout 60m

>Note: To test PVC's storage.import.endpoint with other images, use the STREAMIMAGEURL environment variable:

export STREAMIMAGEURL=<theimageurl>

Questions ? Help ? Ideas ?

Stop by the #kubevirt chat channel on freenode IRC

Contributing

Please see the contributing guidelines for information regarding the contribution process.

Automation & Testing

Please check the CI automation guidelines for information on playbooks verification.

Useful Links

[openshift-ansible-project]: https://github.com/openshift/openshift-ansible
🔗 More in this category

© 2026 GitRepoTrend · kubevirt/kubevirt-ansible · Updated daily from GitHub