Current bb nodes are Windows 10, (bb-win-azr-1 and bb-win-azr-2 both in Azure) which differs slightly from the Jenkins nodes that are Windows Server.

Setting up a new node

  1. Spin up VM, Log into VM
  2. add domain to apache.org to DNS domain list, make primary.https://technet.microsoft.com/en-us/library/cc816716(v=ws.10).aspx this causes the network to drop
  3. (optional) change dns to google (had to be done for leaseweb)
  4. restart
  5. add Data disk through Disk Manager. Make sure drive is E:\
  6. install puppet agent https://downloads.puppetlabs.com/windows/puppet/puppet-agent-x64-latest.msi
  7. change puppet.conf environment from 'environment=production' to 'environment=env_windows' C:\ProgramData\PuppetLabs\puppet\etc
  8. Send it, wait a billion years for things to download, then run puppet again.
  9. restart
  10. Log in as 'buildnode' user


AOO Build setup

https://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO/Building_on_Windows

https://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO/Step_by_step_Windows#Windows_7.2C_Windows_8.1.2C_Windows_10


Manual installs?

  1. .net 3.5
  2. VS INFRA-14493 - Getting issue details... STATUS
  3. Windows Specific SDKs and Tools
    1. mozillabuild https://ftp.mozilla.org/pub/mozilla/libraries/win32/
    2. win10 sdk (part of VS)
    3. win 7 sdk
    4. .net 4.6.1
    5. MSVC2008 .NET 3.5
    6. DirectX SDK
  4. cygwin config INFRA-16325 - Getting issue details... STATUS
  5. python (E:\Python)
    1. ​pip install PyWin32
    2. pip install Twisted
    3. pip install buildbot-worker

Snippet from the Wayback Machine as the setup page is already gone from the internet. An updated version is here.

Prerequisites for a worker and for a master

Create a User

The rest of this document assumes you are running as a non-privileged user. We recommend creating one specifically for your worker.

Setup

Basic 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.

You 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.

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:

  1. Select the "Local Policies" folder
  2. Select the "User Rights Assignment" folder
  3. Double click "Log on as a service"
  4. 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:\Python39\python.exe C:\Python39\Scripts\buildbot_service.py --user YOURDOMAIN\theusername --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 ".\theusername" (where theusername is the username of the non-privileged user, and thepassword is that user's login password). Ignore any messages about "Failed to register with the windows firewall".

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_MACHINE\System\CurrentControlSet\services"; 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".

Now 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.

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 worker could be "C:\Buildbot\master;C:\Buildbot\slave". Alternatively, you can use PowerShell?:

New-Item -path Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BuildBot
New-Item -path Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BuildBot\Parameters
New-ItemProperty -path Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BuildBot\Parameters -Name directories -PropertyType String -Value <BUILDBOT DIRECTORY>

You will now need to setup a buildbot master and/or workers into the directory you specified. See Build Bot Tutorial: First Run for more information.

Finally, go back to your "Services" running as administrator and right-click "Buildbot" to start your service -- or just reboot.

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.

Connecting via RDP (Remmina or Microsoft Remote Desktop are the most used on the team)

Connecting to Windows based Buildbots tunnels through the Buildbot Controller:-

  1. Run 'ssh  -L 1980:bb-win-azr-1.apache.org:3389 buildbot-master-he-de.apache.org ' - replace bb-win-azr-1 with the Buildbot node you'd like to connect to.
  2. Open Remmina or Microsoft Remote Desktop and create a new connection to localhost:1980
  3. Creds are in LP under "bb-win-azr-1" for the Admin user and 'Buildbot Windows 10-11 User' for the limited account Buildbot user.