Buildbot Network

From MythTV Official Wiki
Revision as of 13:31, 3 March 2014 by Stuarta (talk | contribs)

Jump to: navigation, search

Buildbot Network

MythTV uses an extensive set of buildslaves, running different operating systems, different versions of Qt (Qt4 & Qt5) as well as different compilers. The aim of this is to validate all changesets do not affect our ability to build on the different platforms.

The intention is to ensure that MythTV will build and run on all the current distro flavours, and in particular on the long term stable variants. eg.

  • Debian Stable
  • Ubuntu LTS
  • Fedora
  • RHEL/Centos6 is not an option due to the Qt version being too old.

Build Master

You can look at the progress of current builds or the history of the most recent builds by visiting BuildMaster. I'd recommend either the waterfall or console pages.

Setting up a build slave

Setting up a build slave is a relatively simple process. If you have a server capable of running a virtual machine or three, then offers of buildslaves are always welcome. Please contact the developers via IRC #mythtv on freenode.

Basic VM configuration

  • 1x CPU
  • 2Gb RAM
  • 8Gb OS Disk
  • 50Gb /home

Installation

Install the operating system you are planning to use, along with all the required packages. Here are a few recipies for setting up buildslaves

  • [Buildslave-Debian Debian]
  • [Buildslave-Ubuntu Ubuntu]
  • [Buildslave-Fedora Fedora]
  • [Buildslave-FedoraQt5 FedoraQt5]

You should also create a buildslave user, and configure ccache to be allowed to use 10Gb of cache `ccache -M 10G`

Connecting to the build network

For this you will need to talk to the developers on IRC again. You should create a passwordless ssh key for your buildslave user, this will need to be added to allow the builder to checkout the code from our git repository.

You will be provided with the following pieces of information

  • your buildslave's name
  • the password assigned to your buildslave
  • the hostname and port number of the buildmaster, i.e. buildbot.example.org:8007

Create the buildslave

run the 'buildslave' command as follows

  buildslave create-slave BASEDIR MASTERHOST:PORT SLAVENAME PASSWORD

I suggest using mythtv as your BASEDIR. Please make sure you edit info/host and info/admin in your BASEDIR so we know some information about your buildslave and your contact details

Then a build can be forced by talking to MythBuild on irc in #mythtv-commits

  MythBuild: force build <buildslave_name> <message>

Autostart on boot

Configuring the buildslave to autostart on system boot is a very simple step. Create a script `~/bin/start-buildslave.sh` with the following contents

  #!/bin/bash
  cd ~/mythtv
  /usr/bin/buildslave stop
  exec /usr/bin/buildslave start

Then `chmod +x ~/bin/start-buildslave.sh`.

Next edit crontab to start it at boot time. As the buildslave user run `crontab -e` and add the following line

 @reboot /home/buildslave/bin/start-buildslave.sh