Changes between Version 97 and Version 98 of RunningBuildbotOnWindows


Ignore:
Timestamp:
Jan 4, 2017, 1:50:18 AM (9 months ago)
Author:
rutsky
Comment:

update "slave" with "worker" (only in text)

Legend:

Unmodified
Added
Removed
Modified
  • RunningBuildbotOnWindows

    v97 v98  
    33= Buildbot on Windows - Installation Instructions =
    44
    5 Buildbot runs on Windows, as both a slave and a master.  The master can run on any convenient platform.
     5Buildbot runs on Windows, as both a worker and a master.  The master can run on any convenient platform.
    66
    7 == Prerequisites for a slave and for a master ==
     7== Prerequisites for a worker and for a master ==
    88
    99 * [http://python.org/download/ Python 2.x]. Use the latest 2.x version of Python.
     
    494911. If you are installing a master, install the correct version of pyOpenSSL from the 2.7 egg, from here https://launchpad.net/pyopenssl . This is necessary for SSL email to work (build failure emails).
    505012. If you are installing a master, unzip `buildbot-0.8.5.zip` in this folder. type `cd buildbot-0.8.5uildbot-0.8.5`, type `c:\Python27\python.exe setup.py install`
    51 13. If you are installing a slave, unzip `buildbot-slave-0.8.5.zip` in this folder. type `cd buildbot-slave-0.8.5`, type `C:\Python27\python.exe setup.py install`
     5113. If you are installing a worker, unzip `buildbot-slave-0.8.5.zip` in this folder. type `cd buildbot-slave-0.8.5`, type `C:\Python27\python.exe setup.py install`
    525214. reboot
    5353
    5454=== Test Your Installation ===
    5555
    56 Verify the slave installation. For example:
     56Verify the worker installation. For example:
    5757
    5858{{{
     
    6464== Create a User ==
    6565
    66 The rest of this document assumes you are running as a non-privileged user.  We recommend creating one specifically for your build slave.
     66The rest of this document assumes you are running as a non-privileged user.  We recommend creating one specifically for your worker.
    6767
    6868== Setup ==
    6969
    70 Basic setup under windows is the same as under other operating systems, **except that BuildBot currently cannot manage masters or slaves whose paths have spaces in them**.  If you absolutely must use a path with spaces, you can map that path to a drive letter and refer to it that way.  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.
     70Basic setup under windows is the same as under other operating systems, **except that BuildBot currently cannot manage masters or workers whose paths have spaces in them**.  If you absolutely must use a path with spaces, you can map that path to a drive letter and refer to it that way.  Run `buildslave create-slave <options>` to create your slave directory.  Edit the `info` files in the worker directory as appropriate.  Then start the worker process.  Check `twistd.log` for any error messages.
    7171
    72 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.
     72You can call it quits and be done at this point.  Any time the command prompt `buildslave` is running under closes, your worker 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 worker after a reboot.
    7373
    7474=== Service ===
     
    9595Now try ''again'' to start the service.  Windows will again immediately complain that the service shutdown immediately; that's fine.  This step is required in order to create the "Parameters" key we'll use in the next step.
    9696
    97 Under that "Buildbot" services in the registry you will find a "Parameters" key (you may need to hit F5 to refresh so you can see it).  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 master and/or slave's configuration directory.  This is the same directory where `buildbot.tac` and `twistd.log` live. For example, a master and slave could be "C:\Buildbot\master;C:\Buildbot\slave". Alternatively, you can use PowerShell:
     97Under that "Buildbot" services in the registry you will find a "Parameters" key (you may need to hit F5 to refresh so you can see it).  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 master and/or slave's configuration directory.  This is the same directory where `buildbot.tac` and `twistd.log` live. For example, a master and worker could be "C:\Buildbot\master;C:\Buildbot\slave". Alternatively, you can use PowerShell:
    9898{{{
    9999New-Item -path Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BuildBot
     
    102102}}}
    103103
    104 You will now need to setup a buildbot master and/or slaves into the directory you specified. See [http://docs.buildbot.net/current/tutorial/firstrun.html Build Bot Tutorial: First Run] for more information.
     104You will now need to setup a buildbot master and/or workers into the directory you specified. See [http://docs.buildbot.net/current/tutorial/firstrun.html Build Bot Tutorial: First Run] for more information.
    105105
    106106Finally, go back to your "Services" running as administrator and right-click "Buildbot" to start your service -- or just reboot.
    107107
    108 '''Note:''' any environment variables that need to be set on the slave machine for your bot's build commands to work have to be set in the global System Environment settings or (better) in the unprivileged user's User Environment settings.
     108'''Note:''' any environment variables that need to be set on the worker machine for your bot's build commands to work have to be set in the global System Environment settings or (better) in the unprivileged user's User Environment settings.
    109109
    110110==== In a virtualenv ====
     
    121121Next, you'll want to update the service's environment so that the virtualenv is in the PATH.  [http://stackoverflow.com/questions/305870/windows-services-and-environment-variables/2728574#2728574 This article] shows how to do that.  '''Note:''' any environment variables set here will ''not'' propagate to the build commands issued by the bot.  Those should be set in the User Environment of the unprivileged user as described above.
    122122
    123 ==== Many Buildslaves ====
     123==== Many Workers ====
    124124
    125 Once you have mastered the basics of setting up a buildslave as a Win32 service, you might want to set up more buildslaves on the same system. Do not go to the trouble of cloning your BuildBot service - merely add your other slave configurations to the "directories" string value, separated by semicolons. For example:
     125Once you have mastered the basics of setting up a worker as a Win32 service, you might want to set up more workers on the same system. Do not go to the trouble of cloning your BuildBot service - merely add your other worker configurations to the "directories" string value, separated by semicolons. For example:
    126126
    127127{{{
     
    129129}}}
    130130
    131 Consider using vms to manage your slaves. Create a clean base installation and clone it for each new build.
     131Consider using vms to manage your workers. Create a clean base installation and clone it for each new build.
    132132
    133 Restart the service and your new buildslaves will connect.
     133Restart the service and your new workers will connect.
    134134
    135 === Disabling JIT dialogs on the buildslave ===
     135=== Disabling JIT dialogs on the worker ===
    136136
    137 If you are running tests that occasionally fail with exceptions on the buildslave, you will want to disable the Just-In-Time (JIT) debugger that is configured with Visual Studio. When an unhandled exception occurs, the default JIT configuration will launch a dialog that will wait for user confirmation, effectively halting your build.
     137If you are running tests that occasionally fail with exceptions on the worker, you will want to disable the Just-In-Time (JIT) debugger that is configured with Visual Studio. When an unhandled exception occurs, the default JIT configuration will launch a dialog that will wait for user confirmation, effectively halting your build.
    138138
    139139Follow these steps to disable the JIT:
     
    162162If 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.
    163163
    164 The buildbot master.cfg needs the slave information; the master will ignore a slave it doesn't  know about.
     164The buildbot master.cfg needs the worker information; the master will ignore a worker it doesn't  know about.
    165165
    166166If the buildbot service fails to start, but the script runs for the same user when logged in, it may be due to permissions that were in effect when the buildbot package and prerequisites were installed. See "Prerequisites" above.
    167167
    168 Visual Studio build configs such as {{{"Win32|Any CPU"}}} will need to be escaped thus: {{{"Win32^|Any CPU"}}}.  Consider saving yourself development time by using python instead of bat and cmd for slave scripts.
     168Visual Studio build configs such as {{{"Win32|Any CPU"}}} will need to be escaped thus: {{{"Win32^|Any CPU"}}}.  Consider saving yourself development time by using python instead of bat and cmd for worker scripts.