Running Taskotron Tasks

Installing libtaskotron

Refer to the quick start guide for the basics.

libtaskotron modules

As functionality has been added to libtaskotron, we’ve started breaking up that functionality into modules to increase flexibility and shrink the minimal install profile. Each module is packaged separately for easy installation.

libtaskotron is composed of 3 modules - libtaskotron-core, libtaskotron-fedora and libtaskotron-disposable.

libtaskotron-core
The minimum needed to run tasks with libtaskotron. It consists of the most basic bits that most tasks will use.
libtaskotron-fedora
The fedora-specific functionality which is in libtaskotron - things like bodhi, koji and rpm-based directives.
libtaskotron-disposable
The bits needed to enable execution with disposable clients. Local-only execution is still possible without this module. Note that libtaskotron-disposable depends on testcloud which will pull in several other non-trivial dependencies.

Running tasks

Refer to the quick start guide for the basics.

Using task-rpmlint as an example, the task repository contains the following important files:

task-rpmlint/
    run_rpmlint.py
    runtask.yml

Rpmlint runs off of Koji builds, so let’s run it against the example build of htop-2.0.2-1.fc25 (feel free to substitute it with a different existing build):

runtask --item htop-2.0.2-1.fc25 --type koji_build runtask.yml

The build will be downloaded to a local tempdir, rpmlint will be run against that build and the results will be printed to the console in Task Result Format.

Note

task-rpmlint checks the whole build including all binary architectures in a single pass, so it doesn’t need --arch <arch> parameter passed in (it even ignores it). However, some tasks are arch-specific and you’ll need to specify it (for such a task, you can see arch specified in the Input section of its formula).

Using remote machines

While the default execution path will run tasks on a local machine, it is also possible to delegate task execution to a remote machine or spawn a disposable virtual machine for task execution.

Pre-existing remote machines

To use an already-existing remote machine, use the --ssh <user>@<ip address>[:port] argument to runtask. This will signal the runner to connect to the indicated machine and execute tasks there instead of locally.

Note

At the moment, it is expected that you connect to the machine as root.

Disposable VMs

Libtaskotron can spawn a one-shot virtual machine for you, run the task on it, and tear the VM down. To do this, use --libvirt command line option. Note that the image available by default is very generic and this can add significantly to execution time.

You can create your own images to be used as disposable VMs. For more in-depth information, see Disposable Clients in libtaskotron.