Page MenuHomePhabricator

Configuring a Windows build agent for Drydock
Updated 3,025 Days AgoPublic

Version 3 of 6: You are viewing an older version of this document, as it appeared on Jan 22 2016, 10:16 AM.
IMPORTANT: Windows support in Drydock requires the use of third-party patches. It is not supported by upstream.
NOTE: If you are interested in upstream support for Windows in Drydock, then go leave a comment on T10203.

Compile and install WinRM for Linux

Compile and build the winrm tool for Linux from https://github.com/masterzen/winrm. You will need to install Go and then place winrm somewhere in Phabricator's PATH.

Patch Phabricator

There is a patched version of Phabricator that has support for Windows support in Drydock here: https://github.com/hach-que/phabricator. This is continuously rebased on the latest version of upstream Phabricator, so it is constantly kept up to date with the latest features.

Enable and Configure WinRM

Windows has some pretty silly defaults for WinRM, including very low quota limits on remote shells. These limits interfere with processes like running remote builds, because they restrict the amount of RAM and other resources that the builds have access to.

You can configure WinRM fully from an Administrator PowerShell prompt with:

Enable-PSRemoting -Force
winrm set winrm/config/service/Auth '@{Basic="true"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/winrs '@{IdleTimeout="999999999"}'
winrm set winrm/config/winrs '@{MaxConcurrentUsers="100"}'
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="999999999"}'
winrm set winrm/config/winrs '@{MaxProcessesPerShell="999999999"}'
winrm set winrm/config/winrs '@{MaxShellsPerUser="999999999"}'
Set-Item WSMan:\localhost\Plugin\microsoft.powershell\Quotas\MaxIdleTimeoutms 2147483647
Set-Item WSMan:\localhost\Plugin\microsoft.powershell\Quotas\MaxConcurrentUsers 100
Set-Item WSMan:\localhost\Plugin\microsoft.powershell\Quotas\IdleTimeoutms 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell\Quotas\MaxProcessesPerShell 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell\Quotas\MaxMemoryPerShellMB 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell\Quotas\MaxConcurrentCommandsPerShell 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell\Quotas\MaxShells 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell\Quotas\MaxShellsPerUser 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell32\Quotas\MaxIdleTimeoutms 2147483647
Set-Item WSMan:\localhost\Plugin\microsoft.powershell32\Quotas\MaxConcurrentUsers 100
Set-Item WSMan:\localhost\Plugin\microsoft.powershell32\Quotas\IdleTimeoutms 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell32\Quotas\MaxProcessesPerShell 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell32\Quotas\MaxMemoryPerShellMB 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell32\Quotas\MaxConcurrentCommandsPerShell 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell32\Quotas\MaxShells 999999999
Set-Item WSMan:\localhost\Plugin\microsoft.powershell32\Quotas\MaxShellsPerUser 999999999
Restart-Service winrm
Tags
None
Referenced Files
None
Subscribers
Tokens
"Yellow Medal" token, awarded by OCram.
Last Author
hach-que
Last Edited
Jan 22 2016, 10:16 AM

Event Timeline

hach-que edited the content of this document. (Show Details)
hach-que edited the content of this document. (Show Details)
hach-que edited the content of this document. (Show Details)