Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example of integration with kubevirt #3972

Merged
merged 5 commits into from
Aug 1, 2023

Conversation

jangel97
Copy link
Contributor

@jangel97 jangel97 commented Jul 22, 2023

Greetings,

In our team, we handle important Ansible roles to configure various aspects of RHEL systems, such as sshd, firewalld, grub, crypto-policies, and more. Although we have implemented automated testing with Molecule and Podman, there are instances where manual testing on our RHEL hosts becomes necessary before we proceed with deployment. I propose the integration of Molecule with Kubevirt as a potential solution to this issue. Such an integration would allow us to quickly and effectively test our Ansible roles on actual VMs, enhancing our testing procedures and providing more reliable results.

Some benefits of testing on VMs:

  1. System-level realism: Ephemeral VMs provide a complete, isolated guest OS environment, much like your production environment. Containers share the host's kernel and are not fully isolated. This difference can occasionally lead to inconsistencies between testing and production environments. With VM-based testing, you can ensure the roles will work as expected on the actual operating system.

  2. Broader Compatibility: Not all applications or configurations are container-friendly, especially when they interact with the system at a low level. VMs provide broader compatibility for testing as they offer a full-fledged OS environment.

  3. Improved Debugging: Since VMs provide an entire guest operating system, it is often easier to debug issues related to system services, kernel modules, and other low-level components.

  4. Greater Variety of Testing: VMs can run different kernel versions, different operating systems, or different system-level configurations. In contrast, containers are somewhat limited by the features and configurations of the host kernel.

In this pull request, I have utilized ephemeral VMs as a part of my example to showcase the benefits of this approach. By harnessing the capabilities of ephemeral VMs, we can test our Ansible roles in a highly realistic environment that closely mirrors our actual production environment, taking full advantage of the benefits outlined above.

This example serves as a practical guide to illustrate how a real-world application of Molecule and Kubevirt integration can enhance our current testing methods, enabling more realistic testing.

@jangel97 jangel97 requested review from a team as code owners July 22, 2023 17:11
@jangel97 jangel97 force-pushed the add_kubevirt_integration_example branch 3 times, most recently from 5ef69c3 to da24b90 Compare July 23, 2023 12:37
@ssbarnea ssbarnea changed the title add example of integration with kubevirt Add example of integration with kubevirt Jul 23, 2023
@ssbarnea ssbarnea added the docs label Jul 23, 2023
@ssbarnea ssbarnea added this to the Molecule 6 milestone Jul 23, 2023
@audgirka
Copy link
Contributor

@jangel97 The tests are missing for this PR

@jangel97
Copy link
Contributor Author

@ajinkyau , this PR is adding an example to the Molecule documentation, showing users how to connect Molecule with Kubevirt using the default driver. It's not clear, though, how we can test this new addition. Are there any testing procedures already in place for the existing documentation, like the one we have for Podman integration https://ansible.readthedocs.io/projects/molecule/podman, that we can use as a reference?

@jangel97
Copy link
Contributor Author

jangel97 commented Jul 28, 2023

@ajinkyau , this PR is adding an example to the Molecule documentation, showing users how to connect Molecule with Kubevirt using the default driver. It's not clear, though, how we can test this new addition. Are there any testing procedures already in place for the existing documentation, like the one we have for Podman integration https://ansible.readthedocs.io/projects/molecule/podman, that I can use as a reference?

I've already conducted some tests in my environment, using a few different versions of Ansible. These tests were performed using an OpenShift cluster with Kubevirt available, and everything worked as expected for me using the code provided in the PR.

@zhan9san
Copy link
Contributor

@jangel97

Thanks for your contribution.

Please refer to the changes in following files in #3978

tox.yml
mkdocs.yml
test_command.py

@zhan9san zhan9san added the bug label Jul 29, 2023
@audgirka audgirka force-pushed the add_kubevirt_integration_example branch from ddbe892 to e2fb422 Compare August 1, 2023 09:09
@audgirka audgirka enabled auto-merge (squash) August 1, 2023 09:53
@audgirka audgirka disabled auto-merge August 1, 2023 10:01
@audgirka audgirka merged commit 3c75d0c into ansible:main Aug 1, 2023
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants