From Fedora Project Wiki

Revision as of 17:32, 21 October 2015 by Jgreguske (talk | contribs) (Created page with "This page gives an overview of the Koji code and then describes what needs to change if you want to add a new type of task. A new task could be for a new content type, or asse...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page gives an overview of the Koji code and then describes what needs to change if you want to add a new type of task. A new task could be for a new content type, or assembling the results of multiple builds together, or something else that helps your workflow. New contributors to Koji should leave this page knowing where to begin and have enough understanding of Koji's architecture to be able to estimate how much work is still ahead of them.

Component Overview

Koji is comprised of several components, this section goes into details for each one, and what you potentially may need to change.

Koji-Hub

koji-hub is the center of all Koji operations. It is an XML-RPC server running under mod_wsgi in Apache. koji-hub is passive in that it only receives XML-RPC calls and relies upon the build daemons and other components to initiate communication. koji-hub is the only component that has direct access to the database and is one of the two components that have write access to the file system.

Kojid

kojid is the build daemon that runs on each of the build machines. Its primary responsibility is polling for incoming build requests and handling them accordingly. Essentially kojid asks koji-hub for work. Koji also has support for tasks other than building. Creating install images is one example. kojid is responsible for handling these tasks as well. kojid uses mock for building. It also creates a fresh buildroot for every build. kojid is written in Python and communicates with koji-hub via XML-RPC.

Koji-Web

koji-web is a set of scripts that run in mod_wsgi and use the Cheetah templating engine to provide a web interface to Koji. It acts as a client to koji-hub providing a visual interface to perform a limited amount of administration. koji-web exposes a lot of information and also provides a means for certain operations, such as cancelling builds.

Koji-client

koji-client is a CLI written in Python that provides many hooks into Koji. It allows the user to query much of the data as well as perform actions such as adding users and initiating build requests.

Kojira

kojira is a daemon that keeps the build root repodata updated. It is responsible for removing redundant build roots and cleaning up after a build request is completed.


Adding a New Task

Interested in adding a new task, or supporting some other type of build? This section aims to walk through what that will be like for a developer.

Patch Review

If you have a patch to submit, please send it to buildsys-list@lists.fedoraproject.org. Some guidelines for a good patch are listed below too.

  • guide 1
  • guide 2