Files
kubevirt.core/1.2.3/testing.html
kubevirt-bot 945023040d Update docs for 1.2.3
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
2024-03-18 16:28:55 +00:00

158 lines
8.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Testing &mdash; KubeVirt Ansible Collection documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=5707b69d" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/antsibull-minimal.css" />
<link rel="stylesheet" type="text/css" href="_static/ansible-basic-sphinx-ext.css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Contributors Guidelines" href="developing.html" />
<link rel="prev" title="Role Index" href="roles/index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home">
KubeVirt Ansible Collection
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">User documentation</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="README.html">Lean Ansible bindings for KubeVirt</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins/index.html">Plugin Index</a></li>
<li class="toctree-l1"><a class="reference internal" href="roles/index.html">Role Index</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Developer documentation</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Testing</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#continuous-integration">Continuous integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="#example-config-and-playbooks">Example config and playbooks</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="CHANGELOG.html">Changelog</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">KubeVirt Ansible Collection</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Testing</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/testing.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="testing">
<h1>Testing<a class="headerlink" href="#testing" title="Link to this heading"></a></h1>
<section id="continuous-integration">
<h2>Continuous integration<a class="headerlink" href="#continuous-integration" title="Link to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">hack/e2e-setup.sh</span></code> script contains the steps necessary to reproduce the CI test environment, which relies on <code class="docutils literal notranslate"><span class="pre">kubectl</span></code> and <code class="docutils literal notranslate"><span class="pre">kind</span></code>.</p>
</section>
<section id="example-config-and-playbooks">
<h2>Example config and playbooks<a class="headerlink" href="#example-config-and-playbooks" title="Link to this heading"></a></h2>
<p>Sample playbooks and inventory configurations are provided in the <code class="docutils literal notranslate"><span class="pre">examples/</span></code> directory; to run the playbooks locally, build the testing environment with the script above, then the steps are as follows:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># setup environment</span>
pip<span class="w"> </span>install<span class="w"> </span>ansible-core
<span class="c1"># clone the repository</span>
git<span class="w"> </span>clone<span class="w"> </span>https://github.com/kubevirt/kubevirt.core
<span class="nb">cd</span><span class="w"> </span>kubevirt.core
<span class="c1"># install collection dependencies</span>
ansible-galaxy<span class="w"> </span>collection<span class="w"> </span>install<span class="w"> </span>-r<span class="w"> </span>requirements.yml
<span class="c1"># install collection python deps</span>
pip<span class="w"> </span>install<span class="w"> </span>-r<span class="w"> </span>requirements.txt
<span class="c1"># setup environment</span>
hack/e2e-setup.sh
<span class="c1"># run inventory source</span>
ansible-inventory<span class="w"> </span>-i<span class="w"> </span>examples/inventory.kubevirt.yml
<span class="c1"># create a virtual machine</span>
ansible-playbook<span class="w"> </span>-i<span class="w"> </span>examples/inventory.kubevirt.yml<span class="w"> </span>examples/play-create-min.yml
<span class="c1"># terminate a virtual machine</span>
ansible-playbook<span class="w"> </span>-i<span class="w"> </span>examples/inventory.kubevirt.yml<span class="w"> </span>examples/play-delete.yml
<span class="c1"># terminate the environment</span>
hack/e2e-setup.sh<span class="w"> </span>--cleanup
</pre></div>
</div>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="roles/index.html" class="btn btn-neutral float-left" title="Role Index" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="developing.html" class="btn btn-neutral float-right" title="Contributors Guidelines" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2024 Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>