Tinderbox

The site tinderbox.opsera.com shows the current state of the Nagios Plugin builds. It uses Mozilla's Tinderbox 2 software.

Note: The Tinderbox site index page redirects here so we can use our CMS system to host this front page.

The design consists of this Tinderbox 2 server and satellite build clients. The build clients run the tinderbox_build script in the Nagios Plugins code and then send back their build logs in a format that the Tinderbox software understands. Then it will display the current state.

We welcome anyone who can donate time on a build server to return their build information. This will help track any problems and ensure that new builds continue to work on your platform of choice.

Status

Note: Some of the links within the status pages do not work correctly yet (mainly the ones that go to the version control system).

How you can add your build client

Firstly, get the snapshot.

The snapshot is created on Sourceforge every 12 hours. Download the snapshot (use the permanent link) and untar into a working directory. Note: The name is HEAD to keep with the old CVS name. The snapshot is actually based off the trunk portion of the nagiosplug project.

Tinderbox can allow building against SVN directly, but this has not been documented yet - the Solaris 10 server is run this way. Please contact Thomas on the nagiosplug-devel mailing lists if you are keen on this to be setup.

Secondly, make sure a manual run is okay.

Nothing will be sent to the tinderbox server yet. Follow these to make sure your tests pass.

Run:

tools/tinderbox_build

This will prompt for some test options if you've never run the tests before. You can run individual tests by cd'ing into plugins or plugins-script and running:

perl t/check_http.t

Run "make test" at the top level until all tests pass. Please raise a sourceforge bug if a test will not pass (most tests should work correctly).

Test parameters

The main variables to the testing are stored in the file /var/tmp/NPTest.cache. Amend the values here if you want to change any, as there is not a user interface at the moment. Some systems may require the full path as ~ may not expand out correctly.

If you are testing the check_by_ssh plugin, you will also need to setup an identity file so that you can ssh to localhost. You can set the authorized_keys file so that access is limited to a specific host, with the format:

from="{host}" {key}

Where {key} is the ssh public key and {host} is your full hostname (usually the first entry returned by "resolveip 127.0.0.1", although "hostname -f" may work too). Don't forget the double quotes around the hostname!

Getting access to send build logs to Tinderbox server

Email ton.voon@opsera.com to get access to send to the tinderbox server. You will need to include your SSH public key.

Once we have setup your access, test your connection by running:

echo "" | ssh tinderbox2@tinderbox.opsera.com tinderbox_receive

You should get a message saying "No Tinderbox variables found in message". Continue until you get a connection without any prompts.

Now you can run a build and send data to the tinderbox server:

tools/tinderbox_build -y

There are some important environment variables you can set before running the tinderbox_build script:

TINDERBOX_BUILD_ADMIN # set to your email address. Defaults to user@hostname. Obscure if you wish, but useful to know who to contact if a server is causing problems
CONFIGURE_ARGS # arguments to pass to the configure script

Checking updated status

The status page will be updated every hour, so you may not see your results straight away.

Also note that the start time for your build is set to the time of the snapshot. This means the time taken to build will not be accurate.

Automating your builds

Create a wrapper script to run the build. There are four steps:

  1. Set any environment variables you want
  2. Either:
    • Download the snapshot, unpack into a temporary directory and cd into it. Or
    • svn export the latest code and cd into it (this option has not been fully documented)
  3. Run ./tools/tinderbox_build -y
  4. Remove entire build directory

Set cron to run. It doesn't matter about the frequency, but it doesn't make sense to run it more than every hour (or every 12 hours if using the snapshot). Once a day would be very helpful.