Development/Howto/Conveyor

From Mandriva Community Wiki

Jump to: navigation, search
Conveyor Setup

How to setup Conveyor on /your/ buildsystem.

Contents


[edit] How to get Conveyor running

Basically what you have to do to get Conveyor running is setup the Workspaces and their respective Channels. For each Workspace you have, there's a Package Queue and a set of Channels. A Package Queue manages incoming packages and delivers them to Channels in order to be built.

There are two kinds of channels: local and remote. A basic configuration would have a local channel and one or two remote channels running in other architectures (say, x86_64 and PPC).

So, /etc/conveyor/workspace.d/first.conf could be:

[workspace]
name = 2006.0
success-command = repsys markrelease -f $srcpath svn+ssh://localhost/svn/cooker/$srcname

[channel=i586]
type = local
template.type = rsync
template.path = /var/spool/conveyor/templates/2006.0
template.update = yes
slots = 2
required = yes

[channel=x86_64]
type = remote
host = dhcp120.conectiva
port = 8086
transport.type = scp
transport.identity_file = /home/build/.ssh/id_dsa
transport.username = build
required = yes

[channel=ppc]
type = remote
host = ppchost.conectiva
port = 8086
transport.type = scp
transport.identity_file = /home/build/.ssh/id_dsa-ppc
transport.username = build
required = no

In the channel "i586" the option "template.type" indicates how the chroot enviroment of the build will be generated. In this case, it will use rsync to copy the chroot in "template.path" to the slot's root. Currently there's only "rsync" and "tarfile" implemented. The idea is to implement "xen" and "qemu" types, in order to allow a better isolation of the build enviroment (much like the new builsystem of OpenSuse).

The option "required" indicates that if the build (or something else crashes) fails in this channel, the package won't be accepted and "sucess-command" won't be executed (i586 and x86_64 should probably be "required" channels).

The option "slots" indicates how many buildings can run concurrently.

The "transport" options in remote channels define how the SRPM wil be copied from the workspace to the channel host. The only type of transport implemented so far is "scp". Notice that it's assumed that ssh authentication with keys will be properly configured.

In order to get the remote channels running, you have to create workspaces and channels of the type "agent". Here is an example configuration:

[workspace]
name = x86_64
type = agent

[channel=x86_64]
type = agent
port = 8086
template.type = rsync
template.path = /home/build/templates/2006.0/
template.update = yes
slots = 3
required = yes

[edit] Notes about templates

  • local template types (rsync and tarfile) will try to mount --bind /dev to $SLOTROOT/dev, check if it is what you want;
  • Conveyor needs to be installed inside the chroot (this issue will be fixed on demand);

[edit] /etc/conveyor/conveyor.conf

Perhaps the "mail" section is the most important of this file. Here's an example:

[mail]
address = [email protected]
admins = [email protected]
others = [email protected]
fromfield = Conveyor Buildsystem <[email protected]>
notifyAdmins = all
notifyOthers = sucess, failure
notifyPackager = no
smtp = somesmtp.mandriva.com
smtpLogin = None

As you can see, there are three groups which can be notified: "admins", "others" and "packager". There are three kinds of notification: "success", "failure", and "crash". The "crash" is used when something unexpected happens during the chroot-creation, remote host communication and building processes; it's a good idea to notify only the "admin" group.

Personal tools