Nate
Nate

Reputation: 12829

buildbot on windows as a service

After following the suggestions outlined on their website on how to set up buildbot on windows, I'm left with one last question - I have multiple slaves and one master all set up on one computer (they're all demo slaves right now, doing simple things - later on when we split some of these off to their own machines this won't be quite the same problem), so how do I run them all as services?? I tried adding all my slave/master directories to the service, and I tried running their service set up tool again, to no avail.

I feel like I'm missing something simple, and would really appreciate it if someone could point me in the right direction.

Upvotes: 4

Views: 1921

Answers (4)

Michael Labbé
Michael Labbé

Reputation: 12286

Ancient question, but it's still the top search result in 2024. There's an answer from Hugh that explains how to do this using the registry and semicolon-separated directories.

In my experience, you probably want a different environment for each worker on the system so as to use different toolchains.

To this end, I didn't use the buildbot windows worker stuff at all. I created a batch file for each worker that set up the environment, and then used the Non-Sucking Service Mangaer to create one service per worker. NSSM gives you a decent amount of control.

https://nssm.cc/

Upvotes: 0

Hugh
Hugh

Reputation: 11

Firstly, I realise this is very old. Secondly, this is probably more for me than anything.

From the Buildbot documentation on launching a windows service: http://docs.buildbot.net/current/manual/installation/misc.html#launching-worker-as-windows-service there are instructions for making a registry entry called parameters (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BuildBot\Parameters) and creating a string entry (REG_SZ) with the name directories and a value of the absolute path of the base directory for the worker.

For multiple workers (and/or masters) set the value of the directories entry to a semi-colon ; separated list of absolute paths to the respective base directories.

Upvotes: 1

Nate
Nate

Reputation: 12829

Okay, the advice given on the wiki I linked to was wrong. They suggest using regedit to add parameters... for some reason multiple build directories can't be specified there. In buildbot_service.py, it's outlined what should actually be done:

#   - Start Control Panel->Administrative Tools->Services
#   - Locate the previously installed buildbot service.
#   - Open the "properties" for the service.
#   - Enter the directory names into the "Start Parameters" textbox.  The
#     directory names must be fully qualified, and surrounded in quotes if
#    they include spaces.
#   - Press the "Start"button.

Here, multiple directories can be entered, separated by spaces!

Upvotes: 7

Douglas Leeder
Douglas Leeder

Reputation: 53310

A slave can run multiple builds at the same time, so you probably only need one slave on a given machine.

Upvotes: 0

Related Questions