ReferencePlatforms/Win64
This is a DRAFT. I am still working on this.
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
TODO: Still figuring out if this is needed
- 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: 4092-6138
- Restart the machine
Reference:
- How to Move the Windows Default Paging File
- How to determine the appropriate page file size for 64-bit versions of Windows
Hard-drive improvements (D & E partitions)
- 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)
- Create the E drive with remaining MB, label it "Builds" and do a quick NTFS format (no indexation)
These are the disk distributions you should have at the end:
| C drive | 40960 MB | 40GB | NTFS |
| D drive (Tools) | 20480 MB | 20GB | NTFS |
| E drive (Builds) | ~143GB* | 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 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:
- 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
- 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
- Check for updates
KB980195 KB2482017 KB979916 KB982526 KB983590 KB2416471 KB2032276 KB2079403 KB2207566 KB2286198 KB2296011 KB2305420 KB2347290 KB2385678 KB2387149 KB2393802 KB2419640 KB2423089 KB2425227 KB24442962 KB2475792 KB2479628 KB2483614 KB2485376 KB972270 KB974571 KB975467 KB975560 KB978542 KB978601 KB978886 KB979309 KB979482 KB979687 KB979688 KB980232 KB982132 KB982214 KB982799 KB981391 KB981392 KB977236 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)
- 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
- 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
wget -Ologon.reg --no-check-certificate https://bug428123.bugzilla.mozilla.org/attachment.cgi?id=367599
Build tools, compilers and SDKs
MozillaBuild 1.5.1
- Install MozillaBuildSetup1.5.1.exe to D:\mozilla-build
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:
- D:\msvs10
- Only select "Visual C++"
Visual Studio 2008
- Read Win2008 R2 and VS2008
- 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 D:\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
- Download VS90sp1 8/11/2008 and install
49490945de6a32fafadb861f9f308a84 VS90sp1-KB945140-ENU.exe
DirectX SDK
This is required to build ANGLE.
- Download the June 2010 DirectX SDK web installer
a7fa610b1791d873162b9e33007a6777 *DXSDK_Jun10.exe
- Install it to "D:\sdks\dx10"
- Choose the following components:
- 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 D:\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 VS plus the SDKs have been installed we can check for updates. These got installed:
KB2160841 KB2416472 KB2524375
Disable JIT debugger
TODO this section will probably go away on a clean install.
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 this instructions.
TODO add screenshots wrt the JIT debugger for reference.
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 /d/mozilla-build/msys/bin/yasm.exe rm vsyasm.* readme.txt
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 this.
Automation setup
Keys
- Got production keys
- symlinked to production keys
- Tested that I can run this:
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 ';d:\mozilla-build\python' to system path.
- Install this registry key:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\Pythoncore\2.6\InstallPath] @="d:\\mozilla-build\\python"
NOTE: The registry key is different for win32 machines; notice that it says Wow6432Node
- Install Twisted 9.0.0
- Install PyWin32 Extensions Build 214
Twisted patches
cd /e/setup 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 /d/mozilla-build/python/lib/site-packages patch -p0 < /e/setup/b128.patch cd twisted patch -p0 < /e/setup/subproc.patch
Buildbot
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 wget -Obuildbot.bat https://bugzilla.mozilla.org/attachment.cgi?id=519478 # modify the passwords cd /d/mozilla-build wget -Ostart-buildbot.bat https://bugzilla.mozilla.org/attachment.cgi?id=519761 wget -Ostart-buildbot.sh https://bugzilla.mozilla.org/attachment.cgi?id=473651
Tools and create directories
- Tools repository
cd /d/ hg clone http://hg.mozilla.org/build/tools
- Logging and buildbot directories
mkdir /c/tmp mkdir -p /e/buildbot/moz2_slave
Other tools
Installing NRPE Daemon
To learn more about Nagios/NRPE and NSClient++ please read this blog post.
NSClient++ is an NRPE implementation on Windows.
- 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
- Checkout mozilla/tools/nagios and copy NSC.ini to C:\Program Files\NSClient++
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
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
- Check "Register UltraVNC as a Service" and "Start or restart UltraVNC"
- 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"
- Under "Incoming connections" section:
- Restart the computer
- Select the defaults up until the "Additional Tasks" screen
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
- Connect through VNC (it should connect to cltbld)
- sysdm.cpl
- Advanced -> Performance.Settings...
- On "Visual effects" set "Adjust for best performance"
- Advanced -> Performance.Settings...
TODO
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
Delete all this
Once we are done remove all these steps that I believe we don't need.
OPSI Client & AutoIT
Enable File and Print Sharing
Enable File & Print SharingControl Panel -> Network and Internet -> Network and Sharing Center -> Change advanced sharing settingsEnable "Turn on network discovery" and "Turn on file and printer sharing", click "Save Changes".
Open firewall (add access to OPSI server)Control Panel -> System and Security -> Windows Firewall -> Advanced SettingsInbound rulesFor each "File and Printer" entry (there was a subset of them turned ON):Double click and select "Scope" tabUnder "Remote IP address" select "These IP addressess"Enter the IP address of the production OPSI server (10.2.71.216 - staging AND/OR 10.2.71.64 - production)
OPSI Prep and Install
We need to flip a few options in Windows to enable certain packages to install without prompting.
NOTE: Do all these as Administrator or it won't work.
TODO: I can't find this - <i>Do not prompt for unsigned drivers (needed for at least the windows mobile sdk)Control Panel -> Hardware -> Driver Signing, choose "Ignore".
Security SettingsDisable DEP with this command: "bcdedit.exe /set {current} nx AlwaysOff" (you might need to run cmd as Administrator even if you use Admin user)Start Menu -> Run -> \\10.2.71.64Use 'pcpatch' and the root password when prompted. (you might have to use the older root password)Right click 'opt_pcbin' and select 'Map network drive...' and select "Finish" with the defaults.Browse to z:\install\preloginloaderDouble click 'opsi-prep.vbs'Double click 'service-setup.cmd', hit a key when prompted (it might be needed to "Run as Administrator" still to verify)We might need to run files\opsi\UAC off from the desktop rather than network drive according to cshieldWhen prompted for a username and password use 'root' and the appropriate password.I see a message for restarting to turn off UACThe machine did not reboot forcibly as mentioned below
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.
Autoit v3.3.0.0
We require Autoit to deploy many packages. To install it, do the following:
Checkout the installer:
cvs -d:ext:cltbld@cvs.mozilla.org:/mofo co ref-platforms/win32/autoit-v3-setup.exe 0a9b41382ad6ae4308d67f7709fcd4b2 *ref-platforms/win32/autoit-v3-setup.exe
(as Administrator), run the installer, accept the defaults
Windows 7.1 SDK and .NET Framework 4 (ISO)
I think we don't need this SDK but I will double check with the 2nd Windows 64-bit machine I am setting up
Download and mountGRMSDKX_EN_DVD.iso
09ab322d876ae4cf10fdae23249807d3 *GRMSDKX_EN_DVD.iso
Install it to D:\sdks\v7.1run the Windows SDK Configuration Tool to select 7.1 as the right SDK
<strike
MozillaBuild
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 < 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
NOTE: We are going to release a new version of MozillaBuild so people can have the msvc10 files.
TODO: -Verify that in the next release of MozillaBuild I won't need to do the following (this should already be upstream bug 505842):
-Add to /d/mozilla-build/msys/etc/profile at the end: export HOSTTYPE MACHTYPE OSTYPE SHELL
-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
Python and twisted
With Mozilla-Build 1.5.1 we use Python 2.6. See next section. TODO delete this section when done.
Append ';d:\mozilla-build\python' to system path.Install this registry key:
<strike>Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\Pythoncore\2.5\InstallPath] @="d:\\mozilla-build\\python"</strike>
NOTE: The registry key is different for win32 machines; notice that it says Wow6432Node
InstallTwisted 8.1.0InstallPyWin32 Extensions Build 210
Reference:
Read https://wiki.mozilla.org/ReferencePlatforms/Win32#Move_to_Python_2.5Followed http://effbot.org/zone/python-register.htm to register Python
<strike
Buildbot
TODO delete the following:
python setup.py install --old-and-unmanageable --prefix D:\\mozilla-build\\python25 cp bin/buildbot /d/mozilla-build/python25/Scripts/