adding a tinderdaemon
Oliver Lehmann
lehmann at ans-netz.de
Sat Jul 2 08:09:50 EDT 2005
Hi,
Today I thought that sth. like a "tinderdaemon" might be cool, and I
roughtly implemented such a thing.
What is it for?
You can add a Port_Directory regarding to a Host where you want to build
it and a Build against you want to build it. It is planned that you can
add entries from the shell (as root), or from www-exp (after
authorization and in case your login has the permission to add sth to the
queue for host x, for build y)
Right now I played around with that idea by creating 2 tables
hosts:
Host_Id
Host_Name
build_ports_queue:
Build_Ports_Queue_Id
Build_Id
User_Id
Port_Directory
Priority
Host_Id
right now I've implemented:
TinderboxDS.pm
addHost
getBuildPortsQueueByHost
getBuildPortsQueueById
getHostByName
getHosts
getBuildPortsQueue
isValidHost
isValidBuildPortsQueueId
removeBuildPortsQueueEntry
tc:
addHost
getBuildPortsQueue
rmBuildPortsQueueEntry
new files:
Host.pm
BuildPortsQueue.pm
And... right now it works...
mysql> select * from build_ports_queue\G
*************************** 1. row ***************************
Build_Ports_Queue_Id: 1
Build_Id: 2
User_Id: 1
Port_Directory: devel/gettext
Priority: 1
Host_Id: 1
1 row in set (0.00 sec)
mysql> select * from hosts\G
*************************** 1. row ***************************
Host_Id: 1
Host_Name: kartoffel.salatschuessel.net
1 row in set (0.00 sec)
mysql>
root at kartoffel scripts> ./tinderdaemon
INFO: Creating build directory for 6-CURRENT-amd64-cvs from
repository...
================================================
building packages (phase 1)
================================================
started at Sat Jul 2 13:33:41 CEST 2005
ended at Sat Jul 2 13:36:08 CEST 2005
phase 1 took 00:02:27
102 packages built
268M of packages
================================================
building packages (phase 2)
================================================
started at Sat Jul 2 13:36:08 CEST 2005
ended at Sat Jul 2 13:36:09 CEST 2005
phase 2 took 00:00:01
103 packages built
268M of packages
INFO: I have nothing to do, Sleeping 120 seconds
INFO: I have nothing to do, Sleeping 120 seconds
INFO: I have nothing to do, Sleeping 120 seconds
INFO: I have nothing to do, Sleeping 120 seconds
So - anyone else interested in this? Then I'm willing to put that furhter
by adding the ability to add Queue-entries from shell and web (which
includes all that authorization/user management stuff)
--
Oliver Lehmann
http://www.pofo.de/
http://wishlist.ans-netz.de/
More information about the tinderbox-list
mailing list