#30 Draft: Introduce test plan.
Opened a year ago by jackorp. Modified 3 months ago
rpms/ jackorp/vagrant tmt  into  rawhide

file added
+1
@@ -0,0 +1,1 @@ 

+ 1

@@ -0,0 +1,12 @@ 

+ ---

+ - hosts: all

+   name: Add user for use with qemu:///session

+   become: true

+   tasks:

+     - name: Add user with libvirt group

+       ansible.builtin.user:

+         name: test

+         state: present

+         uid: 1122

+         groups: libvirt

+         append: true

@@ -0,0 +1,14 @@ 

+ ---

+ - hosts: all

+   name: Install requred packages for tests

+   become: true

+   tasks:

+     - name: Install packages for basic vagrant libvirt functionality

+       ansible.builtin.dnf:

+         name:

+           - ruby

+           - vagrant-libvirt

+             # Config files for vagrant's networking.

+           - libvirt-daemon-config-network

+           - libvirt-daemon-config-nwfilter

+         state: present

@@ -0,0 +1,20 @@ 

+ ---

+ - hosts: all

+   name: Enable modularized libvirt service

+   become: true

+   tasks:

+     - name: Enable libvirt qemu

+       ansible.builtin.systemd:

+         name: virtqemud.service

+         enabled: true

+         state: started

+     - name: Enable libvirt network

+       ansible.builtin.systemd:

+         name: virtnetworkd.service

+         enabled: true

+         state: started

+     - name: Enable libvirt storage

+       ansible.builtin.systemd:

+         name: virtstoraged.service

+         enabled: true

+         state: started

@@ -0,0 +1,46 @@ 

+ ---

+ - hosts: all

+   become: true

+   name: Enable NFS functionality on host

+   tasks:

+     - name: Install nfs and firewall tools

+       ansible.builtin.dnf:

+         name:

+           - nfs-utils

+           - python3-firewall

+           - firewalld

+         state: present

+ 

+     - name: Start and enable NFS services

+       ansible.builtin.systemd:

+         name: nfs-server

+         enabled: true

+         state: started

+ 

+     - name: Allow NFS3 firewall service

+       ansible.posix.firewalld:

+         zone: libvirt

+         service: nfs3

+         permanent: true

+         state: enabled

+ 

+     - name: Allow NFS firewall service

+       ansible.posix.firewalld:

+         zone: libvirt

+         service: nfs

+         permanent: true

+         state: enabled

+ 

+     - name: Allow MountD firewall service

+       ansible.posix.firewalld:

+         zone: libvirt

+         service: mountd

+         permanent: true

+         state: enabled

+ 

+     - name: Allow rpc-bind firewall service

+       ansible.posix.firewalld:

+         zone: libvirt

+         service: rpc-bind

+         permanent: true

+         state: enabled

file added
+54
@@ -0,0 +1,54 @@ 

+ summary: Test for general vagrant functionality in Fedora

+ 

+ discover:

+   how: fmf

+   url: https://github.com/jackorp/vagrant-test

+   ref: tmt-ci

+ 

+ prepare:

+   - how: ansible

+     playbook:

+       - ansible/install_packages.yml

+       - ansible/prepare_libvirt.yml

+       - ansible/add_user_with_libvirt.yml

+     extra-args: '-vvv'

+ 

+ execute:

+   how: tmt

+ 

+ environment:

+   DRIVER: "qemu"

+ 

+ /fedora:

+   environment+:

+     BOX: "fedora/37-cloud-base"

+   /base:

+     discover+:

+       filter+: "tag:base|tag:qemu_session"

+   /qemu_connection:

+     discover+:

+       filter+: "tag:qemu_system"

+   /nfs_shared_folder:

+     discover+:

+       filter+: "tag:nfs"

+     adjust+:

+       # NFS currently requires additional tinkering.

+       enabled: false

+       prepare+:

+       - how: ansible

+         playbook:

+           - ansible/prepare_nfs.yml

+   /sshfs_shared_folder:

+     discover+:

+       filter+: "tag:sshfs"

+     adjust+:

+       prepare+:

+       - how: install

+         package:

+           - vagrant-sshfs

+ 

+ /centos-8:

+   discover+:

+     filter+: "tag:base"

+   environment+:

+     BOX: "centos/8"

This is just to test the testing farm capabilities for Vagrant. (hopefully tmt gets picked up)

rebased onto f3072c682460b337eb312faa444a09ae5f4341a9

a year ago

1 new commit added

  • Add prepare step.
a year ago

1 new commit added

  • Skip reboot inside ansible, TMT does not cope with it well.
a year ago

1 new commit added

  • Lower verbosity and start libvirt storage service
a year ago

4 new commits added

  • Lower verbosity and start libvirt storage service
  • Skip reboot inside ansible, TMT does not cope with it well.
  • Add prepare step.
  • Introduce tmt test plan.
a year ago

1 new commit added

  • Start sockets instead of services
a year ago

Just a small question.
In my understanding, "recheck" is to run Zuul CI. "[citest]" is to run Fedora CI? I couldn't find the document.

Just a small question.
In my understanding, "recheck" is to run Zuul CI. "[citest]" is to run Fedora CI? I couldn't find the document.

Yes. You are correct.
The mention is here: https://docs.fedoraproject.org/en-US/ci/pipeline/#_reschedule and https://docs.fedoraproject.org/en-US/ci/pipeline/#_pull_request

OK. Thanks for the info.

Looks great!

I'd move the github vagrant-test repo to tests/ namespace here on pagure.

rebased onto 46ec957

a year ago

6 new commits added

  • Categorize tests based on tags and extend the test list.
  • Start sockets instead of services
  • Lower verbosity and start libvirt storage service
  • Skip reboot inside ansible, TMT does not cope with it well.
  • Add prepare step.
  • Introduce tmt test plan.
a year ago

6 new commits added

  • Start only modularized systemd services.
  • Move ansible playbook for adding user sooner. Fix env appending
  • Only append libvirt group to the user.
  • libvirt-daemon-config-network is required for creation of virbr0 on libvirt network service start.
  • Add ansible playbook to prepare NFS and related rules.
  • Fix ansible-lint complaints.
a year ago