Skip to content
Set of Ansible roles & playbooks for KubeVirt deployment
Branch: master
Clone or download
gouyang and lukas-bednar Revert pending test in node eviction (#608)
Signed-off-by: Guohua Ouyang <gouyang@redhat.com>
Latest commit 8493de0 Mar 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
automation
hack Updated kubevirt to version 0.13.3 Feb 6, 2019
meta Allow kubevirt-ansible to be pulled from ansible galaxy (#138) Mar 21, 2018
playbooks Merge pull request #538 from duyanyan/fixvar Mar 5, 2019
roles Merge pull request #538 from duyanyan/fixvar Mar 5, 2019
templates
tests Revert pending test in node eviction (#608) Mar 5, 2019
vars Bump kubevirt-web-ui version (#596) Feb 8, 2019
vendor
.gitignore Allowed to run the playbook on a remote server and not only on master. Dec 30, 2018
CONTRIBUTING.md fix: invalid urls (#507) Dec 6, 2018
LICENSE Initial commit Sep 14, 2017
Makefile Add gofmt to keep canonical structure of code Nov 7, 2018
README.md
ansible.cfg Enable pipelining in ansible.cfg Jun 10, 2018
glide.lock update vendor tree Nov 5, 2018
glide.yaml
inventory
requirements.yml
stdci.yaml Update to OKD 3.11 Dec 10, 2018

README.md

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 <admin_user> -p <admin_password>

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

  1. Ensure it is possible to login into the cluster
oc login
  1. Compile tests from the tests directory inside the docker container and copy it to the kubevirt-ansible/_out directory.
make build-tests
  1. 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):

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

or you can pass it to tests via:

./_out/tests/<name>.test -kubeconfig=your_kubeconfig -tag=kubevirt_images_tag -prefix=kubevirt -test.timeout 60m

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

export STREAM_IMAGE_URL=<the_image_url>

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

You can’t perform that action at this time.