Tinderbox/Tbox3 Setup
Setting up Tinderbox3
Much of these instructions come from Andy Howell's notes on installing Tbox3, which can also be found here.
Server Setup
Perl on the server machine
You need the LWP module. You can tell if you have it by running this:
perl -e 'use LWP::UserAgent; print $LWP::UserAgent::VERSION, "\n"'
If you get a version, you have it. If not,
perl -MCPAN -e 'install "Bundle::LWP"
Andy was also using SSL, so he needed:
perl -MCPAN -e 'install "Crypt::SSLeay"'
Database Setup
Tinderbox3 appears to support either mysql or postgress. Successful installations (at least for the DB) include mysql-3.23.52-44 on SuSE linux 8.1, and mysql 4.0.15 on Redhat 9.
MySQL
First you need a tinderbox user, for example tbox, thought the code uses tbox3, so that is the better choice.
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE, DROP,REFERENCES ON tbox.* TO tbox@localhost IDENTIFIED BY 'pass'; mysql> FLUSH PRIVILEGES;
mysql> create database tbox;
Now create the tables:
cd tinderbox3/sql
./setup-mysql.pl --username tbox -p pass
This gives errors saying it can't drop tables. Thats ok, if you run it again it won't complain. OK.
Code Changes
You didn't think you'd get away without modifying some files, did you?
- server/Tinderbox3/DB.pm
Edit dbname, username and password in server/Tinderbox3/DB.pm
- server/Tinderbox3/Login.pm
Edit "superuser" at of file and change url from mozilla your server at line 18
- server/Tinderbox3/InitialValues.pm
Change these if you want. They provide the defaults used when you create an new tree. Once created, the tree's data is in the database.
Web Server
Setup web server to find tinderbox3/server and treat .pl files as cgi scripts.
Running Apache 2.x., the following was added:
Alias /tinderbox /path/to/code/tinderbox3/server <DirectoryMatch "/path/to/code/tinderbox3/server"> Options +ExecCGI +FollowSymLinks AddHandler cgi-script .pl AllowOverride All </DirectoryMatch>
Client Setup
Code Changes
It is recommended that you use the new and improved tinderclient that was posted ot the mozilla-webtools list; it is much more general and is designed to be customized for your site. However, if you don't, here's a quick little patch to add authentication and to fix a missing "use Date::Format"
*** tinderclient.pl.~1.16.~ 2003-03-19 14:56:37.000000000 -0600 --- tinderclient.pl 2004-03-25 10:41:37.000000000 -0600 *************** *** 256,261 **** --- 256,262 ---- my $req = new HTTP::Request(POST => $this->{CONFIG}{url} . "/xml/" . $script ); #my $req = new HTTP::Request(POST => "http://www.mozilla.gr.jp:4321/"); $req->content_type("multipart/form-data; boundary=$boundary"); + $req->authorization_basic('andy', 'yourpassword'); ${$req->content_ref} .= $this->form_data_request($boundary, 'tree', $this->{ TREE}); foreach my $param (keys %{$params}) { *************** *** 1197,1202 **** --- 1198,1204 ---- package TinderClient::Modules::distribute; use strict; + use Date::Format; sub get_config { my ($client, $config, $persistent_vars, $build_vars, $content_ref) = @_;
Setting up a tree
Point your browser at tinderbox/login.pl, logging in as tbox (or a superuser)
Setting up Tests
There is a seperate page for setting up tinderbox3 tests