mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-05-07 22:02:38 +00:00
Update docs for main
This commit is contained in:
201
main/README.html
201
main/README.html
@@ -46,24 +46,25 @@
|
||||
<p class="caption" role="heading"><span class="caption-text">User documentation</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Lean Ansible bindings for KubeVirt</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#ansible-version-compatibility">Ansible version compatibility</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#included-content">Included content</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#plugins">Plugins</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#using-this-collection">Using this collection</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#installing-the-collection-from-ansible-galaxy">Installing the Collection from Ansible Galaxy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#build-and-install-locally">Build and install locally</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#dependencies">Dependencies</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#ansible-collections">Ansible collections</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#python-libraries">Python libraries</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#code-of-conduct">Code of Conduct</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#communication">Communication</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#contributing-to-this-collection">Contributing to this collection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#collection-maintenance">Collection maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#governance">Governance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#tested-with-ansible">Tested with Ansible</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#external-requirements">External requirements</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#supported-connections">Supported connections</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#included-content">Included content</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#using-this-collection">Using this collection</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#installing-the-collection-from-ansible-galaxy">Installing the Collection from Ansible Galaxy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#release-notes">Release notes</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#roadmap">Roadmap</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#more-information">More information</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#licensing">Licensing</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -107,27 +108,85 @@
|
||||
|
||||
<section id="lean-ansible-bindings-for-kubevirt">
|
||||
<h1>Lean Ansible bindings for KubeVirt<a class="headerlink" href="#lean-ansible-bindings-for-kubevirt" title="Permalink to this heading"></a></h1>
|
||||
<!-- Add CI and code coverage badges here. Samples included below. -->
|
||||
<p><a class="reference external" href="https://github.com/kubevirt/kubevirt.core/actions"><img alt="CI" src="https://github.com/kubevirt/kubevirt.core/workflows/CI/badge.svg?event=push" /></a></p>
|
||||
<!-- Describe the collection and why a user would want to use it. What does the collection do? -->
|
||||
<p>This repo hosts the kubevirt.core Ansible Collection.</p>
|
||||
<p>The collection includes an inventory plugin for Ansible to automate the management of VMs running on KubeVirt.</p>
|
||||
<!--start build_status -->
|
||||
<p><a class="reference external" href="https://github.com/kubevirt/kubevirt.core/actions"><img alt="Build Status" src="https://github.com/kubevirt/kubevirt.core/workflows/CI/badge.svg?event=push" /></a></p>
|
||||
<blockquote>
|
||||
<div><p><strong><em>NOTE:</em> If you are Red Hat customer, install <code class="docutils literal notranslate"><span class="pre">redhat.ocpv</span></code> from <a class="reference external" href="https://console.redhat.com/ansible/ansible-dashboard">Automation Hub</a> as the certified version of this collection.</strong></p>
|
||||
</div></blockquote>
|
||||
<!--end build_status -->
|
||||
<p>This repository hosts the <code class="docutils literal notranslate"><span class="pre">kubevirt.core</span></code> Ansible Collection, which provides virtual machine operations and inventory source for use with Ansible.</p>
|
||||
<!--start requires_ansible-->
|
||||
<section id="ansible-version-compatibility">
|
||||
<h2>Ansible version compatibility<a class="headerlink" href="#ansible-version-compatibility" title="Permalink to this heading"></a></h2>
|
||||
<p>This collection has been tested against following Ansible versions: <strong>>=2.9.10</strong>.</p>
|
||||
<!--end requires_ansible-->
|
||||
</section>
|
||||
<section id="included-content">
|
||||
<h2>Included content<a class="headerlink" href="#included-content" title="Permalink to this heading"></a></h2>
|
||||
<section id="plugins">
|
||||
<h3>Plugins<a class="headerlink" href="#plugins" title="Permalink to this heading"></a></h3>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">kubevirt</span></code>: inventory source for kubevirt virtual machines</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">kubevirt_vm</span></code>: create or delete kubevirt virtual machines</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<section id="using-this-collection">
|
||||
<h2>Using this collection<a class="headerlink" href="#using-this-collection" title="Permalink to this heading"></a></h2>
|
||||
<!--start galaxy_download -->
|
||||
<section id="installing-the-collection-from-ansible-galaxy">
|
||||
<h3>Installing the Collection from Ansible Galaxy<a class="headerlink" href="#installing-the-collection-from-ansible-galaxy" title="Permalink to this heading"></a></h3>
|
||||
<p>Before using this collection, you need to install it with the Ansible Galaxy command-line tool:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ansible-galaxy<span class="w"> </span>collection<span class="w"> </span>install<span class="w"> </span>kubevirt.core
|
||||
</pre></div>
|
||||
</div>
|
||||
<!--end galaxy_download -->
|
||||
</section>
|
||||
<section id="build-and-install-locally">
|
||||
<h3>Build and install locally<a class="headerlink" href="#build-and-install-locally" title="Permalink to this heading"></a></h3>
|
||||
<p>Clone the repository, checkout the tag you want to build, or pick the main branch for the development version; then:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ansible-galaxy<span class="w"> </span>collection<span class="w"> </span>build<span class="w"> </span>.
|
||||
ansible-galaxy<span class="w"> </span>collection<span class="w"> </span>install<span class="w"> </span>kubevirt-kubevirt.core-*.tar.gz
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="dependencies">
|
||||
<h3>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this heading"></a></h3>
|
||||
<section id="ansible-collections">
|
||||
<h4>Ansible collections<a class="headerlink" href="#ansible-collections" title="Permalink to this heading"></a></h4>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="https://docs.ansible.com/ansible/latest/collections/kubernetes/core/index.html">kubernetes.core</a></p></li>
|
||||
</ul>
|
||||
<p>You can also include it in a <code class="docutils literal notranslate"><span class="pre">requirements.yml</span></code> file and install it with <code class="docutils literal notranslate"><span class="pre">ansible-galaxy</span> <span class="pre">collection</span> <span class="pre">install</span> <span class="pre">-r</span> <span class="pre">requirements.yml</span></code>, using the format:</p>
|
||||
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nn">---</span>
|
||||
<span class="nt">collections</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">kubevirt.core</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="python-libraries">
|
||||
<h4>Python libraries<a class="headerlink" href="#python-libraries" title="Permalink to this heading"></a></h4>
|
||||
<ul class="simple">
|
||||
<li><p>kubernetes</p></li>
|
||||
<li><p>PyYaml</p></li>
|
||||
<li><p>jsonpatch</p></li>
|
||||
<li><p>jinja2</p></li>
|
||||
</ul>
|
||||
<p>To install all the dependencies:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>-r<span class="w"> </span>requirements.txt
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>See <a class="reference external" href="https://docs.ansible.com/ansible/devel/user_guide/collections_using.html">Ansible Using collections</a> for more details.</p>
|
||||
<!--start community_readme -->
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
<section id="code-of-conduct">
|
||||
<h2>Code of Conduct<a class="headerlink" href="#code-of-conduct" title="Permalink to this heading"></a></h2>
|
||||
<p>We follow the <a class="reference external" href="https://docs.ansible.com/ansible/devel/community/code_of_conduct.html">Ansible Code of Conduct</a> in all our interactions within this project.</p>
|
||||
<p>If you encounter abusive behavior, please refer to the <a class="reference external" href="https://docs.ansible.com/ansible/devel/community/code_of_conduct.html#policy-violations">policy violations</a> section of the Code for information on how to raise a complaint.</p>
|
||||
</section>
|
||||
<section id="communication">
|
||||
<h2>Communication<a class="headerlink" href="#communication" title="Permalink to this heading"></a></h2>
|
||||
<!--List available communication channels. In addition to channels specific to your collection, we also recommend to use the following ones.-->
|
||||
<p>We announce releases and important changes through Ansible’s <a class="reference external" href="https://github.com/ansible/community/wiki/News#the-bullhorn">The Bullhorn newsletter</a>. Be sure you are <a class="reference external" href="https://eepurl.com/gZmiEP">subscribed</a>.</p>
|
||||
<p>Join us in the <code class="docutils literal notranslate"><span class="pre">#ansible</span></code> (general use questions and support), <code class="docutils literal notranslate"><span class="pre">#ansible-community</span></code> (community and collection development questions), and other <a class="reference external" href="https://docs.ansible.com/ansible/devel/community/communication.html#irc-channels">IRC channels</a>.</p>
|
||||
<p>We take part in the global quarterly <a class="reference external" href="https://github.com/ansible/community/wiki/Contributor-Summit">Ansible Contributor Summit</a> virtually or in-person. Track <a class="reference external" href="https://eepurl.com/gZmiEP">The Bullhorn newsletter</a> and join us.</p>
|
||||
<p>For more information about communication, refer to the <a class="reference external" href="https://docs.ansible.com/ansible/devel/community/communication.html">Ansible Communication guide</a>.</p>
|
||||
<p>We follow the <a class="reference external" href="https://github.com/kubevirt/kubevirt/blob/main/CODE_OF_CONDUCT.md">KubeVirt Code of Conduct</a>.</p>
|
||||
</section>
|
||||
<section id="contributing-to-this-collection">
|
||||
<h2>Contributing to this collection<a class="headerlink" href="#contributing-to-this-collection" title="Permalink to this heading"></a></h2>
|
||||
<!--Describe how the community can contribute to your collection. At a minimum, fill up and include the CONTRIBUTING.md file containing how and where users can create issues to report problems or request features for this collection. List contribution requirements, including preferred workflows and necessary testing, so you can benefit from community PRs. If you are following general Ansible contributor guidelines, you can link to - [Ansible Community Guide](https://docs.ansible.com/ansible/devel/community/index.html). List the current maintainers (contributors with write or higher access to the repository). The following can be included:-->
|
||||
<p>The content of this collection is made by people like you, a community of individuals collaborating on making the world better through developing automation software.</p>
|
||||
<p>We are actively accepting new contributors.</p>
|
||||
<p>Any kind of contribution is very welcome.</p>
|
||||
@@ -143,91 +202,19 @@
|
||||
</section>
|
||||
<section id="collection-maintenance">
|
||||
<h2>Collection maintenance<a class="headerlink" href="#collection-maintenance" title="Permalink to this heading"></a></h2>
|
||||
<p>The current maintainers are listed in the <a class="reference internal" href="#MAINTAINERS"><span class="xref myst">MAINTAINERS</span></a> file. If you have questions or need help, feel free to mention them in the proposals.</p>
|
||||
<p>To learn how to maintain / become a maintainer of this collection, refer to the <a class="reference internal" href="#MAINTAINING.md"><span class="xref myst">Maintainer guidelines</span></a>.</p>
|
||||
<p>The current maintainers are listed in the <a class="reference internal" href="#OWNERS"><span class="xref myst">OWNERS</span></a> file. If you have questions or need help, feel free to mention them in the proposals.</p>
|
||||
<p>To learn how to maintain / become a maintainer of this collection, refer to the <a class="reference external" href="https://docs.ansible.com/ansible/devel/community/maintainers.html">Maintainer guidelines</a>.</p>
|
||||
</section>
|
||||
<section id="governance">
|
||||
<h2>Governance<a class="headerlink" href="#governance" title="Permalink to this heading"></a></h2>
|
||||
<!--Describe how the collection is governed. Here can be the following text:-->
|
||||
<p>The process of decision making in this collection is based on discussing and finding consensus among participants.</p>
|
||||
<p>Every voice is important. If you have something on your mind, create an issue or dedicated discussion and let’s discuss it!</p>
|
||||
</section>
|
||||
<section id="tested-with-ansible">
|
||||
<h2>Tested with Ansible<a class="headerlink" href="#tested-with-ansible" title="Permalink to this heading"></a></h2>
|
||||
<!-- List the versions of Ansible the collection has been tested with. Must match what is in galaxy.yml. -->
|
||||
</section>
|
||||
<section id="external-requirements">
|
||||
<h2>External requirements<a class="headerlink" href="#external-requirements" title="Permalink to this heading"></a></h2>
|
||||
<!-- List any external resources the collection depends on, for example minimum versions of an OS, libraries, or utilities. Do not list other Ansible collections here. -->
|
||||
<ul class="simple">
|
||||
<li><p>python >= 3.6</p></li>
|
||||
</ul>
|
||||
<p>Python libraries:</p>
|
||||
<ul class="simple">
|
||||
<li><p>kubernetes</p></li>
|
||||
<li><p>PyYaml</p></li>
|
||||
<li><p>jsonpatch</p></li>
|
||||
<li><p>jinja2</p></li>
|
||||
</ul>
|
||||
<section id="supported-connections">
|
||||
<h3>Supported connections<a class="headerlink" href="#supported-connections" title="Permalink to this heading"></a></h3>
|
||||
<!-- Optional. If your collection supports only specific connection types (such as HTTPAPI, netconf, or others), list them here. -->
|
||||
</section>
|
||||
</section>
|
||||
<section id="included-content">
|
||||
<h2>Included content<a class="headerlink" href="#included-content" title="Permalink to this heading"></a></h2>
|
||||
<!-- Galaxy will eventually list the module docs within the UI, but until that is ready, you may need to either describe your plugins etc here, or point to an external docsite to cover that information. -->
|
||||
</section>
|
||||
<section id="using-this-collection">
|
||||
<h2>Using this collection<a class="headerlink" href="#using-this-collection" title="Permalink to this heading"></a></h2>
|
||||
<!--Include some quick examples that cover the most common use cases for your collection content. It can include the following examples of installation and upgrade (change NAMESPACE.COLLECTION_NAME correspondingly):-->
|
||||
<section id="installing-the-collection-from-ansible-galaxy">
|
||||
<h3>Installing the Collection from Ansible Galaxy<a class="headerlink" href="#installing-the-collection-from-ansible-galaxy" title="Permalink to this heading"></a></h3>
|
||||
<p>Before using this collection, you need to install it with the Ansible Galaxy command-line tool:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ansible-galaxy<span class="w"> </span>collection<span class="w"> </span>install<span class="w"> </span>kubevirt.core
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You can also include it in a <code class="docutils literal notranslate"><span class="pre">requirements.yml</span></code> file and install it with <code class="docutils literal notranslate"><span class="pre">ansible-galaxy</span> <span class="pre">collection</span> <span class="pre">install</span> <span class="pre">-r</span> <span class="pre">requirements.yml</span></code>, using the format:</p>
|
||||
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nn">---</span>
|
||||
<span class="nt">collections</span><span class="p">:</span>
|
||||
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">kubevirt.core</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically when you upgrade the <code class="docutils literal notranslate"><span class="pre">ansible</span></code> package. To upgrade the collection to the latest available version, run the following command:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ansible-galaxy<span class="w"> </span>collection<span class="w"> </span>install<span class="w"> </span>kubevirt.core<span class="w"> </span>--upgrade
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version <code class="docutils literal notranslate"><span class="pre">0.1.0</span></code>:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>ansible-galaxy<span class="w"> </span>collection<span class="w"> </span>install<span class="w"> </span>kubevirt.core:<span class="o">==</span><span class="m">0</span>.1.0
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>See <a class="reference external" href="https://docs.ansible.com/ansible/devel/user_guide/collections_using.html">Ansible Using collections</a> for more details.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="release-notes">
|
||||
<h2>Release notes<a class="headerlink" href="#release-notes" title="Permalink to this heading"></a></h2>
|
||||
<p>See the <a class="reference external" href="https://github.com/ansible-collections/REPONAMEHERE/tree/main/CHANGELOG.rst">changelog</a>.</p>
|
||||
</section>
|
||||
<section id="roadmap">
|
||||
<h2>Roadmap<a class="headerlink" href="#roadmap" title="Permalink to this heading"></a></h2>
|
||||
<!-- Optional. Include the roadmap for this collection, and the proposed release/versioning strategy so users can anticipate the upgrade/update cycle. -->
|
||||
</section>
|
||||
<section id="more-information">
|
||||
<h2>More information<a class="headerlink" href="#more-information" title="Permalink to this heading"></a></h2>
|
||||
<!-- List out where the user can find additional information, such as working group meeting times, slack/IRC channels, or documentation for the product this collection automates. At a minimum, link to: -->
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="https://github.com/ansible-collections/overview">Ansible Collection overview</a></p></li>
|
||||
<li><p><a class="reference external" href="https://docs.ansible.com/ansible/devel/user_guide/index.html">Ansible User guide</a></p></li>
|
||||
<li><p><a class="reference external" href="https://docs.ansible.com/ansible/devel/dev_guide/index.html">Ansible Developer guide</a></p></li>
|
||||
<li><p><a class="reference external" href="https://github.com/ansible-collections/overview/blob/main/collection_requirements.rst">Ansible Collections Checklist</a></p></li>
|
||||
<li><p><a class="reference external" href="https://docs.ansible.com/ansible/devel/community/code_of_conduct.html">Ansible Community code of conduct</a></p></li>
|
||||
<li><p><a class="reference external" href="https://us19.campaign-archive.com/home/?u=56d874e027110e35dea0e03c1&amp;id=d6635f5420">The Bullhorn (the Ansible Contributor newsletter)</a></p></li>
|
||||
<li><p><a class="reference external" href="https://github.com/ansible-collections/news-for-maintainers">News for Maintainers</a></p></li>
|
||||
</ul>
|
||||
<!--end community_readme -->
|
||||
<!--start support -->
|
||||
<!--end support -->
|
||||
</section>
|
||||
<section id="licensing">
|
||||
<h2>Licensing<a class="headerlink" href="#licensing" title="Permalink to this heading"></a></h2>
|
||||
<!-- Include the appropriate license information here and a pointer to the full licensing details. If the collection contains modules migrated from the ansible/ansible repo, you must use the same license that existed in the ansible/ansible repo. See the GNU license example below. -->
|
||||
<p>GNU General Public License v3.0 or later.</p>
|
||||
<p>See <a class="reference internal" href="#./LICENSE"><span class="xref myst">LICENSE</span></a> to see the full text.</p>
|
||||
</section>
|
||||
|
||||
@@ -1,34 +1,78 @@
|
||||
# Lean Ansible bindings for KubeVirt
|
||||
<!-- Add CI and code coverage badges here. Samples included below. -->
|
||||
[](https://github.com/kubevirt/kubevirt.core/actions)
|
||||
<!--start build_status -->
|
||||
[](https://github.com/kubevirt/kubevirt.core/actions)
|
||||
|
||||
<!-- Describe the collection and why a user would want to use it. What does the collection do? -->
|
||||
This repo hosts the kubevirt.core Ansible Collection.
|
||||
> **_NOTE:_ If you are Red Hat customer, install `redhat.ocpv` from [Automation Hub](https://console.redhat.com/ansible/ansible-dashboard) as the certified version of this collection.**
|
||||
<!--end build_status -->
|
||||
|
||||
The collection includes an inventory plugin for Ansible to automate the management of VMs running on KubeVirt.
|
||||
This repository hosts the `kubevirt.core` Ansible Collection, which provides virtual machine operations and inventory source for use with Ansible.
|
||||
|
||||
<!--start requires_ansible-->
|
||||
## Ansible version compatibility
|
||||
|
||||
This collection has been tested against following Ansible versions: **>=2.9.10**.
|
||||
<!--end requires_ansible-->
|
||||
|
||||
## Included content
|
||||
|
||||
### Plugins
|
||||
|
||||
* `kubevirt`: inventory source for kubevirt virtual machines
|
||||
* `kubevirt_vm`: create or delete kubevirt virtual machines
|
||||
|
||||
## Using this collection
|
||||
|
||||
<!--start galaxy_download -->
|
||||
### Installing the Collection from Ansible Galaxy
|
||||
|
||||
Before using this collection, you need to install it with the Ansible Galaxy command-line tool:
|
||||
```bash
|
||||
ansible-galaxy collection install kubevirt.core
|
||||
```
|
||||
<!--end galaxy_download -->
|
||||
|
||||
### Build and install locally
|
||||
|
||||
Clone the repository, checkout the tag you want to build, or pick the main branch for the development version; then:
|
||||
```bash
|
||||
ansible-galaxy collection build .
|
||||
ansible-galaxy collection install kubevirt-kubevirt.core-*.tar.gz
|
||||
```
|
||||
|
||||
### Dependencies
|
||||
|
||||
#### Ansible collections
|
||||
|
||||
* [kubernetes.core](https://docs.ansible.com/ansible/latest/collections/kubernetes/core/index.html)
|
||||
|
||||
You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format:
|
||||
```yaml
|
||||
---
|
||||
collections:
|
||||
- name: kubevirt.core
|
||||
```
|
||||
|
||||
#### Python libraries
|
||||
|
||||
- kubernetes
|
||||
- PyYaml
|
||||
- jsonpatch
|
||||
- jinja2
|
||||
|
||||
To install all the dependencies:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
See [Ansible Using collections](https://docs.ansible.com/ansible/devel/user_guide/collections_using.html) for more details.
|
||||
|
||||
<!--start community_readme -->
|
||||
## Code of Conduct
|
||||
|
||||
We follow the [Ansible Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html) in all our interactions within this project.
|
||||
|
||||
If you encounter abusive behavior, please refer to the [policy violations](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html#policy-violations) section of the Code for information on how to raise a complaint.
|
||||
|
||||
## Communication
|
||||
|
||||
<!--List available communication channels. In addition to channels specific to your collection, we also recommend to use the following ones.-->
|
||||
|
||||
We announce releases and important changes through Ansible's [The Bullhorn newsletter](https://github.com/ansible/community/wiki/News#the-bullhorn). Be sure you are [subscribed](https://eepurl.com/gZmiEP).
|
||||
|
||||
Join us in the `#ansible` (general use questions and support), `#ansible-community` (community and collection development questions), and other [IRC channels](https://docs.ansible.com/ansible/devel/community/communication.html#irc-channels).
|
||||
|
||||
We take part in the global quarterly [Ansible Contributor Summit](https://github.com/ansible/community/wiki/Contributor-Summit) virtually or in-person. Track [The Bullhorn newsletter](https://eepurl.com/gZmiEP) and join us.
|
||||
|
||||
For more information about communication, refer to the [Ansible Communication guide](https://docs.ansible.com/ansible/devel/community/communication.html).
|
||||
We follow the [KubeVirt Code of Conduct](https://github.com/kubevirt/kubevirt/blob/main/CODE_OF_CONDUCT.md).
|
||||
|
||||
## Contributing to this collection
|
||||
|
||||
<!--Describe how the community can contribute to your collection. At a minimum, fill up and include the CONTRIBUTING.md file containing how and where users can create issues to report problems or request features for this collection. List contribution requirements, including preferred workflows and necessary testing, so you can benefit from community PRs. If you are following general Ansible contributor guidelines, you can link to - [Ansible Community Guide](https://docs.ansible.com/ansible/devel/community/index.html). List the current maintainers (contributors with write or higher access to the repository). The following can be included:-->
|
||||
|
||||
The content of this collection is made by people like you, a community of individuals collaborating on making the world better through developing automation software.
|
||||
|
||||
We are actively accepting new contributors.
|
||||
@@ -47,95 +91,22 @@ We use the following guidelines:
|
||||
|
||||
## Collection maintenance
|
||||
|
||||
The current maintainers are listed in the [MAINTAINERS](MAINTAINERS) file. If you have questions or need help, feel free to mention them in the proposals.
|
||||
The current maintainers are listed in the [OWNERS](OWNERS) file. If you have questions or need help, feel free to mention them in the proposals.
|
||||
|
||||
To learn how to maintain / become a maintainer of this collection, refer to the [Maintainer guidelines](MAINTAINING.md).
|
||||
To learn how to maintain / become a maintainer of this collection, refer to the [Maintainer guidelines](https://docs.ansible.com/ansible/devel/community/maintainers.html).
|
||||
|
||||
## Governance
|
||||
|
||||
<!--Describe how the collection is governed. Here can be the following text:-->
|
||||
|
||||
The process of decision making in this collection is based on discussing and finding consensus among participants.
|
||||
|
||||
Every voice is important. If you have something on your mind, create an issue or dedicated discussion and let's discuss it!
|
||||
<!--end community_readme -->
|
||||
|
||||
## Tested with Ansible
|
||||
|
||||
<!-- List the versions of Ansible the collection has been tested with. Must match what is in galaxy.yml. -->
|
||||
|
||||
## External requirements
|
||||
|
||||
<!-- List any external resources the collection depends on, for example minimum versions of an OS, libraries, or utilities. Do not list other Ansible collections here. -->
|
||||
- python >= 3.6
|
||||
|
||||
Python libraries:
|
||||
- kubernetes
|
||||
- PyYaml
|
||||
- jsonpatch
|
||||
- jinja2
|
||||
|
||||
### Supported connections
|
||||
<!-- Optional. If your collection supports only specific connection types (such as HTTPAPI, netconf, or others), list them here. -->
|
||||
|
||||
## Included content
|
||||
|
||||
<!-- Galaxy will eventually list the module docs within the UI, but until that is ready, you may need to either describe your plugins etc here, or point to an external docsite to cover that information. -->
|
||||
|
||||
## Using this collection
|
||||
|
||||
<!--Include some quick examples that cover the most common use cases for your collection content. It can include the following examples of installation and upgrade (change NAMESPACE.COLLECTION_NAME correspondingly):-->
|
||||
|
||||
### Installing the Collection from Ansible Galaxy
|
||||
|
||||
Before using this collection, you need to install it with the Ansible Galaxy command-line tool:
|
||||
```bash
|
||||
ansible-galaxy collection install kubevirt.core
|
||||
```
|
||||
|
||||
You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format:
|
||||
```yaml
|
||||
---
|
||||
collections:
|
||||
- name: kubevirt.core
|
||||
```
|
||||
|
||||
Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically when you upgrade the `ansible` package. To upgrade the collection to the latest available version, run the following command:
|
||||
```bash
|
||||
ansible-galaxy collection install kubevirt.core --upgrade
|
||||
```
|
||||
|
||||
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version `0.1.0`:
|
||||
|
||||
```bash
|
||||
ansible-galaxy collection install kubevirt.core:==0.1.0
|
||||
```
|
||||
|
||||
See [Ansible Using collections](https://docs.ansible.com/ansible/devel/user_guide/collections_using.html) for more details.
|
||||
|
||||
## Release notes
|
||||
|
||||
See the [changelog](https://github.com/ansible-collections/REPONAMEHERE/tree/main/CHANGELOG.rst).
|
||||
|
||||
## Roadmap
|
||||
|
||||
<!-- Optional. Include the roadmap for this collection, and the proposed release/versioning strategy so users can anticipate the upgrade/update cycle. -->
|
||||
|
||||
## More information
|
||||
|
||||
<!-- List out where the user can find additional information, such as working group meeting times, slack/IRC channels, or documentation for the product this collection automates. At a minimum, link to: -->
|
||||
|
||||
- [Ansible Collection overview](https://github.com/ansible-collections/overview)
|
||||
- [Ansible User guide](https://docs.ansible.com/ansible/devel/user_guide/index.html)
|
||||
- [Ansible Developer guide](https://docs.ansible.com/ansible/devel/dev_guide/index.html)
|
||||
- [Ansible Collections Checklist](https://github.com/ansible-collections/overview/blob/main/collection_requirements.rst)
|
||||
- [Ansible Community code of conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html)
|
||||
- [The Bullhorn (the Ansible Contributor newsletter)](https://us19.campaign-archive.com/home/?u=56d874e027110e35dea0e03c1&id=d6635f5420)
|
||||
- [News for Maintainers](https://github.com/ansible-collections/news-for-maintainers)
|
||||
<!--start support -->
|
||||
<!--end support -->
|
||||
|
||||
## Licensing
|
||||
|
||||
<!-- Include the appropriate license information here and a pointer to the full licensing details. If the collection contains modules migrated from the ansible/ansible repo, you must use the same license that existed in the ansible/ansible repo. See the GNU license example below. -->
|
||||
|
||||
GNU General Public License v3.0 or later.
|
||||
|
||||
See [LICENSE](./LICENSE) to see the full text.
|
||||
|
||||
@@ -2,34 +2,32 @@
|
||||
|
||||
## Continuous integration
|
||||
|
||||
The collection is tested with a [molecule](https://github.com/ansible-community/molecule) setup covering the included roles and verifying correct installation and idempotency.
|
||||
In order to run the molecule tests locally with python 3.9 available, after cloning the repository:
|
||||
The `hack/e2e-setup.sh` script contains the steps necessary to reproduce the CI test environment, which relies on `kubectl` and `kind`.
|
||||
|
||||
```
|
||||
pip install yamllint 'molecule[docker]~=3.5.2' ansible-core flake8 ansible-lint voluptuous
|
||||
molecule test --all
|
||||
```
|
||||
|
||||
## Test playbooks
|
||||
## Example config and playbooks
|
||||
|
||||
Sample playbooks are provided in the `playbooks/` directory; to run the playbooks locally (requires a rhel system with python 3.9+, ansible, and systemd) the steps are as follows:
|
||||
Sample playbooks and inventory configurations are provided in the `examples/` directory; to run the playbooks locally, build the testing environment with the script above, then the steps are as follows:
|
||||
|
||||
```
|
||||
```bash
|
||||
# setup environment
|
||||
pip install ansible-core
|
||||
# clone the repository
|
||||
git clone https://github.com/ansible-middleware/amq
|
||||
cd amq
|
||||
git clone https://github.com/kubevirt/kubevirt.core
|
||||
cd kubevirt.core
|
||||
# install collection dependencies
|
||||
ansible-galaxy collection install -r requirements.yml
|
||||
# install collection python deps
|
||||
pip install -r requirements.txt
|
||||
# create inventory for localhost
|
||||
cat << EOF > inventory
|
||||
[amq]
|
||||
localhost ansible_connection=local
|
||||
EOF
|
||||
# run the playbook
|
||||
ansible-playbook -i inventory playbooks/activemq.yml
|
||||
# setup environment
|
||||
hack/e2e-setup.sh
|
||||
# run inventory source
|
||||
ansible-inventory -i examples/inventory.kubevirt.yml
|
||||
# create a virtual machine
|
||||
ansible-playbook -i examples/inventory.kubevirt.yml examples/play-create-min.yml
|
||||
# terminate a virtual machine
|
||||
ansible-playbook -i examples/inventory.kubevirt.yml examples/play-delete.yml
|
||||
# terminate the environment
|
||||
hack/e2e-setup.sh --cleanup
|
||||
```
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
|
||||
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
|
||||
.highlight .gd { color: #A00000 } /* Generic.Deleted */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
|
||||
.highlight .gr { color: #FF0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||
|
||||
@@ -89,18 +89,13 @@
|
||||
<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><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#ansible-version-compatibility">Ansible version compatibility</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#included-content">Included content</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#using-this-collection">Using this collection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#code-of-conduct">Code of Conduct</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#communication">Communication</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#contributing-to-this-collection">Contributing to this collection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#collection-maintenance">Collection maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#governance">Governance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#tested-with-ansible">Tested with Ansible</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#external-requirements">External requirements</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#included-content">Included content</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#using-this-collection">Using this collection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#release-notes">Release notes</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#roadmap">Roadmap</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#more-information">More information</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="README.html#licensing">Licensing</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -119,7 +114,7 @@
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="testing.html#continuous-integration">Continuous integration</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="testing.html#test-playbooks">Test playbooks</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="testing.html#example-config-and-playbooks">Example config and playbooks</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributor’s Guidelines</a></li>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -53,7 +53,7 @@
|
||||
<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="#test-playbooks">Test playbooks</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">Contributor’s Guidelines</a></li>
|
||||
@@ -92,32 +92,30 @@
|
||||
<h1>Testing<a class="headerlink" href="#testing" title="Permalink to this heading"></a></h1>
|
||||
<section id="continuous-integration">
|
||||
<h2>Continuous integration<a class="headerlink" href="#continuous-integration" title="Permalink to this heading"></a></h2>
|
||||
<p>The collection is tested with a <a class="reference external" href="https://github.com/ansible-community/molecule">molecule</a> setup covering the included roles and verifying correct installation and idempotency.
|
||||
In order to run the molecule tests locally with python 3.9 available, after cloning the repository:</p>
|
||||
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">pip install yamllint 'molecule[docker]~=3.5.2' ansible-core flake8 ansible-lint voluptuous</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">molecule test --all</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<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="test-playbooks">
|
||||
<h2>Test playbooks<a class="headerlink" href="#test-playbooks" title="Permalink to this heading"></a></h2>
|
||||
<p>Sample playbooks are provided in the <code class="docutils literal notranslate"><span class="pre">playbooks/</span></code> directory; to run the playbooks locally (requires a rhel system with python 3.9+, ansible, and systemd) the steps are as follows:</p>
|
||||
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="c1"># setup environment</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">pip install ansible-core</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain"># clone the repository</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">git clone https://github.com/ansible-middleware/amq</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">cd amq</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain"># install collection dependencies</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">ansible-galaxy collection install -r requirements.yml</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain"># install collection python deps</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">pip install -r requirements.txt</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain"># create inventory for localhost</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">cat << EOF > inventory</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">[amq]</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">localhost ansible_connection=local</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">EOF</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain"># run the playbook</span>
|
||||
<span class="l l-Scalar l-Scalar-Plain">ansible-playbook -i inventory playbooks/activemq.yml</span>
|
||||
<section id="example-config-and-playbooks">
|
||||
<h2>Example config and playbooks<a class="headerlink" href="#example-config-and-playbooks" title="Permalink 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>
|
||||
|
||||
Reference in New Issue
Block a user