| Version 44 (modified by heinrich5991, 2 years ago) (diff) |
|---|
The Buildbot project is seeking Windows experts to coordinate Windows compatibility. Contact dustin@….
Buildbot on Windows - Installation Instructions.
Prerequisites
- Python 2.x. <!-- At the time of this writing, Twisted doesn't support Python 2.7, so use Python 2.6 for now. If you notice that Twisted has 2.7 binaries available, please come back and edit this page to just say " --> Use the latest 2.x version of Python <!-- " or similar! -->
- PyWin32. Match the version with the python you installed.
- Twisted. Match the version with the python you installed.
- Zope.Inteface. This was basically impossible to get installed on Windows. The author got it to work by installing setuptools and then easy_installing it via "C:python26scriptseasy_install zope.interface".
- Buildbot, of course. You need 0.8.2 or later.
For the remainder of this document we will assume python was installed in "C:Python26". Please adjust accordingly if you install to a different path.
Install python, pywin32, and Twisted for all users. You will need administrator privileges to install these dependencies, but not for installing buildbot itself. The latter two should look up the registry key and know where to install to such that they work with the python you've installed, but you may have to do some adjusting if you've got multiple versions of python installed.
Install Buildbot itself with
C:python26python setup.py install
It does not need administrator rights to install.
Test Your Installation
The following command
C:python26python C:python26scripts rial.py --version
should run through without error, and print out the twisted version number.
The command
C:python26scriptsuildslave --version
should report a couple version numbers and exit.
Create a User
The rest of this document assumes you are running as a non-privileged user. We recommend creating one specifically for your build slave.
Setup
Basic setup under windows is the same as under other operating systems. Run buildslave create-slave <options> to create your slave directory. Edit the info files in the slave directory as appropriate. Then start the buildslave process. Check twistd.log for any error messages.
You can call it quits and be done at this point. Any time the command prompt buildslave is running under closes, your slave will shutdown -- this includes reboots for windows update! Thus it is highly desirable to install buildbot as a windows service. When installed as a service, Windows will automatically restart your slave after a reboot.
Service
You'll need to grant your non-privileged user the ability to run services. To do this, run secpol.msc as an Administrator (the author found the easiest way to do this was to right-click a command line prompt and "run as administrator", and then enter secpol.msc in the command line). Then:
- Select the "Local Policies" folder
- Select the "User Rights Assignment" folder
- Double click "Log on as a service"
- Use "Add User or Group..." to add your non-privileged user here.
If you don't already have one open, open up a command shell running as administrator. Then use a builtin buildbot script to install a service for buildbot:
C:python26python contribwindowsuildbot_service.py
--user YOURDOMAINusername
--password thepassword
--startup auto
install
(except all as one line, of course!) Note the "YOURDOMAIN" part is required. For most setups, you can replace "YOURDOMAIN" with ".", making the full user name ".username".
The next bit of setup involves adding permissions on a certain registry key. However, the registry key does not yet exist because the service has never been started. Under Administrative Tools find Services and run it as an administrator. Then start the "Buildbot" service. Windows will immediately complain that the service shutdown immediately; that's fine.
In your administrator command prompt, run "regedit". Use it to navigate to "HKEY_LOCAL_MACHINESystemCurrentControlSetservices"; in that long list of services you will find a "Buildbot" entry (i.e. folder). Right click the Buildbot folder and select permissions. In the dialog that comes up, add a new user to the list, and then grant that user "Full Control".
Finally, under that "Buildbot" services in the registry you will find a "Parameters" key. There are currently no values under this key. You will need to *create* a 'String Value' under "Parameters" which is named "directories". Set the value of "directories" to be the full path to your slave's configuration directory. This is the same directory where buildbot.tac and twistd.log live.
Finally, go back to your "Services" running as administrator and right-click "Buildbot" to start your service -- or just reboot.
Troubleshooting
If you have any issues with the service installation or buildbot-as-a-service startup, you can see the actual problem using Windows' "Event Viewer". It's under "Windows Logs" and then "Applications"; look for problems of type "Error" with a source of "Buildbot". Please report any such errors when asking for help on the mailing list.
Attachments
-
addLogOnAsServiceRight.zip
(22.3 KB) -
added by eric.brayet 5 years ago.
Command line tool to give a user the "Logon as Service" right (based on Microsoft's knowledge base article 132958)
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)