close Warning: Error with navigation contributor "AccountModule"

Changes between Initial Version and Version 1 of BuildAutomation


Ignore:
Timestamp:
May 3, 2011, 12:28:53 PM (7 years ago)
Author:
James O'Gorman
Comment:

Add a page describing build slaves and how to set one up.

Legend:

Unmodified
Added
Removed
Modified
  • BuildAutomation

    v1 v1  
     1= Build Automation =
     2
     3The Bitten plugin for Trac has been installed to allow automation of builds. Build slaves can be configured to run in the background so that whenever a source code checkin is made, the affected part of the tree is rebuilt and tested. This mainly applies to [source:box/trunk trunk].
     4
     5For a list of currently configured build slaves, check the [/build Build Status] page.
     6
     7== Setting Up a Build Slave ==
     8
     9If you wish to run a build slave for a platform that is not already set up, please contact the developers so that Trac can be configured. Currently we only test on a few platforms so more are always welcome!
     10
     11Slaves are authenticated using Trac accounts, so you must request an account if you do not already have one. Authentication is performed via HTTPS.
     12
     13Download the latest !BittenSlave from http://bitten.edgewall.org/wiki/Download and the [source:box/bitten/minion minion] utility. Minion is provided by the Box Backup project. [[BR]]
     14'''N.B.''' It is recommended to set up a dedicated user for running the build slave to ensure a clean environment, but this is not a requirement. [[BR]]
     15Once !BittenSlave has been installed copy `minion` to the directory you want builds to be run from. Ensure it is executable.
     16
     17Generate the `bitten-slave` configuration:
     18{{{
     19$ ./minion gen-config
     20Config generated as sunos.ini.
     21Please set Trac user/pass in the [authentication] section.
     22}}}
     23
     24As instructed, set the username and password for Trac in the config file. There is also a section in the file (commented out) for masking the machine's hostname.
     25
     26Run `minion` for the first time. This will perform a check of the environment.
     27{{{
     28$ ./minion
     29This looks like the first time you've run the bitten minion.
     30I need to check a few things out first...
     31
     32Checking for Subversion... OK
     33Checking for autoconf... OK
     34Checking for automake... OK
     35Checking for gcc... OK
     36Checking for g++... OK
     37Checking for xsltproc... OK
     38Checking for LWP::UserAgent... OK
     39Checking if SSH key exists...
     40  ==> SSH key does not exist. Running ssh-keygen.
     41Generating public/private rsa key pair.
     42Your identification has been saved in /home/bitten/.ssh/bitten-minion.
     43Your public key has been saved in /home/bitten/.ssh/bitten-minion.pub.
     44The key fingerprint is:
     45xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx bitten@builder
     46
     47  ==> SSH key generated. Be sure to have the key uploaded to the build master!
     48
     49All done! Binaries look fine, but make sure you have headers for the following:
     50 - openssl
     51 - zlib
     52
     53Exiting so you can check this, rather than having failed builds reported.
     54Just re-run minion when ready.
     55}}}
     56
     57Take good note of its output! You '''__must__''' ensure that the OpenSSL and Zlib libraries and headers are installed! If anything is missing then builds will be reported as failed. If unsure, try manually compiling trunk and running the unit tests. An SSH key is also generated as part of the output to facilitate uploading of binaries produced. Please ensure you send the ''public'' portion of the key to one of the developers. (Ask on the boxbackup-dev list if you aren't sure.)
     58
     59Once everything has been verified `minion` can be started:
     60{{{
     61$ ./minion
     62[INFO    ] Slave launched at 2011-05-03 11:33:53
     63[INFO    ] No pending builds
     64}}}
     65
     66By default it will run in the foreground and log to a file called `bitten.log` in the same directory. If you wish to background it, you may start it with `nohup`.
     67{{{
     68$ nohup ./minion &
     69}}}
     70
     71There are also examples for daemonizing the slave on the [http://bitten.edgewall.org/wiki/BittenSlaveDaemon bitten website].