Skip to main content

Molecule aids in the development and testing of Ansible roles

Project description

PyPI Package https://github.com/jseguillon/molecule-kubevirt/workflows/tox/badge.svg Python Black Code Style Repository License

Molecule KubeVirt Plugin is designed to allow use of KubeVirt containers for provisioning test resources.

Very alpha version - All configuration fields and behaviours may be subject to breaking changes

Scope

Molecule-kubevirt enables running ansible roles tests in a kubernetes cluster.

Usage

To use this plugin, you’ll need to set the driver and platform variables in your molecule.yml. Here’s a simple example using a home made centos docker image for KubeVirt:

driver:
  name: kubevirt
platforms:
  - name: instance
    image: quay.io/jseguillon/kubevirt-images:centos-7-x86_64-genericcloud-2009

This driver also requires molecule to access Kubernetes API. See test-rolebinding file.

Installation

Ansible

This driver supports Ansible 2, 3 and 4.

Ansible 2 requires install of comunity.kubevirt plus strict python requirements pinning:

ansible-galaxy install git+https://github.com/ansible-collections/community.general.git
python3 -m pip install openshift==0.11.2 kubernetes==11.0.0

No depedency required for Ansible >= 3

KubeVirt

Get access to a Kubernetes cluster then install KubeVirt for kind or minkube or cloud providers

Demo

Testing nginx ansible role with KubeVirt, via github actions: jseguillon/ansible-role-nginx

Get Involved

License

The MIT License.

The logo is licensed under the Creative Commons NoDerivatives 4.0 License.

If you have some other use in mind, contact us.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

molecule-kubevirt-0.0.4.tar.gz (19.0 kB view hashes)

Uploaded Source

Built Distribution

molecule_kubevirt-0.0.4-py3-none-any.whl (11.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page