Edgewall Software

Configuring a Windows Bitten Slave

These steps should enable a bitten slave on Windows.

  • Install python, setuptools and bitten
  • Install bitten "easy_install http://svn.edgewall.org/repos/bitten/trunk/"
  • Execute the bitten command "bitten-slave --verbose --config=bitten.ini --log=bitten.log http://www.example.com/tract/project/builds"
  • You should now have a working bitten slave. Of course, the bitten slave may go down periodically, like when you log off. To keep the slave running there are a number of options. Some involve creating a windows service, which I couldn't get working, but are probably better. An alternative is to just create a scheduled task. To start, create a python file "bittenLaunch.py" along side "bitten.ini" that simply relaunches the bitten slave if "bitten-slave" is not found with the "tasklist" command.
    #!/usr/bin/env python
    
    import subprocess, time
    
    cmd = ['bitten-slave.exe',
              '--verbose',
              '--config=bitten.ini',
              '--log=bitten.log',
              'http://www.example.com/trac/project/builds']
    
    
    if cmd[0] not in subprocess.Popen('tasklist', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.read()[:]:
        p = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
    
  • Add the above script as a scheduled task.
    • Go to "Start -> Control Panel -> Administrative Tools -> Services"
    • Make sure the Task Scheduler is running and set to automatic.
    • Log off and log on and check that the Task Scheduler is still running.
    • Go to "Start -> Accessories -> System Tools -> Scheduled Tasks"
    • Add "\path\to\bittenLaunch.py" along with the correct location to run in.
    • To get the task to run very frequently (every few minutes), click on the "schedule" tab and then click on "advanced". Also set the time for allowing this frequency to the maximum (9999 hours).