Using Tunir to test Fedora Cloud images

In Fedora 22, one of the new features from the Cloud SIG is a project called Tunir. It is a very simple system which can be used to test Fedora Cloud images, or it can be used to test any normal software project using the Cloud images or bare metal systems.

The Fedora QA team and contributors test the Fedora Cloud images before they get released. This link contains the list of tests. Previously you had to manually start a cloud instance, run each command, and check the output for the tests. Tunir replaces these manual steps with automatic ones. To test a Cloud image you don’t even need a cloud locally. It directly boots up an instance using libvirt.

This post explains how you can use Tunir to test the daily cloud image builds, and contribute to the Fedora Cloud SIG.

First install the package on your system:

$ sudo dnf install tunir -y

Now enable and start redis service. Tunir uses redis to store the available port numbers for the cloud instances:

$ sudo systemctl enable redis
$ sudo systemctl start redis

Now put the available ports on the queue of port numbers by running the following command:

$ sudo python /usr/share/tunir/

Tunir is now ready to roll. The tests which we use for Fedora Cloud images are already available as simple Python unit test cases.

You can download the latest nightly build or a formal release of Fedora Cloud image. Then do a git checkout of the following repo:

$ git clone

In the repo, there is a file called fedora.json which contains the configuration for the test jobs. To use them, change the path of the image file to point to the qcow2 image downloaded earlier. Then you can execute tunir like:

$ sudo tunir --job fedora --stateless

This starts the job “fedora.” The configuration comes from the json file which we edited before. There is a fedora.txt file which contains the actual commands to execute. You can report any failure to the Fedora Cloud SIG through the mailing list, or in the IRC channel #fedora-cloud over freenode.

Fedora Project community


  1. Petr Schindler

    Hi, just one note. tunir packages doesn’t seem to be in repositories yet. There is build in koji but no update have been created yet in bodhi. Thanks for this post. It will help a lot with release testing 🙂

Comments are Closed

The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat. Fedora Magazine aspires to publish all content under a Creative Commons license but may not be able to do so in all cases. You are responsible for ensuring that you have the necessary permission to reuse any work on this site. The Fedora logo is a trademark of Red Hat, Inc. Terms and Conditions