Phriction Welcome Community Resources Configuring a Windows build agent for Drydock History Version 2 vs 6
Version 2 vs 6
Version 2 vs 6
Content Changes
Content Changes
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 put a token 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:
```lang=powershell
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
```
IMPORTANT: Windows support in Drydock requires the use of third-party extensions. 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. You **must** explain your use case to upstream on that task, or it won't get actioned.
== Install OpenSSH for Windows ==
Use the following Chocolatey package to install OpenSSH for Windows: https://chocolatey.org/packages/win32-openssh
Once you've installed Chocolatey, running the following command will install what you need:
```
choco install -y win32-openssh -version 2016.04.05 -params '"/SSHServerFeature /KeyBasedAuthenticationFeature"'
```
== Configure authorized_keys ==
You need to configure `authorized_keys` on the Windows agent by creating a `.ssh` folder under `C:\Users\<username>`. In this folder create `authorized_keys` and paste the OpenSSH public key that you obtained from Passphrase when creating the Credential.
== Add Phabricator Extensions ==
Add the files in https://github.com/RedpointGames/phabricator-extensions to your `src/extensions/` directory.
== Configure Drydock ==
Follow the exact same setup instructions as the main Drydock guide, except use the "Windows Hosts" variant of the blueprints.
IMPORTANT: Windows support in Drydock requires the use of third-party patchesextensions. It is **not** supported by upstream.
NOTE: If you are interested in upstream support for Windows in Drydock, then go put a tokenleave a comment on T10203. You **must** explain your use case to upstream on that task, or it won't get actioned.
== 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.Install OpenSSH for Windows ==
== Enable and Configure WinRM ==Use the following Chocolatey package to install OpenSSH for Windows: https://chocolatey.org/packages/win32-openssh
Windows has some pretty silly defaults for WinRM, including very low quota limits on remote shells. These limits interfere with processes like running remote buildsOnce you've installed Chocolatey, because they restrictrunning the amount of RAM following command other resources twill install what the builds have access to.you need:
You can configure WinRM fully from an Administrator PowerShell prompt with:
```lang=powershell
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-choco install -y win32-openssh -version 2016.04.05 -params '"/SSHService winrmerFeature /KeyBasedAuthenticationFeature"'
```
== Configure authorized_keys ==
You need to configure `authorized_keys` on the Windows agent by creating a `.ssh` folder under `C:\Users\<username>`. In this folder create `authorized_keys` and paste the OpenSSH public key that you obtained from Passphrase when creating the Credential.
== Add Phabricator Extensions ==
Add the files in https://github.com/RedpointGames/phabricator-extensions to your `src/extensions/` directory.
== Configure Drydock ==
Follow the exact same setup instructions as the main Drydock guide, except use the "Windows Hosts" variant of the blueprints.