ReferencePlatforms/Win64: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(→‎Basic OS Setup: correct patch level to match reality. see bug 933271)
 
(96 intermediate revisions by 12 users not shown)
Line 1: Line 1:
This is a '''DRAFT'''. I am still working on this.
= Version 1  =
= Version 1  =


Line 20: Line 18:


=== Virtual Memory  ===
=== Virtual Memory  ===
TODO: Still figuring out if this is needed
*Sign is as Administrator  
*Sign is as Administrator  
*Control Panel -> System and Security -> System  
*Control Panel -> System and Security -> System  
Line 28: Line 24:
*Advanced tab -> Change... under Virtual Memory  
*Advanced tab -> Change... under Virtual Memory  
*Un-check "Automatically manage paging file size for all drives"  
*Un-check "Automatically manage paging file size for all drives"  
*Custom size: 4092-6138
*Custom size: 4048-4048
*Restart the machine
*Restart the machine
There are some advantages to choosing a fixed size:
* free space doesn't fluctuate on c:\
* the page file doesn't get fragmented on the disk
* OOM conditions are more repeatable


Reference:  
Reference:  
Line 36: Line 38:
*[http://support.microsoft.com/kb/889654 How to determine the appropriate page file size for 64-bit versions of Windows]
*[http://support.microsoft.com/kb/889654 How to determine the appropriate page file size for 64-bit versions of Windows]


=== Hard-drive improvements (D & E partitions) ===
=== Hard-drive adjustments  ===


*Start -> All Programs -> Administrative tools -> Computer Management  
*Start -> All Programs -> Administrative tools -> Computer Management  
Line 43: Line 45:
** "Shrink volume..."
** "Shrink volume..."
** Select a value that will make the remaining free space to match the table below
** Select a value that will make the remaining free space to match the table below
* Create the D drive with 20480 MB, label it "Tools" and do a quick NTFS format (no indexation)
<strike>* Create the D drive with 20480 MB, label it "Tools" and do a quick NTFS format (no indexation)</strike>
* Create the E drive with remaining MB, label it "Builds" and do a quick NTFS format (no indexation)
 
NOTE: Creating the E drive will be done through a script.
TODO: armenzg: digipengi we have to block indexation to happen in such drive


These are the disk distributions you should have at the end:  
These are the disk distributions you should have at the end:  
Line 51: Line 55:
|-
|-
| C drive  
| C drive  
| 40960 MB
| 61440 MB  
| 40GB
| 60GB
| NTFS
|-
| D drive (Tools)
| 20480 MB
| 20GB
| NTFS
| NTFS
|-
|-
| E drive (Builds)  
| E drive (Builds)  
|  
|  
| ~143GB*
| ~173GB
| NTFS
| NTFS
|}
|}


TODO: There are 28GB wasted because of logical drives sorting. Find a good windows tool to recuperate that unallocated space
* Manually right click on disks C, select properties and go to the general tab for the dialog. At the bottom of the dialog box, verify that "Compress this drive" and "Indexing service" are both unchecked (turned off).
 
* Manually right click on disks D and E, select properties and go to the general tab for the dialog. At the bottom of the dialog box, verify that "Compress this drive" and "Indexing service" are both unchecked (turned off).


Hard-drive improvements:
Hard-drive improvements:
* Start dos-cmd-shell and run the following commands. It does not matter what directory is currect directory, these changes are system wide.
* Start dos-cmd-shell and run the following commands. It does not matter what directory is currect directory, these changes are system wide.
<pre>
  fsutil behavior set disable8dot3 1
  fsutil behavior set disable8dot3 1
  fsutil behavior set disablelastaccess 1
  fsutil behavior set disablelastaccess 1
</pre>
* Reboot
* Reboot


Line 85: Line 84:
=== Daemon tools  ===
=== Daemon tools  ===
*From: http://www.daemon-tools.cc
*From: http://www.daemon-tools.cc
3cad7a0a3d5c110a6e70f3d64a32a44f *DTLite4402-0131.exe
<pre>3cad7a0a3d5c110a6e70f3d64a32a44f *DTLite4402-0131.exe </pre>
* There is a newer copy in dev-stage since that previous version is not available anymore:
http://dev-stage01.build.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/DTLite4454-0315.exe
* Install it only with "Startup shortcuts"
* Install it only with "Startup shortcuts"


Line 99: Line 100:
=== Basic OS Setup  ===
=== Basic OS Setup  ===
* Verify the name of the NetBios computer name and the DNS suffix are correct
* Verify the name of the NetBios computer name and the DNS suffix are correct
*Check for updates
** Control Panel -> System and security -> System
KB980195  KB2482017  KB979916  KB982526  KB983590  KB2416471
** "Change settings"
KB2032276 KB2079403  KB2207566 KB2286198 KB2296011 KB2305420
** Under "Computer name" tab click on "Change..."
KB2347290 KB2385678  KB2387149 KB2393802 KB2419640 KB2423089
** Add "win64-ix-ref" as the "Computer name"
KB2425227 KB24442962 KB2475792 KB2479628 KB2483614 KB2485376
** Click on "More..." and add "build.mozilla.org" as the Primary DNS suffix
KB972270  KB974571  KB975467  KB975560  KB978542  KB978601
* Check for updates
KB978886  KB979309  KB979482  KB979687  KB979688  KB980232
** Install any updates that were available before 2011/06/28
KB982132  KB982214  KB982799  KB981391  KB981392  KB977236
* Check for updates a second time after the first batch of updates are installed  
KB981111  KB977238  KB977239  KB971390  KB2447568 KB979099
KB2249857 KB2345886  KB2388210 KB2443685 KB2454826 KB2467023
KB2484033 KB2487426  KB974332  KB974431  KB976902  KB977074
KB978637  KB979538  KB980408  KB980846  KB982110  KB890830
KB237811  KB2479943  KB2386667 KB2505438
* Check for updates a second time after the first batch of updates is installed  
** Windows Server 2008 R2 Service Pack 1 x64 Edition (KB976932)
** Windows Server 2008 R2 Service Pack 1 x64 Edition (KB976932)
*Automatic updates  
* Disable automatic updates  
**Control Panel -&gt; System and Security -&gt; Windows Update  
**Control Panel -&gt; System and Security -&gt; Windows Update  
**Change settings -&gt; "Never Check for Updates" and click "OK  
**Change settings -&gt; "Never Check for Updates" and click "OK  
Line 134: Line 129:


*Allow cltbld to restart the system  
*Allow cltbld to restart the system  
**Start menu -&gt; Run -&gt; gpedit.msc  
**Start menu -&gt; Run -&gt; gpedit.msc (as administrator)
**Computer Configuration -&gt; Windows Settings -&gt; Security Settings -&gt; Local Policies -&gt; User Rights Assignment  
**Computer Configuration -&gt; Windows Settings -&gt; Security Settings -&gt; Local Policies -&gt; User Rights Assignment  
**Double click 'Shut down the system', add cltbld to the list.  
**Double click 'Shut down the system', add cltbld to the list.  
*Download the following file, change the password and import into the registry
*Download the following file, '''change the password''' and import into the registry (as administrator)
 
<pre>
  wget -Ologon.reg --no-check-certificate https://bug428123.bugzilla.mozilla.org/attachment.cgi?id=367599
  wget -Ologon.reg --no-check-certificate https://bug645024.bugzilla.mozilla.org/attachment.cgi?id=544857
</pre>


== Build tools, compilers and SDKs  ==
== Build tools, compilers and SDKs  ==
Line 145: Line 141:
=== MozillaBuild 1.5.1  ===
=== MozillaBuild 1.5.1  ===


*Install [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.5.1.exe MozillaBuildSetup1.5.1.exe] to D:\mozilla-build
*Install [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.5.1.exe MozillaBuildSetup1.5.1.exe] to C:\mozilla-build


=== Visual Studio 2010 ===
=== Visual Studio 2010 ===
Line 151: Line 147:


* Download and mount the ISO with Daemon tools lite
* Download and mount the ISO with Daemon tools lite
5b7e2c716510c87ddf64d26ab9a072f2 *en_visual_studio_2010_professional_x86_dvd_509727.iso
<pre>5b7e2c716510c87ddf64d26ab9a072f2 *en_visual_studio_2010_professional_x86_dvd_509727.iso </pre>
* Do a custom install:
* Do a custom install:
** '''D:\msvs10'''
** '''C:\Tools\msvs10'''  
** Only select "Visual C++"
** Only select "Visual C++"


=== Visual Studio 2008  ===
=== Visual Studio 2008  ===


*Read [http://blogs.msdn.com/b/vijaysk/archive/2009/08/16/you-must-use-the-role-management-tool-to-install-or-configure-microsoft-net-framework-3-5.aspx Win2008 R2 and VS2008]  
*To be able to install VS2008 on Win2008 you first have to install ".NET Framework 3.5.1" (See [http://blogs.msdn.com/b/vijaysk/archive/2009/08/16/you-must-use-the-role-management-tool-to-install-or-configure-microsoft-net-framework-3-5.aspx this] article for more information).
*Server Manager -&gt; right click on "Features" and select "Add Feature"  
**Server Manager -&gt; right click on "Features" and select "Add Feature"  
*Check ".NET Framework 3.5.1 Feature"  
**Check ".NET Framework 3.5.1 Feature"  
*"Add Required Role Services"  
**"Add Required Role Services"  
*Select "Next" a couple of times and then "Install"  
**Select "Next" a couple of times and then "Install"  
*Mount the VS2008 DVD with Daemon tools Lite
*Mount the VS2008 DVD with Daemon tools Lite
* Do a custom installation into '''D:\msvs9'''
* Do a custom installation into '''C:\Tools\msvs9'''
** Select "Visual C++" (including x64 compilers)
** Select "Visual C++" (including x64 compilers)
** Select "Tools for Redistributing Applications"
** Select "Tools for Redistributing Applications"
<pre>
  ba1ba1a6ddd0c93441153af9e93a7b22 *en_visual_studio_2008_professional_x86_x64wow_dvd_X14-26326.iso
  ba1ba1a6ddd0c93441153af9e93a7b22 *en_visual_studio_2008_professional_x86_x64wow_dvd_X14-26326.iso
</pre>


=== Visual Studio 2008 SP 1 (Installer)  ===
=== Visual Studio 2008 SP 1 (Installer)  ===
Line 179: Line 177:


* Download the [http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba June 2010 DirectX SDK] web installer
* Download the [http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba June 2010 DirectX SDK] web installer
<pre>
  a7fa610b1791d873162b9e33007a6777 *DXSDK_Jun10.exe
  a7fa610b1791d873162b9e33007a6777 *DXSDK_Jun10.exe
* Install it to "D:\sdks\dx10"
</pre>
* Install it to "C:\Tools\sdks\dx10"
* Choose the following components:
* Choose the following components:
** Instal DirectX Runtime
** DirectX Utilities
** DirectX Utilities
** DirectX Headers and Libs
** DirectX Headers and Libs
Line 187: Line 188:


=== Windows 7 SDK  ===
=== Windows 7 SDK  ===
*Like in https://wiki.mozilla.org/ReferencePlatforms/Win32#Version_20_-_20090930  
*Like in https://wiki.mozilla.org/ReferencePlatforms/Win32#Version_20_-_20090930  
*Download the [http://www.microsoft.com/downloads/details.aspx?FamilyID=71deb800-c591-4f97-a900-bea146e4fae1&displaylang=en#filelist web installer] or use the DVD ISO.  
*Download the [http://www.microsoft.com/downloads/details.aspx?FamilyID=71deb800-c591-4f97-a900-bea146e4fae1&displaylang=en#filelist web installer] or use the DVD ISO.  
*<strike>run the Windows SDK Configuration Tool to select 7.0 as the right SDK</strike>
*'''run the Windows SDK Configuration Tool to select 7.0 as the right SDK'''
*Mount the DVD with Daemon Tools Lite and install into D:\sdks\v7.0
*Mount the DVD with Daemon Tools Lite and install into C:\Tools\sdks\v7.0
*
** Windows Headers and Libraries
** Windows Headers and Libraries
** Visual C++ compilers (support for x64 and IA64)
** Visual C++ compilers (support for x64 and IA64)
Line 201: Line 200:


=== Windows updates ===
=== Windows updates ===
After VS plus the SDKs have been installed we can check for updates.
After Visual Studio and the SDKs have been installed let's check for updates again.
These got installed:
These got installed:
  KB2160841 KB2416472 KB2524375
  KB2160841 KB2416472 KB2524375


=== Disable JIT debugger ===
=== Disable JIT debugger ===
TODO this section will probably go away on a clean install.
This is something similar to what was done in {{bug|533185}} for win32 slaves.
<pre>
The machine was probably messed up from having installed several Visual Studios on the ref machine. Let's verify the following steps once we get the ref machine re-installed.
 
I had to enable the JIT debugger with VS2008 by checking the three JIT debug options by following [http://msdn.microsoft.com/en-us/library/k8kf6y2a%28v=VS.85%29.aspx this] instructions.
</pre>
 
TODO add screenshots wrt the JIT debugger.


To disable the JIT debugger I read [http://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx#bkmk_enabling this] and [http://msdn.microsoft.com/en-us/library/2ac5yxx6%28v=VS.90%29.aspx this] and did the following:
To disable the JIT debugger I read [http://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx#bkmk_enabling this] and [http://msdn.microsoft.com/en-us/library/2ac5yxx6%28v=VS.90%29.aspx this] and did the following:
  In the Registry Editor window, locate and delete the follow registry keys:
  In the Registry Editor window, locate and delete the follow registry keys:
<pre>
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger
  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger
  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger
</pre>


=== Disable Windows Error Reporting ===
=== Disable Windows Error Reporting ===
Line 233: Line 227:
To make the webm build to work for Windows 64-bit I had to:  
To make the webm build to work for Windows 64-bit I had to:  


<pre>
  wget http://www.tortall.net/projects/yasm/releases/vsyasm-1.1.0-win64.zip
  wget http://www.tortall.net/projects/yasm/releases/vsyasm-1.1.0-win64.zip
  unzip vsyasm-1.1.0-win64.zip
  unzip vsyasm-1.1.0-win64.zip
  mv vsyasm.exe /d/mozilla-build/msys/bin/yasm.exe
  mv vsyasm.exe /c/mozilla-build/msys/bin/yasm.exe
  rm vsyasm.* readme.txt
  rm vsyasm.* readme.txt
 
</pre>
NOTE: Win32 machines install yasm.exe under /d/mozilla-build/yasm and add a profile-extrapaths.sh under /d/mozilla-build/msys/etc/profile.d according to [http://mxr.mozilla.org/build/source/opsi-package-sources/yasm/CLIENT_DATA/yasm.ins this].
NOTE: Win32 machines install yasm.exe under /c/mozilla-build/yasm and add a profile-extrapaths.sh under /c/mozilla-build/msys/etc/profile.d according to [http://mxr.mozilla.org/build/source/opsi-package-sources/yasm/CLIENT_DATA/yasm.ins this].


== Automation setup  ==
== Automation setup  ==


=== Keys  ===
=== Keys  ===
* Got production keys
* Get production keys unto C:/Users/cltbld/.ssh
* symlinked to production keys
* Tested that I can run this:
* Tested that I can run this:
<pre>
<pre>
#!/bin/sh
set -ex
ssh -i ~/.ssh/ffxbld_dsa ffxbld@aus2-staging.mozilla.org exit
ssh -i ~/.ssh/ffxbld_dsa ffxbld@aus2-staging.mozilla.org exit
ssh -i ~/.ssh/ffxbld_dsa ffxbld@dm-symbolpush01.mozilla.org exit
ssh -i ~/.ssh/ffxbld_dsa ffxbld@dm-symbolpush01.mozilla.org exit
Line 256: Line 252:
=== Python 2.6 and twisted 9  ===
=== Python 2.6 and twisted 9  ===


*Append ';d:\mozilla-build\python' to system path.  
*Append ';C:\mozilla-build\python;C:\mozilla-build\msys\bin;C:\mozilla-build\vim\vim72' to system path.  
*Install this registry key:
*Install this registry key:
<pre>Windows Registry Editor Version 5.00
<pre>Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\Pythoncore\2.6\InstallPath]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\Pythoncore\2.6\InstallPath]
@="d:\\mozilla-build\\python"</pre>  
@="C:\\mozilla-build\\python"</pre>  
NOTE: The registry key is different for win32 machines; notice that it says '''Wow6432Node'''  
NOTE: The registry key is different for win32 machines; notice that it says '''Wow6432Node'''  


Line 268: Line 264:
==== Twisted patches  ====
==== Twisted patches  ====


cd /e/setup
<pre>
  wget -Ob128.patch --no-check-certificate http://hg.mozilla.org/build/twisted/raw-rev/0b441f0f68b4
  wget -Ob128.patch --no-check-certificate http://hg.mozilla.org/build/twisted/raw-rev/0b441f0f68b4
  wget -Osubproc.patch --no-check-certificate https://bugzilla.mozilla.org/attachment.cgi?id=451277
  wget -Osubproc.patch --no-check-certificate https://bugzilla.mozilla.org/attachment.cgi?id=451277
  cd /d/mozilla-build/python/lib/site-packages
  cd /c/mozilla-build/python/lib/site-packages
patch -p0 &lt; /e/setup/b128.patch
  cd twisted
  cd twisted
  patch -p0 &lt; /e/setup/subproc.patch
  patch -p0 &lt; ~/subproc.patch
patch -p2 &lt; ~/b128.patch  
</pre>


=== Buildbot  ===
=== Startup scripts ===
 
<pre>
cd /e/setup
hg clone http://hg.mozilla.org/build/buildbot
cd buildbot
hg up -r BUILDBOT_PRODUCTION
python setup.py install
 
==== Buildbot startup scripts  ====
  cd /c/Users/cltbld/AppData/Roaming/Microsoft/Windows/Start\ Menu/Programs/Startup
  cd /c/Users/cltbld/AppData/Roaming/Microsoft/Windows/Start\ Menu/Programs/Startup
  wget -Obuildbot.bat https://bugzilla.mozilla.org/attachment.cgi?id=519478
  wget -Obuildbot.bat http://hg.mozilla.org/build/puppet-manifests/raw-file/c6e02dee3589/modules/buildslave/files/buildbot-win64.bat
  # modify the passwords
</pre>
  cd /d/mozilla-build
<pre>
  wget -Ostart-buildbot.bat https://bugzilla.mozilla.org/attachment.cgi?id=519761
  # As administrator
wget -Ostart-buildbot.sh https://bugzilla.mozilla.org/attachment.cgi?id=473651
  cd /c/mozilla-build
  wget -Ostart-buildbot.bat http://hg.mozilla.org/build/puppet-manifests/raw-file/c6e02dee3589/modules/buildslave/files/start-buildbot-win64.bat
</pre>


=== Tools and create directories  ===
=== Create directories  ===
*Tools repository
* Create logging and buildbot directories
cd /d/
<pre>mkdir /c/tmp</pre>
hg clone http://hg.mozilla.org/build/tools
 
*Logging and buildbot directories
mkdir /c/tmp
mkdir -p /e/buildbot/moz2_slave


== Other tools  ==
== Other tools  ==
=== Installing NRPE Daemon ===
=== Installing NRPE Daemon ===
To learn more about Nagios/NRPE and NSClient++ please read [http://armenzg.blogspot.com/2011/03/how-to-install-nsclient-038-on-windows.html this] blog post.
To learn more about Nagios/NRPE and NSClient++ please read [http://armenzg.blogspot.com/2011/03/how-to-install-nsclient-038-on-windows.html this blog post] with some of my extra debugging and testing.


NSClient++ is an NRPE implementation on Windows.
NSClient++ is an NRPE implementation on Windows.
 
* Enable ICMP
runas /user:Administrator "netsh firewall set icmpsetting 8"
* Download [http://files.nsclient.org/x-0.3.x/NSClient%2B%2B-0.3.8-x64.msi NSClient++ 0.3.8] for 64-bit machines
* Download [http://files.nsclient.org/x-0.3.x/NSClient%2B%2B-0.3.8-x64.msi NSClient++ 0.3.8] for 64-bit machines
** I am going to use the installer as it adds the firewall exceptions for me.
** I am going to use the installer as it adds the firewall exceptions for me.
  05/27/10 23:11:48 0735d6ef6953e315b3ce9e02c1ccdb11 NSClient%2B%2B-0.3.8-x64.msi
<pre>
  05/27/10 23:11:48 0735d6ef6953e315b3ce9e02c1ccdb11 NSClient%2B%2B-0.3.8-x64.msi  
</pre>


* Start the installer and install all the defaults
* Start the installer and install all the defaults
** "Do not start the service" and finish the installation
** "Do not start the service" and finish the installation
* Rename C:\Program Files\NSClient++\NSC.ini as NSC.original.ini
* Rename C:\Program Files\NSClient++\NSC.ini as NSC.original.ini
* Checkout mozilla/tools/nagios and copy NSC.ini to C:\Program Files\NSClient++
* Download releng's NSC.ini and place it on C:\Program Files\NSClient++
<pre>
cd /c/Program\ Files/NSClient++
mv NSC.ini NSC.original.ini
wget -O NSC.ini http://hg.mozilla.org/build/opsi-package-sources/raw-file/2d51f32ff0f2/nagios/CLIENT_DATA/nsc.ini
</pre>


To check that everything went well do the following (from [http://nsclient.org/nscp/wiki/doc/Usage this] documentation):
To check that everything went well do the following (from [http://nsclient.org/nscp/wiki/doc/Usage this] documentation):
Line 328: Line 324:
* Install it with the default values
* Install it with the default values
* Copy the kts.ini into "C:\Program files (x86)\KTS\kts.ini" from a Win32 machine
* Copy the kts.ini into "C:\Program files (x86)\KTS\kts.ini" from a Win32 machine
==== Add firewall exception for SSH ====
*Control Panel\System and Security\Windows Firewall\Allowed Programs
** "Allow another program..."
*** "C:\Program Files (x86)\KTS\daemon.exe" and check "Home" and "Public"


=== VNC (UltraVNC) ===
=== VNC (UltraVNC) ===
Line 334: Line 335:
* Install it  
* Install it  
** Select the defaults up until the "Additional Tasks" screen  
** Select the defaults up until the "Additional Tasks" screen  
*** Check "Register UltraVNC as a Service" and "Start or restart UltraVNC"  
*** "Register UltraVNC as a Service"
*** "Start or restart UltraVNC"
*** "UltraVNC Server driver install" - [http://www.uvnc.com/features/driver.html explanation]
** Install the UVNC BVBA Display adapters prompt and select "Always trust"
**After finishing the installation go to services and stop 'uvnc_service'.  
**After finishing the installation go to services and stop 'uvnc_service'.  
**Browse to C:\Program Files\UltraVNC and run 'winvnc.exe' as administrator (right click =&gt; 'run an administrator').  
**Browse to C:\Program Files\UltraVNC and run 'winvnc.exe' as administrator (right click =&gt; 'run an administrator').  
Line 345: Line 349:
*** Add cltbld's credentials under "Authorization"
*** Add cltbld's credentials under "Authorization"
**Restart the computer
**Restart the computer
=== Add firewall exceptions for SSH and VNC ===
*Control Panel\System and Security\Windows Firewall\Allowed Programs
** vnc5800 - check "public"
** "Allow another program..."
*** "C:\Program Files (x86)\KTS\daemon.exe" and check "Home" and "Public"


=== Improve graphics performance ===
=== Improve graphics performance ===
Line 358: Line 356:
*** On "Visual effects" set "Adjust for best performance"
*** On "Visual effects" set "Adjust for best performance"


= TODO  =
== Clean up ==
 
These should be done before we can start cloning the machine.
 
* Install VS2010
* Check for more Windows Updates
 
=== Clean up ===
<i>
*Now that we are ready to clone let's do a proper clean up to have the C and D drives as clean as possible<br> Start -&gt; All Programs -&gt; Accessories -&gt; System Tools -&gt; Disk Cleanup. Do a default clean of C:
*Now that we are ready to clone let's do a proper clean up to have the C and D drives as clean as possible<br> Start -&gt; All Programs -&gt; Accessories -&gt; System Tools -&gt; Disk Cleanup. Do a default clean of C:
* Let's also remove restore point to free up space on C drive
* Let's also remove restore point to free up space on C drive
</i>


= Delete all this =
== Buildbot 0.8.4 ==
* Install Buildbot and newer runslave.py (they are dependent on each other)
<pre>
# ssh Administrator@slave
c:\mozilla-build\wget\wget.exe -O update-buildbot.bat https://bugzilla.mozilla.org/attachment.cgi?id=627242
update-buildbot.bat
</pre>
== Python 2.7.3 ==
<pre>
# ssh Administrator@slave
c:\mozilla-build\wget\wget.exe http://dev-stage01.build.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/python/python-2.7.3.msi
msiexec /i python-2.7.3.msi /quiet /norestart /log python27_install.log TARGETDIR=c:\mozilla-build\python27 ALLUSERS=1


<strike>Once we are done remove all these steps that I believe we don't need.</strike>
# Install pywin32
c:\mozilla-build\msys\bin\bash --login -i
/c/mozilla-build/wget/wget.exe http://dev-stage01.build.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/python/install_pywin32_python27.sh
./install_pywin32_python27.sh
</pre>


=== <strike>OPSI Client &amp; AutoIT</strike> ===
== Newer NSC.ini ==
<pre>
# ssh Administrator@slave
cd "C:\Program Files\NSClient++"
c:\mozilla-build\wget\wget.exe -O NSC.ini http://hg.mozilla.org/build/opsi-package-sources/raw-file/3857d6f521f2/nagios/CLIENT_DATA/nsc.ini
</pre>


==== <strike>Enable File and Print Sharing</strike> ====
== Binscope ==
<pre>
ssh Administrator@slave
c:\mozilla-build\wget\wget.exe http://people.mozilla.com/~asasaki/BinScopeSetup.msi
msiexec /i BinScopeSetup.msi /quiet /norestart /log binscope_install.log ALLUSERS=1
</pre>


*<strike>Enable File &amp; Print Sharing </strike>
== Fix auto-login after new password deployment ==
**<strike>Control Panel -&gt; Network and Internet -&gt; Network and Sharing Center -&gt; Change advanced sharing settings</strike>
This is what you need to run to fix a machine:
**<strike>Enable "Turn on network discovery" and "Turn on file and printer sharing", click "Save Changes".</strike>
<pre>
*<strike>Open firewall (add access to OPSI server) </strike>
  REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1
**<strike>Control Panel -&gt; System and Security -&gt; Windows Firewall -&gt; Advanced Settings</strike>
  REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d YouWish
**<strike>Inbound rules</strike>
</pre>
**<strike>For each "File and Printer" entry (there was a subset of them turned ON): </strike>
***<strike>Double click and select "Scope" tab</strike>
***<strike>Under "Remote IP address" select "These IP addressess"</strike>
***<strike>Enter the IP address of the production OPSI server (10.2.71.216 - staging AND/OR 10.2.71.64 - production)</strike>


==== <strike>OPSI Prep and Install</strike> ====
MaRu fixed the issue by updating the LTICleanup.wsf
The lines modified were (password has been taken out for security reasons)


<strike>We need to flip a few options in Windows to enable certain packages to install without prompting.</strike>
<pre>
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "1", "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName", "cltbld", "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName", "", "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword", "*********", "REG_SZ"
oShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoLogonCount", &H00000000, "REG_DWORD"
On Error Goto 0
</pre>


<strike>NOTE: Do all these as Administrator or it won't work.</strike>
== Re-deploy twisted patches ==
''<strike></strike>
* It seems we have regressed this with the latest buildbot update
*<strike>'''''TODO''': I can't find this - &lt;i&gt;Do not prompt for unsigned drivers (needed for at least the windows mobile sdk)'' </strike>
* {{bug|770506}} - We should verify this and file a bug for IT to fix it
**<strike>''Control Panel -&gt; Hardware -&gt; Driver Signing, choose "Ignore".''</strike>
** TODO meanwhile get work around for setting new slaves up


*<strike>Security Settings </strike>
== Deploy Windows SDK for Windows 8 ==
**<strike>Disable DEP with this command: "bcdedit.exe /set {current} nx AlwaysOff" (you might need to run cmd as Administrator even if you use Admin user)</strike>
This can be deployed like this:
**<strike>Start Menu -&gt; Run -&gt; \\10.2.71.64</strike>
<pre>
**<strike>Use 'pcpatch' and the root password when prompted. (you might have to use the older root password)</strike>
C:\mozilla-build\wget\wget.exe https://github.com/armenzg/bearded-ironman/raw/master/win2008_64bit/install_windows_standalone_sdk_8.0.bat
**<strike>Right click 'opt_pcbin' and select 'Map network drive...' and select "Finish" with the defaults.</strike>
install_windows_standalone_sdk_8.0.bat
**<strike>Browse to z:\install\preloginloader</strike>
</pre>
**<strike>Double click 'opsi-prep.vbs'</strike>
**<strike>Double click 'service-setup.cmd', hit a key when prompted (''it might be needed to "Run as Administrator" still to verify'')</strike>
**<strike>''We might need to run files\opsi\UAC off from the desktop rather than network drive according to cshield''</strike>
**<strike>When prompted for a username and password use 'root' and the appropriate password.</strike>
**<strike>I see a message for restarting to turn off UAC</strike>
**<strike>The machine did not reboot forcibly as mentioned below</strike>


<strike>Once OPSI is finished installing it will forcibly reboot the system. In a few minutes it should come back up and the client should be listed in the OPSI GUI.</strike>
[[File:Beispiel.jpg]]== Deploy the latest known_host ==
This is needed until {{bug|849942}} fixed.


==== <strike>Autoit v3.3.0.0</strike> ====
<pre>
ssh as cltbld to host
cd .ssh
copy known_hosts known_hosts.bak
C:\mozilla-build\msys\bin\scp.exe cltbld@buildbot-master19.build.mozilla.org:~/known_hosts .
set HOME=C:\Documents and Settings\cltbld
C:\mozilla-build\msys\bin\ssh -i ~/.ssh/ffxbld_dsa ffxbld@symbolpush.mozilla.org hostname
</pre>
which should show
symbols1.dmz.phx1.mozilla.com


<strike>We require Autoit to deploy many packages. To install it, do the following:</strike>
I also updated this zip with the ssh keys etc referenced in this doc https://wiki.mozilla.org/ReleaseEngineering/How_To/Adjust_SSH_keys_on_a_slave#Production when I landed the changes for the new symbol server.


*<strike>Checkout the installer:</strike>
== Deploy _dumbwin32proc.py ==
 
Until {{bug|853609}} is fixed, log in as Administrator and run this:
<strike>cvs -d:ext:cltbld@cvs.mozilla.org:/mofo co ref-platforms/win32/autoit-v3-setup.exe
<pre>
0a9b41382ad6ae4308d67f7709fcd4b2 *ref-platforms/win32/autoit-v3-setup.exe
C:\mozilla-build\wget\wget.exe -q -Odeploy_dumbwin32proc.bat https://bugzilla.mozilla.org/attachment.cgi?id=725099
</strike>
deploy_dumbwin32proc.bat
 
</pre>
*<strike>(as Administrator), run the installer, accept the defaults</strike>
 
=== <strike>Windows 7.1 SDK and .NET Framework 4 (ISO)</strike> ===
 
<strike>I think we don't need this SDK but I will double check with the 2nd Windows 64-bit machine I am setting up </strike>
 
<strike></strike>''
*<strike>Download and mount </strike>[http://www.microsoft.com/downloads/details.aspx?familyid=35AEDA01-421D-4BA5-B44B-543DC8C33A20&displaylang=en <strike>GRMSDKX_EN_DVD.iso</strike>]
 
<strike>09ab322d876ae4cf10fdae23249807d3 *GRMSDKX_EN_DVD.iso
</strike>
 
*<strike>Install it to D:\sdks\v7.1</strike>
*<strike>run the Windows SDK Configuration Tool to select 7.1 as the right SDK</strike>
''<strike></strike>
 
<strike</strike>


=== <strike>MozillaBuild</strike> ===
= Post-reimaging steps =
Once one of these steps is already in the imaging process then you can move before the "Post-re-imaging steps" section.


<strike>cd /d/mozilla-build wget http://hg.mozilla.org/mozilla-build/raw-file/463f4957923f/start-msvc10-x64.bat rm guess-msvc.bat wget https://bug579159.bugzilla.mozilla.org/attachment.cgi?id=458371 -O 7.1.sdk.patch wget http://hg.mozilla.org/mozilla-build/raw-file/463f4957923f/guess-msvc.bat patch -p1 &lt; 7.1.sdk.patch rm 7.1.sdk.patch wget https://bug565402.bugzilla.mozilla.org/attachment.cgi?id=449321 -O start-buildbot.bat wget http://hg.mozilla.org/build/opsi-package-sources/raw-file/a467e0ee51ff/buildbot-startup/CLIENT_DATA/start-buildbot.sh</strike>
== Update to the latest buildbot.bat ==
We recently added steps to buildbot.bat to cleanup Windows TEMP dirs on reboot. (As user <tt>cltbld</tt>).


<strike>'''NOTE''': We are going to release a new version of MozillaBuild so people can have the msvc10 files.</strike>
cd "C:\Users\cltbld\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
mv buildbot.bat "C:\Users\cltbld\buildbot.bat.precleanup"
"C:\mozilla-build\wget\wget" -O buildbot.bat https://hg.mozilla.org/build/puppet-manifests/raw-file/f24f27f2696a/modules/buildslave/files/buildbot-win64.bat


<strike>'''TODO''': -Verify that in the next release of MozillaBuild I won't need to do the following (this should already be upstream {{bug|505842}}):</strike>
== Deploy the correct keys ==
Not even *all* production keys come on re-imaged machines.
You have to remove the keys and re-deploy them with the instructions given.
You have instructions over [[ReleaseEngineering/How_To/Adjust_SSH_keys_on_a_slave|here]] (As user <tt>cltbld</tt>).


<strike>-Add to /d/mozilla-build/msys/etc/profile at the end: export HOSTTYPE MACHTYPE OSTYPE SHELL</strike>
== Deploy google api key ==
This should go in E:\builds\gapi.data. Get the key from secrets.csv on one of the puppet masters. (As user <tt>cltbld</tt>).


<strike>-Verify that in the next release of MozillaBuild I won't need to do this (this should already be upstream {{bug|506020}}: cd /d/mozilla-build/vim/vim72 mv install.exe vim-install.exe</strike>
Or this:
"C:\mozilla-build\msys\bin\scp" -o 'StrictHostKeyChecking no' -o 'BatchMode=no' -r  cltbld@bld-linux64-ix-028:/builds/gapi.data .


=== <strike>Python and twisted</strike> ===
== Update the cltbld password ==
Remember: The Windows password and VNC passwords are different. Ask someone if you don't know which is which. (As user Administrator.)
Windows password:
* Control Panel -> User Accounts -> Change Your Windows Password -> Change your password
** or via ssh to Administrator account (enter passwd when prompted):
    net user cltbld *
* Change "DefaultPassword" to the correct cltbld password
** via gui: Open regedit -> Browse to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
** via command prompt (ssh won't work):
    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /d newpasswd /t REG_SZ /f


<strike>With Mozilla-Build 1.5.1 we use Python 2.6. See next section. TODO delete this section when done. </strike>
VNC Password:
* using ssh: use "<tt>sed</tt>", but note the "<tt>-i</tt>" option is not supported:
    cd "\Program Files\UltraVNC"
    copy ultravnc.ini ultravnc.bak
    sed -e s/default_key/new_key/ ultravnc.bak > ultravnc.ini
* via GUI:
** Right click on VNC icon in system tray -> Admin Properties -> Enter new password -> "OK" -> "Yes"
*** if rdp has been used you need to reboot to see VNC (ultra vnc), or launch ultra-vnc manually
*** with VNC login, you'll see "ctrl-alt-del to login" screen if autologon is not set up correctly.


<strike></strike>''
*<strike>Append ';d:\mozilla-build\python' to system path.</strike>
*<strike>Install this registry key:</strike>
<pre><strike>Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\Pythoncore\2.5\InstallPath]
@="d:\\mozilla-build\\python"</strike></pre>
<strike>NOTE: The registry key is different for win32 machines; notice that it says '''Wow6432Node'''</strike>


*<strike>Install </strike>[http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted_NoDocs-8.1.0.win32-py2.5.exe <strike>Twisted 8.1.0</strike>]
Reboot.
*<strike>Install </strike>[http://downloads.sourceforge.net/project/pywin32/pywin32/Build%20210/pywin32-210.win32-py2.5.exe?use_mirror=softlayer <strike>PyWin32 Extensions Build 210</strike>]
* via ssh: shutdown /r /d p:1:2 /t 1


<strike>Reference:</strike>
== Deploy MAPI Headers ==


*<strike>Read https://wiki.mozilla.org/ReferencePlatforms/Win32#Move_to_Python_2.5</strike>
Until {{bug|891956}} is closed, you will need to copy the MAPI headers onto w64-ix-slaveXX build slaves using the following procedure:
*<strike>Followed http://effbot.org/zone/python-register.htm to register Python</strike>
''<strike></strike>


<strike</strike>
The files you'll need are in http://people.mozilla.org/~jhopkins/bug869974/


=== <strike>Buildbot</strike> ===
1) Unzip the files
2) Create an ~/.adminpass file containing the Administrator password for the script to use.
3) Set up a Python virtualenv with paramiko, requests installed
4) With that virtualenv active, run the script (adjust hostname and files directory):
$ python copy-mapi-headers-relops.py w64-ix-slave22 files_to_upload/*


*<strike>TODO delete the following:</strike>
== Kpym config changes ==
From {{bug|909445}}, the following should be run as administrator to update the ssh config:
cd "c:\program files (x86)\kts"
c:\mozilla-build\wget\wget -O kts.ini "https://bugzilla.mozilla.org/attachment.cgi?id=795563"
cd scripts
c:\mozilla-build\wget\wget -O allusers.bat "https://bugzilla.mozilla.org/attachment.cgi?id=795564"


  <strike>python setup.py install --old-and-unmanageable --prefix D:\\mozilla-build\\python25
== Enable LocalDumps ==
cp bin/buildbot /d/mozilla-build/python25/Scripts/</strike>
From {{bug|897768}}, run the following from the command-line:
  reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -v DumpType -t REG_DWORD -d 1
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"

Latest revision as of 17:38, 1 November 2013

Version 1

Configuration details

File Name: en_windows_server_2008_r2_standard_enterprise_datacenter_web_vl_build_x64_dvd_x15-59754.iso
Date Published (UTC): 8/14/2009 9:55:36 AM Last Updated (UTC): 9/28/2009 8:45:48 PM
SHA1: AD855EA913AAEC3F1D0E1833C1AEF7A0DE326B0A
ISO/CRC: F111FF61

Machine setup

Administrator password

  • Search for secpol.msc
  • Security Settings -> Account Policies -> Password policy
  • Change "Password must meet complexity requirements" to Disabled
  • Go and change the Admin's current password

Virtual Memory

  • Sign is as Administrator
  • Control Panel -> System and Security -> System
  • Advanced system settings
  • Advanced tab -> Settings... under Performance
  • Advanced tab -> Change... under Virtual Memory
  • Un-check "Automatically manage paging file size for all drives"
  • Custom size: 4048-4048
  • Restart the machine

There are some advantages to choosing a fixed size:

  • free space doesn't fluctuate on c:\
  • the page file doesn't get fragmented on the disk
  • OOM conditions are more repeatable


Reference:

Hard-drive adjustments

  • Start -> All Programs -> Administrative tools -> Computer Management
  • Storage -> Disk Management
  • Select the C drive
    • "Shrink volume..."
    • Select a value that will make the remaining free space to match the table below

* Create the D drive with 20480 MB, label it "Tools" and do a quick NTFS format (no indexation)

NOTE: Creating the E drive will be done through a script. TODO: armenzg: digipengi we have to block indexation to happen in such drive

These are the disk distributions you should have at the end:

C drive 61440 MB 60GB NTFS
E drive (Builds) ~173GB NTFS
  • Manually right click on disks C, select properties and go to the general tab for the dialog. At the bottom of the dialog box, verify that "Compress this drive" and "Indexing service" are both unchecked (turned off).

Hard-drive improvements:

  • Start dos-cmd-shell and run the following commands. It does not matter what directory is currect directory, these changes are system wide.
 fsutil behavior set disable8dot3 1
 fsutil behavior set disablelastaccess 1
  • Reboot

We followed tips outlined http://www.windowsdevcenter.com/pub/a/windows/2005/02/08/NTFS_Hacks.html and http://technet.microsoft.com/en-us/library/cc785435.aspx.

Clean Manager

  • Open "Server Manager", right click and choose "Add features", then select "Desktop Experience" to be installed
  • You will have to restart the server for this to apply

Daemon tools

3cad7a0a3d5c110a6e70f3d64a32a44f *DTLite4402-0131.exe 
  • There is a newer copy in dev-stage since that previous version is not available anymore:
http://dev-stage01.build.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/DTLite4454-0315.exe
  • Install it only with "Startup shortcuts"

Create cltbld user

  • Go to "Server Manager"
  • Configuration -> Local Users and Groups -> Users
  • Create the "New User"
  • Modify the properties of it
    • "User cannot change password", "password never expires"
    • Add "Remote Desktop Users" to "Member Of"

Basic OS Setup

  • Verify the name of the NetBios computer name and the DNS suffix are correct
    • Control Panel -> System and security -> System
    • "Change settings"
    • Under "Computer name" tab click on "Change..."
    • Add "win64-ix-ref" as the "Computer name"
    • Click on "More..." and add "build.mozilla.org" as the Primary DNS suffix
  • Check for updates
    • Install any updates that were available before 2011/06/28
  • Check for updates a second time after the first batch of updates are installed
    • Windows Server 2008 R2 Service Pack 1 x64 Edition (KB976932)
  • Disable automatic updates
    • Control Panel -> System and Security -> Windows Update
    • Change settings -> "Never Check for Updates" and click "OK
  • Keep Windows Firewall ON and add exceptions once you install the SSH and VNC servers
  • Turn off Screensaver
    • Control Panel -> Appearance and Personalization -> Change screen saver (under Personalization)
    • Select "None", click "OK"
  • Energy settings
    • Control Panel -> Hardware -> Power Options
    • "High Performance"
  • High performance
    • sysdm.cpl
    • Advanced -> Performance.Settings...
      • On "Advanced" set to adjust best performance for "Programs" (a.k.a foreground)
  • Networking
    • Turned off all MS networking, leaving only TCP/IP v4 and v6

Auto-login

  • Allow cltbld to restart the system
    • Start menu -> Run -> gpedit.msc (as administrator)
    • Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment
    • Double click 'Shut down the system', add cltbld to the list.
  • Download the following file, change the password and import into the registry (as administrator)
 wget -Ologon.reg --no-check-certificate https://bug645024.bugzilla.mozilla.org/attachment.cgi?id=544857

Build tools, compilers and SDKs

MozillaBuild 1.5.1

Visual Studio 2010

Even though the default compiler is VS2008's but might as well get this deployed for the future.

  • Download and mount the ISO with Daemon tools lite
5b7e2c716510c87ddf64d26ab9a072f2 *en_visual_studio_2010_professional_x86_dvd_509727.iso 
  • Do a custom install:
    • C:\Tools\msvs10
    • Only select "Visual C++"

Visual Studio 2008

  • To be able to install VS2008 on Win2008 you first have to install ".NET Framework 3.5.1" (See this article for more information).
    • Server Manager -> right click on "Features" and select "Add Feature"
    • Check ".NET Framework 3.5.1 Feature"
    • "Add Required Role Services"
    • Select "Next" a couple of times and then "Install"
  • Mount the VS2008 DVD with Daemon tools Lite
  • Do a custom installation into C:\Tools\msvs9
    • Select "Visual C++" (including x64 compilers)
    • Select "Tools for Redistributing Applications"
 ba1ba1a6ddd0c93441153af9e93a7b22 *en_visual_studio_2008_professional_x86_x64wow_dvd_X14-26326.iso

Visual Studio 2008 SP 1 (Installer)

As documented in Windows Build Prerequisites

49490945de6a32fafadb861f9f308a84 VS90sp1-KB945140-ENU.exe

DirectX SDK

This is required to build ANGLE.

 a7fa610b1791d873162b9e33007a6777 *DXSDK_Jun10.exe
  • Install it to "C:\Tools\sdks\dx10"
  • Choose the following components:
    • Instal DirectX Runtime
    • DirectX Utilities
    • DirectX Headers and Libs
    • DirectX Redistributable Files

Windows 7 SDK

  • Like in https://wiki.mozilla.org/ReferencePlatforms/Win32#Version_20_-_20090930
  • Download the web installer or use the DVD ISO.
  • run the Windows SDK Configuration Tool to select 7.0 as the right SDK
  • Mount the DVD with Daemon Tools Lite and install into C:\Tools\sdks\v7.0
    • Windows Headers and Libraries
    • Visual C++ compilers (support for x64 and IA64)
    • Windows Development Tools
    • Application Verifier
    • Debugging Tools for Windows
1081c87025a5a507a55426ac59222b7a *GRMSDKX_EN_DVD.iso

Windows updates

After Visual Studio and the SDKs have been installed let's check for updates again. These got installed:

KB2160841 KB2416472 KB2524375

Disable JIT debugger

This is something similar to what was done in bug 533185 for win32 slaves.

To disable the JIT debugger I read this and this and did the following:

In the Registry Editor window, locate and delete the follow registry keys:
 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger
 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger
 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger

Disable Windows Error Reporting

When one of the tests run by "make -k check" crashes it reports a crash dialog saying "program.exe stoppped working" which can be disabled by doing the following:

  • gpedit.msc
  • Computer configuration -> Administrative Templates
  • Windows Components -> Windows Error Reporting
  • Set "Prevent display of the user interface for critical errors" to Enabled

Add yasm.exe

To make the webm build to work for Windows 64-bit I had to:

 wget http://www.tortall.net/projects/yasm/releases/vsyasm-1.1.0-win64.zip
 unzip vsyasm-1.1.0-win64.zip
 mv vsyasm.exe /c/mozilla-build/msys/bin/yasm.exe
 rm vsyasm.* readme.txt

NOTE: Win32 machines install yasm.exe under /c/mozilla-build/yasm and add a profile-extrapaths.sh under /c/mozilla-build/msys/etc/profile.d according to this.

Automation setup

Keys

  • Get production keys unto C:/Users/cltbld/.ssh
  • Tested that I can run this:
#!/bin/sh
set -ex
ssh -i ~/.ssh/ffxbld_dsa ffxbld@aus2-staging.mozilla.org exit
ssh -i ~/.ssh/ffxbld_dsa ffxbld@dm-symbolpush01.mozilla.org exit
ssh -i ~/.ssh/ffxbld_dsa ffxbld@stage.mozilla.org exit
ssh -i ~/.ssh/ffxbld_dsa ffxbld@stage-old.mozilla.org exit
ssh -i ~/.ssh/xrbld_dsa xrbld@stage.mozilla.org exit

Python 2.6 and twisted 9

  • Append ';C:\mozilla-build\python;C:\mozilla-build\msys\bin;C:\mozilla-build\vim\vim72' to system path.
  • Install this registry key:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\Pythoncore\2.6\InstallPath]
@="C:\\mozilla-build\\python"

NOTE: The registry key is different for win32 machines; notice that it says Wow6432Node

Twisted patches

 wget -Ob128.patch --no-check-certificate http://hg.mozilla.org/build/twisted/raw-rev/0b441f0f68b4
 wget -Osubproc.patch --no-check-certificate https://bugzilla.mozilla.org/attachment.cgi?id=451277
 cd /c/mozilla-build/python/lib/site-packages
 cd twisted
 patch -p0 < ~/subproc.patch
 patch -p2 < ~/b128.patch 

Startup scripts

 cd /c/Users/cltbld/AppData/Roaming/Microsoft/Windows/Start\ Menu/Programs/Startup
 wget -Obuildbot.bat http://hg.mozilla.org/build/puppet-manifests/raw-file/c6e02dee3589/modules/buildslave/files/buildbot-win64.bat
 # As administrator
 cd /c/mozilla-build
 wget -Ostart-buildbot.bat http://hg.mozilla.org/build/puppet-manifests/raw-file/c6e02dee3589/modules/buildslave/files/start-buildbot-win64.bat

Create directories

  • Create logging and buildbot directories
mkdir /c/tmp

Other tools

Installing NRPE Daemon

To learn more about Nagios/NRPE and NSClient++ please read this blog post with some of my extra debugging and testing.

NSClient++ is an NRPE implementation on Windows.

  • Enable ICMP
runas /user:Administrator "netsh firewall set icmpsetting 8"
  • Download NSClient++ 0.3.8 for 64-bit machines
    • I am going to use the installer as it adds the firewall exceptions for me.
 05/27/10 23:11:48 0735d6ef6953e315b3ce9e02c1ccdb11 NSClient%2B%2B-0.3.8-x64.msi 
  • Start the installer and install all the defaults
    • "Do not start the service" and finish the installation
  • Rename C:\Program Files\NSClient++\NSC.ini as NSC.original.ini
  • Download releng's NSC.ini and place it on C:\Program Files\NSClient++
 cd /c/Program\ Files/NSClient++
 mv NSC.ini NSC.original.ini
 wget -O NSC.ini http://hg.mozilla.org/build/opsi-package-sources/raw-file/2d51f32ff0f2/nagios/CLIENT_DATA/nsc.ini

To check that everything went well do the following (from this documentation):

  • "C:\Program Files\NSClient++\nsclient++.exe" /test
  • Type these checks and look at the results
    • CheckDriveSize ShowAll MinWarnFree=10% MinCritFree=5% Drive=c:\
    • CheckCPU warn=80 crit=90 time=20m time=10s time=4

SSH

Install the KTS SSH server and copy the key from another machine.

  • Download the installer from here
5ea25269b460ac3b99a5495a6602210a *kts118.exe
  • Install it with the default values
  • Copy the kts.ini into "C:\Program files (x86)\KTS\kts.ini" from a Win32 machine

Add firewall exception for SSH

  • Control Panel\System and Security\Windows Firewall\Allowed Programs
    • "Allow another program..."
      • "C:\Program Files (x86)\KTS\daemon.exe" and check "Home" and "Public"

VNC (UltraVNC)

  • Follow the "X64 1.0.8.2 Full" link in here.
620329f947b7085e9361f9631e45ecf8 *UltraVN1.0.8.2_x64_Setup.exe
  • Install it
    • Select the defaults up until the "Additional Tasks" screen
      • "Register UltraVNC as a Service"
      • "Start or restart UltraVNC"
      • "UltraVNC Server driver install" - explanation
    • Install the UVNC BVBA Display adapters prompt and select "Always trust"
    • After finishing the installation go to services and stop 'uvnc_service'.
    • Browse to C:\Program Files\UltraVNC and run 'winvnc.exe' as administrator (right click => 'run an administrator').
      • Under "Incoming connections" section:
        • Check "Ports" & Main: 5900
        • Uncheck "Enable JavaViewer (Http Connect)"
      • Under "File Transfer" section
        • Uncheck "Enable"
        • Uncheck "User Impersonation"
      • Add cltbld's credentials under "Authorization"
    • Restart the computer

Improve graphics performance

  • Connect through VNC (it should connect to cltbld)
  • sysdm.cpl
    • Advanced -> Performance.Settings...
      • On "Visual effects" set "Adjust for best performance"

Clean up

  • Now that we are ready to clone let's do a proper clean up to have the C and D drives as clean as possible
    Start -> All Programs -> Accessories -> System Tools -> Disk Cleanup. Do a default clean of C:
  • Let's also remove restore point to free up space on C drive

Buildbot 0.8.4

  • Install Buildbot and newer runslave.py (they are dependent on each other)
# ssh Administrator@slave
c:\mozilla-build\wget\wget.exe -O update-buildbot.bat https://bugzilla.mozilla.org/attachment.cgi?id=627242
update-buildbot.bat

Python 2.7.3

# ssh Administrator@slave
c:\mozilla-build\wget\wget.exe http://dev-stage01.build.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/python/python-2.7.3.msi
msiexec /i python-2.7.3.msi /quiet /norestart  /log python27_install.log TARGETDIR=c:\mozilla-build\python27 ALLUSERS=1

# Install pywin32
c:\mozilla-build\msys\bin\bash --login -i
/c/mozilla-build/wget/wget.exe http://dev-stage01.build.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/python/install_pywin32_python27.sh
./install_pywin32_python27.sh

Newer NSC.ini

# ssh Administrator@slave
cd "C:\Program Files\NSClient++"
c:\mozilla-build\wget\wget.exe -O NSC.ini http://hg.mozilla.org/build/opsi-package-sources/raw-file/3857d6f521f2/nagios/CLIENT_DATA/nsc.ini

Binscope

ssh Administrator@slave
c:\mozilla-build\wget\wget.exe http://people.mozilla.com/~asasaki/BinScopeSetup.msi
msiexec /i BinScopeSetup.msi /quiet /norestart /log binscope_install.log ALLUSERS=1

Fix auto-login after new password deployment

This is what you need to run to fix a machine:

  REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1
  REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d YouWish

MaRu fixed the issue by updating the LTICleanup.wsf The lines modified were (password has been taken out for security reasons)

oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "1", "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName", "cltbld", "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName", "", "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword", "*********", "REG_SZ"
oShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoLogonCount", &H00000000, "REG_DWORD"
On Error Goto 0

Re-deploy twisted patches

  • It seems we have regressed this with the latest buildbot update
  • bug 770506 - We should verify this and file a bug for IT to fix it
    • TODO meanwhile get work around for setting new slaves up

Deploy Windows SDK for Windows 8

This can be deployed like this:

C:\mozilla-build\wget\wget.exe https://github.com/armenzg/bearded-ironman/raw/master/win2008_64bit/install_windows_standalone_sdk_8.0.bat
install_windows_standalone_sdk_8.0.bat

File:Beispiel.jpg== Deploy the latest known_host == This is needed until bug 849942 fixed.

ssh as cltbld to host
cd .ssh
copy known_hosts known_hosts.bak
C:\mozilla-build\msys\bin\scp.exe cltbld@buildbot-master19.build.mozilla.org:~/known_hosts .
set HOME=C:\Documents and Settings\cltbld
C:\mozilla-build\msys\bin\ssh -i ~/.ssh/ffxbld_dsa ffxbld@symbolpush.mozilla.org hostname

which should show symbols1.dmz.phx1.mozilla.com

I also updated this zip with the ssh keys etc referenced in this doc https://wiki.mozilla.org/ReleaseEngineering/How_To/Adjust_SSH_keys_on_a_slave#Production when I landed the changes for the new symbol server.

Deploy _dumbwin32proc.py

Until bug 853609 is fixed, log in as Administrator and run this:

C:\mozilla-build\wget\wget.exe -q -Odeploy_dumbwin32proc.bat https://bugzilla.mozilla.org/attachment.cgi?id=725099
deploy_dumbwin32proc.bat

Post-reimaging steps

Once one of these steps is already in the imaging process then you can move before the "Post-re-imaging steps" section.

Update to the latest buildbot.bat

We recently added steps to buildbot.bat to cleanup Windows TEMP dirs on reboot. (As user cltbld).

cd "C:\Users\cltbld\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
mv buildbot.bat "C:\Users\cltbld\buildbot.bat.precleanup"
"C:\mozilla-build\wget\wget" -O buildbot.bat https://hg.mozilla.org/build/puppet-manifests/raw-file/f24f27f2696a/modules/buildslave/files/buildbot-win64.bat

Deploy the correct keys

Not even *all* production keys come on re-imaged machines. You have to remove the keys and re-deploy them with the instructions given. You have instructions over here (As user cltbld).

Deploy google api key

This should go in E:\builds\gapi.data. Get the key from secrets.csv on one of the puppet masters. (As user cltbld).

Or this:

"C:\mozilla-build\msys\bin\scp" -o 'StrictHostKeyChecking no' -o 'BatchMode=no' -r  cltbld@bld-linux64-ix-028:/builds/gapi.data .

Update the cltbld password

Remember: The Windows password and VNC passwords are different. Ask someone if you don't know which is which. (As user Administrator.) Windows password:

  • Control Panel -> User Accounts -> Change Your Windows Password -> Change your password
    • or via ssh to Administrator account (enter passwd when prompted):
   net user cltbld *
  • Change "DefaultPassword" to the correct cltbld password
    • via gui: Open regedit -> Browse to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
    • via command prompt (ssh won't work):
   reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /d newpasswd /t REG_SZ /f

VNC Password:

  • using ssh: use "sed", but note the "-i" option is not supported:
   cd "\Program Files\UltraVNC"
   copy ultravnc.ini ultravnc.bak
   sed -e s/default_key/new_key/ ultravnc.bak > ultravnc.ini
  • via GUI:
    • Right click on VNC icon in system tray -> Admin Properties -> Enter new password -> "OK" -> "Yes"
      • if rdp has been used you need to reboot to see VNC (ultra vnc), or launch ultra-vnc manually
      • with VNC login, you'll see "ctrl-alt-del to login" screen if autologon is not set up correctly.


Reboot.

  • via ssh: shutdown /r /d p:1:2 /t 1

Deploy MAPI Headers

Until bug 891956 is closed, you will need to copy the MAPI headers onto w64-ix-slaveXX build slaves using the following procedure:

The files you'll need are in http://people.mozilla.org/~jhopkins/bug869974/
1) Unzip the files
2) Create an ~/.adminpass file containing the Administrator password for the script to use.
3) Set up a Python virtualenv with paramiko, requests installed
4) With that virtualenv active, run the script (adjust hostname and files directory):
$ python copy-mapi-headers-relops.py w64-ix-slave22 files_to_upload/*

Kpym config changes

From bug 909445, the following should be run as administrator to update the ssh config:

cd "c:\program files (x86)\kts"
c:\mozilla-build\wget\wget -O kts.ini "https://bugzilla.mozilla.org/attachment.cgi?id=795563"
cd scripts
c:\mozilla-build\wget\wget -O allusers.bat "https://bugzilla.mozilla.org/attachment.cgi?id=795564"

Enable LocalDumps

From bug 897768, run the following from the command-line:

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -v DumpType -t REG_DWORD -d 1 
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"