The Buildbot project is seeking Windows experts to coordinate Windows compatibility. Contact dustin@….
Buildbot on Windows - Installation Instructions.
Notes:
- These have been tested with Windows XP & Vista.
- Author:
- Will Wilson willw -at- fireflyworlds -dot- com.
- Reviewers
- Build master section
- no one yet....
- Build slave section
- Terry Rankine terry.rankine -at- csiro -dot- au.
- Service section
- Terry Rankine terry.rankine -at- csiro -dot- au.
- Build master section
- (Almad) I have also slaves running as services on win2003 server and with python 2.5
Windows Requirements:
- Python 2.4.x
- Python Win32 extensions. Version of Win32 for Python 2.4.
- Twisted framework. Get version 2.4.0 for Python 2.4
- Buildbot
Also works with the following configuration (tested by Vadim Zeitlin):
- Windows XP SP3
- Python 2.5
- Twisted 900 (for Python 2.5)
- Buildbot 0.7.11p3
Also works with the following configuration (tested by Marcus Lindblom):
- Windows Vista 64-bit SP2
- Python 2.6x64
- Twisted 900 (for Python 2.6)
- Buildbot 0.7.12rc1
Windows Installation:
- Install Python.
- Add c:\python24 and c:\python24\scripts to the system PATH.
- Add .py to PATHEXT to enable python files to be executed. Test it in a NEW command prompt window.
echo %PATHEXT%
- Install the Python Win32 extensions.
- Install the twisted framework.
- Try testing the twisted installation at the command prompt. Make sure it shows the correct version of Twisted (2.4.0).
trial --version
NB: if you got this - see step 2....C:\Documents and Settings\buildslave>trial --version 'trial' is not recognized as an internal or external command, operable program or batch file.
- Change directory to the buildbot pre-install folder (the unziped file)
cd c:\<path to extracted buildbot zip folder>
- Install buildbot by typing from the buildbot install folder.
python setup.py install
- If necessary (it isn't with Python 2.5/Buildbot 0.7.11p3)), edit the buildbot.bat file now found in C:\python24\scripts to contain the correct script path (it points at c:\python23\ by default).
<favourite editor... wordpad.exe> C:\python24\scripts\buildbot.bat
- Open a command prompt and check buildbot version information, hopefully returning the version numbers if everything went well.
buildbot --version
Windows build master setup
Prerequisites:
- Install Buildbot and its dependencies.
- Use the Buildbot manual for reference.
Setup process:
- Create a settings directory for build master state. Make sure it's accessible to the build user and reflects the name of the project.
- Create a master to initialise buildbot state in the given folder.
buildbot create-master <dir-path>
- Create a master.cfg file in the new master directory (use the master.cfg.sample for hints). This will hold the configuration script for the build master.
- Setup the master configuration as needed (more details to come).
- Start the build master.
buildbot start <dir-path>
- Check the twistd.log in the build master folder for errors or warnings.
- Assuming the master launched successfully, it should now be hosting its waterfall page (usually at http://localhost:8010/).
- You may want to get a better style sheet for the waterfall display, to do this just adjust "html.Waterfall(..., css='c:\\buildbot.css')" in the master.cfg.
Windows build slave setup
Prerequisites:
- Install Buildbot and its dependencies.
- Use the Buildbot manual for reference.
- You must have a master to connect to - and the details of that master (host, port, slave-name, slave-password)
Setup process:
- Setup a build slave account for the build slave process. (If you are only testing - place the account in the Administrators group - its simpler.)
- Create a settings directory for build slave state. Make sure it's accessible to the build slave user and reflects the name of the project. Something like "bbslave_myproject" would do.
- Get the host name and port (default: 9989) for the build master.
- Get the assigned name and password for this build slave.
- Initialise buildbot state in the given folder.
buildbot create-slave <slave-dir-path> <master-host-name>:<master-port> <slave-name> <slave-password>
- Edit <slave-dir-path>/info/admin and enter your name and email address (as you are the administrator of this build slave).
- Edit <slave-dir-path>/info/host file and enter details and technical specifications for the system running the build slave. (OS, user, slave-dir, intalled pre-reqs and versions)
- Now launch the build slave process. If you have problems, check the twistd.log found in the build slave directory for errors and warnings.
buildbot start <slave-dir-path>
- You should now be able to see your slave bot listed on the waterfall page on the build master.
Windows Buildbot service setup
Prerequisites:
- Install Buildbot and its dependencies.
- Create a working Buildbot master and/or slave installation (see above).
- Use the Buildbot manual for reference.
Setup process:
- Run a command line (under Vista run it as administrator).
- Test that the service installer python file was installed. It should have been installed to the c:\python24\scripts folder.
python <python-dir>\scripts\buildbot_service.py
- Add permission to allow the builder user to "Log on as a service".
secpol.msc -> Local Policies -> User Rights Assignment -> Log on as a service.
orControl Panel -> Administrative Tools -> Local Security (Settings/Policy) -> Local Policies -> User Rights Assignment -> Log on as a service.
or Use the zip provided at the bottom of the page to add this setting for you Here.
- Enter
python buildbot_service.py --user YOURDOMAIN\builduser --password <theuserspassword> --startup auto install
- If you get an error about the account not existing - make the user look like this .\username
C:\Documents and Settings\buildslave>buildbot_service.py --user buildslave --password buildTHIS --startup auto install Installing service BuildBot Error installing service: The account name is invalid or does not exist, or the password is invalid for the account name specified. (1057) C:\Documents and Settings\buildslave>buildbot_service.py --user .\buildslave --password buildTHIS --startup auto install Installing service BuildBot Service installed
- If you get an error about the account not existing - make the user look like this .\username
- Add full permissions for the builder user to registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BuildBot. Not needed if running as Administrator.
- Add full permissions for the build user to the buildbot configuration directories. (NTFS - file system permissions.)
- Enter
buildbot_service.py start "c:/<buildbot_dir>" "d:/<another_buildbot_dir>"
- It should now be up and running, to check for issues consult the event viewer and the twistd.log files.
- Once complete the service should start with the machine.
Troubleshooting Service Install:
- Exceptions during startup are logged in the Event Viewer, under the "Application" log.
- When using Buildbot 0.7.6, and Twisted 2.5.0 or later, ticket #53 may apply (even if you were able to start buildbot from the command line).
- When installing on Windows Vista Family edition, user rights can not be managed using the Administrative Tools. This tool can be used to grant your buildbot user the "Logon as Service" right (based on Microsoft's knowledge base article 132958). Usage: addLogOnAsServiceRight username
- When running buildbot as a service using the instructions above on Windows Server 2003, SVN hangs during the update process (unclear as to why). Also after stopping the service, SVN isn't terminated properly, which may cause subsequent headaches. Running "buildbot start ." works well and the instructions at http://ascendwiki.cheme.cmu.edu/BuildBot also work.
- If you have spaces in you buildbot directory name (say C:\Documents and Settings), it will not work until you give to buildbot_service the 8.3 DOS path: C:\Docume~1.
Notes
Another useful instruction is Installing a Buildbot service on Windows at ASCEND wiki.
Many people use Buildbot Windows slaves, not sure if anyone uses Windows as the master (seems to be Linux, generally) - actually a few people do, see below.
Ben Hearsum began work on an NSIS slave Installer, which installs all needed Buildbot dependencies (Python, Twisted, ZopeInterface) and prompts the user for the info to fill in the .tac file (buildmaster:port, username, password), but the pages don't seem to exist anymore.
Attachments
-
addLogOnAsServiceRight.zip
(22.3 KB) - added by eric.brayet
3 years ago.
Command line tool to give a user the "Logon as Service" right (based on Microsoft's knowledge base article 132958)
![[Buildbot Logo]](/trac/chrome/site/header-text-transparent.png)