ReferencePlatforms/Win32
This procedure will re-create the Windows 2003 based reference image. Internally, this VM is named win2k3sp2-ref-vm.
When you update the ref platform, also update the text file on the desktop of the VM (in both Admin and cltbld) to the new version number.
Contents
- 1 Things Done For You
- 1.1 Version 3
- 1.2 Version 4
- 1.3 Version 5 (August 2007 Update/Refresh)
- 1.4 Version 6 (January 2008 Update/Refresh)
- 1.5 Version 7
- 1.6 Version 8
- 1.7 Version 9
- 1.8 Version 10
- 1.9 Version 11
- 1.10 Version 12
- 1.11 Version 13
- 1.12 Version 14
- 1.13 Version 15
- 1.14 Version 16
- 1.15 Version 17
- 1.16 Version 18 - 20090817
- 1.17 Version 19 - 20090820
- 1.18 Version 20 - 20090930
- 1.19 Version 21 - 20091014
- 1.20 Version 22 - 20091203
- 1.21 Version 23 - 20091214
- 1.22 Version 24 - 20100124
- 1.23 OPSI packages
- 2 Manual Setup Steps after VMImage
Things Done For You
Version 3
Configuration Details
VM Created with ISO: EN_WIN2003_ENTWITHSP1_WIN2003_STANDARDWITHSP1.ISO MD5 sum: 9f584062feca857738ac794a8bc46936 From MSDN CD: Disc 2429.4, November 2005
Includes Downloaded Software Updates
- Security Update for Windows Server 2003 (KB917734)
- Security Update for Windows Server 2003 (KB914389)
- Security Update for Windows Server 2003 (KB917344)
- Security Update for Windows Server 2003 (KB918439)
- Security Update for Windows Server 2003 (KB911280)
- Cumulative Security Update for Internet Explorer for Windows Server 2003 (KB916281)
- Security Update for Windows Server 2003 (KB917953)
- Windows Malicious Software Removal Tool - June 2006 (KB890830)
- Security Update for Windows Server 2003 (KB908531)
- Cumulative Security Update for Outlook Express for Windows Server 2003 (KB911567)
- Security Update for Windows Server 2003 (KB911562)
- Security Update for Windows Server 2003 (KB911927)
- Security Update for Windows Server 2003 (KB908519)
- Security Update for Windows Server 2003 (KB912919)
- Update for Windows Server 2003 (KB910437)
- Security Update for Windows Server 2003 (KB904706)
- Security Update for Windows Server 2003 (KB896424)
- Security Update for Windows Server 2003 (KB900725)
- Security Update for Windows Server 2003 (KB905414)
- Security Update for Windows Server 2003 (KB902400)
- Security Update for Windows Server 2003 (KB899589)
- Security Update for Windows Server 2003 (KB901017)
- Security Update for Windows Server 2003 (KB893756)
- Security Update for Windows Server 2003 (KB896428)
- Security Update for Windows Server 2003 (KB896422)
- Security Update for Windows Server 2003 (KB896358)
- Security Update for Windows Server 2003 (KB899587)
- Security Update for Windows Server 2003 (KB890046)
- Security Update for Windows Server 2003 (KB899591)
- Security Update for Windows Server 2003 (KB899588)
- Security Update for Windows Server 2003 (KB901214)
- Update for Windows Server 2003 (KB898715)
Configuration Changes
- Turned OFF all automatic updates
- Turned ON firewall; allowed RDP and SSH
- Turned off all MS networking, leaving only TCP/IP
- Created cltbld account
- Turned on RDP; allowed cltbld and Administrator to connect
- Turned performance settings to forground programs -> max
- Turned off screensavers
- Set networking to DHCP (so, will have to assign an IP)
- Installed VMware tools; expects vmxnet networking
VC8 CONFIGURATION DETAILS
Installed from ISOs: 1cc97c96e3b037e4514b8f0fe6929862 en_vs_2005_pro_cd1.iso 7ac81a9a1c1571ed7e204fc96093e0c7 en_vs_2005_pro_cd2.iso
Includes ONLY the following VC8 components:
- Visual C++
- Tools for Redistributing Applications
FURTHER CONFIGURATION DETAILS
- Add 15 gig d:\ drive
- install cygwin into d:\cygwin
- download cygwin packages to d:\packages (from www.cygwin.com; check CVS)
- download vc8 moztools packages into d:\packages (from MDC; check CVS)
- install vc8 tools into d:\moztools
- rename link.exe to cyglink.exe (per MDC instructions)
- Changed the following environment variables (system wide) in the System control panel:
-- CYGWINBASE: d:\cygwin -- VCVARS: C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat
- Setup openssh to start as a service by running ssh-host-config
(http://pigtail.net/LRP/printsrv/cygwin-sshd.html)
- Check out mofo/release/tinderbox-configs/host/ssh in ~; ln -s .ssh/ to it.
- Change font on Cygwin window
- Install Blat:
c25c74ecb8fe8e670e204e7196679190 blat-2.50/Blat250.source.zip 66fc3b95fde52fa1887c9d8aab472033 blat-2.50/Blat250.zip
- unzip Blat250.zip
- mv -v full/blat.* /cygdrive/d/moztools/bin
- Configure Blat: blat -install rheet.mozilla.org build@mozilla.org 5
- Install 7Zip
1c412567bb5473911a44ce17b5aa02dd 7zip-4.32/7z432.exe d55f567a62153bc43a04e9c52f210cdd 7zip-4.32/7z432.tar.bz2
- Run the installer; install in d:\buildtools\7zip
- Install UPX:
852bd691d8abc75b52053465846fba34 upx-1.25/ucl-1.03.tar.gz 6f20a62999a46a1864652454b3c8a5d8 upx-1.25/upx-1.25-src.tar.gz a092272e9e6995764adfcd4fb1e729db upx-1.25/upx125w.zip
- unzip upx125w.zip into d:\buildtools\upx
- Install NSIS:
32b1a327d3611f01053c3a2677e50d7b nsis-2.17/nsis-2.17-setup.exe a3c068fc1cb613160d7202e1719d63bc nsis-2.17/nsis-2.17-src.tar.bz2
- Run the installer; full install; install in d:\buildtools\NSIS
- Delete desktop icon
- Set the perms on the installed tools correctly
- chgrp -R users d:\buildtools
- chmod -Rv 0755 d:\buildtools
Version 4
Was created from pre-tools installation snapshot of the above Win32 VM, so Cygwin, etc. weren't ever installed (from this VM's perspective).
- Installed Win2k3 Service Pack 2 for x86 32-bit.
- Installed post-SP2 updates:
- Windows Malicious Software Removal Tool - March 2007 (KB890830)
- Update for Windows Server 2003 Service Pack 2 (KB931836)
- MSXML 6.0 RTM Security Update (KB927977)
- MSXML 6.0 RTM Security Update (925673)
Version 5 (August 2007 Update/Refresh)
Configuration Changes
These are all VMware-related changes:
- Upgrade virtual hardware in VI (ESX 3 virtual machine)
- Change to LSI logic SCSI controller
- Upgrade VMware tools to build 38803
Includes Automatic Updates
In Order:
- Run Windows Updater
- Install Microsoft Update Active X control
- Install Microsoft Windows Component Publisher Active X control
- Click "Update Windows"
- Update to Windows 2k3 Service Pack 2 (32-bit x86, released 6/12/2007)
Individual Updates:
Windows 2003 Server
- Security Update for Windows Media Player 6.4 (KB925398)
- Windows Malicious Software Removal Tool - July 2007 (KB890830)
- Security Update for Microsoft .NET Framework, Version 2.0 (KB928365)
- Security Update for Microsoft .NET Framework, Version 1.1 Service Pack 1 (KB933854)
- Security Update for Windows Server 2003 (KB926122)
- Security Update for Windows Server 2003 (KB924667)
- Cumulative Security Update for Internet Explorer 6 for Windows Server 2003 (KB933566)
- Cumulative Security Update for Outlook Express for Windows Server 2003 (KB929123)
- Security Update for Windows Server 2003 (KB935840)
- Security Update for Windows Server 2003 (KB935839)
- Update for Windows Server 2003 (KB927891)
- MSXML 6.0 RTM Security Update (KB927977)
- Security Update for Windows Server 2003 (KB930178)
- Security Update for Windows Server 2003 (KB931784)
- Security Update for Windows Server 2003 (KB932168)
- Security Update for Windows Server 2003 (KB925902)
- Update for Windows Server 2003 Service Pack 2 (KB931836)
Microsoft CAPICOM
- Security Update for CAPICOM (KB931906)
Microsoft SQL Server Feature Pack
- MSXML 6.0 RTM Security Update (925673)
Microsoft Visual Studio 2005
- Security Update for Microsoft Visual Studio 2005 (KB925674)
to install
- Visual Studio 2005 Service Pack 1 (KB926601)
- Install MozillaBuild 1.1 into /d/mozilla-build
- Run sysprep-cd scripts in Win32 directory of the moz-sysprep-cd (stored in mofo repo, public copy)
Version 6 (January 2008 Update/Refresh)
Install Microsoft® Windows® Software Development Kit Update for Windows Vista
- Make sure you get the Web Install
- ONLY install the 'Developer Tools' (all of them). Do NOT install Documentation or Samples.
- Install to 'd:\sdks\v6.0'
- Install Samples to 'd:\sdks\v6.0\Samples'
- After installing it, it should show up in Add/Remove Programs as 'Microsoft Windows Software Development Kit for Windows Vista Update (6000.16384.10)'.
Install MozillaBuild 1.2
- Delete everything in d:\mozilla-build
- Uninstall previous NSIS (v2.17) installation.
- Download MozillaBuild 1.2 and install to d:\mozilla-build.
- MozillaBuild1.2 includes NSIS v2.22
Version 7
Installing the NRPE daemon
NOTE: We now (since 2010-04-26) manage NSC.ini through OPSI.
- Download NSClient++ and extract to C:\Program Files\nscp
- Checkout mozilla/tools/nagios and copy NSC.ini to C:\Program Files\nscp
- Open up cmd.exe and do the following:
cd C:\Program Files\nscp nsclient++ /install nsclient++ /start
- Added firewall exceptions for port 5666 (tcp+udp) and ICMP ping replies.
- Go to Control Panel -> Windows Firewall
- Click on the 'Exceptions' tab.
- Click 'Add Port'
- Name: 'nscp', Port: '5666', (*) TCP
- Repeat the above for (*) UDP
- Go To Control Panel -> Windows Firewall
- Click on the 'Advanced' tab.
- Click on ICMP -> Settings
- Check the box for 'Allow incoming echo request'
- Hit OK, OK.
Version 8
Move to Python 2.5
- Delete d:\buildbot (which contains python24)
- Only necessary if ref-image version 7 was run through post-setup.
- Append ';d:\mozilla-build\python25' to system path.
- Install this registry key:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.5\InstallPath] @="d:\mozilla-build\python25"
- Install Twisted 8.1.0
- Install PyWin32 Extensions
Install Mercurial
- Download Mercurial and install to d:\mercurial.
- Append ';d:\mercurial' to the system path.
Version 9
Disable JIT Debugger
Per this MSDN entry:
Under the registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\AeDebug set "Auto"=0 rename the "Debugger" variable to "VDebugger" create a new string entry "Debugger" with an empty string Under the registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\DbgJITDebugLaunchSetting set value to 1 (dumps stack and exits)
Version 10
Fix registry setting
In version 9, we accidentally set
HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\DbgJITDebugLaunchSetting
to hexidecimal 10 instead of 1. Not clear if this will fix bug 453260.
Setup environment vars
- finish setting up environment vars by:
- logging into machine as Administrator
- in control panel, system, advanced tab, environment
- set MOZ_NO_RESET_PATH=1
Downgrade twisted and apply process group patch
To fix a long running saga with win32 machines not recovering when an executable dies, we downgrade Twisted to version 2.5.0 and patch _dumbwin32proc.py so that twisted (and hence buildbot) can kill process groups properly. As Administrator, do the following:
rm -rfv /d/mozilla-build/python25/Lib/site-packages/{twisted/,Twisted-8.0.1-py2.5.egg-info/,Twisted-8.1.0-py2.5.egg-info/,zope/} /d/mozilla-build/python25/scripts/twistd* wget https://twistedmatrix.com/Releases/Twisted/2.5/Twisted_NoDocs-2.5.0.win32-py2.5.exe ./Twisted_NoDocs-2.5.0.win32-py2.5.exe cd /d/mozilla-build/python25/Lib/site-packages/twisted/internet/ wget -O patch "https://twistedmatrix.com/trac/attachment/ticket/2726/_dumbwin32proc.patch?format=raw" patch -p8 < patch
Version 11
Setup extra disk
Obsolete, new setups have this drive setup as a Post Image step.
- finish disk setup by
- logging into machine as Administator
- right click on MyComputer, and select "Manage"
- click "DiskManagement" and select "Rescan"
- see unformatted partition. Assign it drive "E", and format it as FAT32 (not NTFS)
- save (and possibly reboot?).
setup ssh keys
- manually copy ssh keys from another staging / production VM and install into /c/Documents and Settings/cltbld/.ssh.
- also copy them to ~/.ssh in msys
Version 12
- Version of Ref Image is now in a txt file on the desktop for quick reference
Accept license for D:\\Utilities
The pslist.exe and pskill.exe are in D:\\Utilites and have been opened once, their licenses accepted.
Screen Resolution Set so Unittests will pass
- Run GPEDIT.MSC;
- Go to: Local Computer Policy/Computer Configuration/Administrative Templates/Windows Components/Terminal Services;
- Open the policy 'Limit maximum colour depth';
- Set this to 'Enabled and 24 bit'
- Verify that the screen resolution is set to: 1280 x 1024, 24bit color
Alternatively, import the following registry file:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services] "ColorDepth"=dword:00000004
Setup Slave Directory
cd /e mkdir -p builds/moz2_slave
Accept staging SSH keys
Manually use ssh to connect to the following machines, and manually accept "yes" the first connection
# staging $ ssh -i ~/.ssh/ffxbld_dsa staging-stage.build.mozilla.org
Version 13
Install VS9
As administrator:
- Start -> All Programs -> Accessories -> System Tools -> Disk Cleanup. Do a default clean of C:
- Mount the VS2008 DVD from the VI Client and do a full install of Visual Studio 2008 into D:\msvs9 and reboot.
- Checkout Windows Mobile MSI from mofo repo:
cvs -d:ext:cltbld@cvs.mozilla.org:/mofo co ref-platforms/win32/wm6-pro-sdk.msi cvs -d:ext:cltbld@cvs.mozilla.org:/mofo co ref-platforms/win32/wm6.1-pro-images.msi
- Install Windows Mobile 6 Pro SDK into D:\sdks\wm6 ... This will warn you about missing ActiveSync; that's fine.
- Install Windows Mobile 6.1 Pro Emulator Images to D:\sdks\wm6
Version 14
Java
This isn't an update per-se, just documenting an older install per a developer request.
java version "1.5.0_10" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03) Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)
Clean rebooting setup (VNC, autologin, audio driver)
Enable the VM to use the proper resolution and screendepth in the console session:
- Shutdown & poweroff the VM.
- Edit the .vmx file and add the following lines:
svga.maxHeight = 1024 svga.maxWidth = 1280 svga.vramSize = 16777216
- Start the VM back up again
Install RealVNC
- Checkout the installer from mofo:
cvs -d:ext:cltbld@cvs.mozilla.org:/mofo co -d vnc ref-platforms/win32/vnc-4_1_3-x86_win32.exe
- Click through the installer accepting all the defaults
- When the setup window pops up set a password and turn off the Java viewer
- Add a firewall exception
- Start Menu -> Control Panel -> Windows Firewall
- Exceptions -> Add Port -> TCP/5900
Install the virtual audio driver
- Checkout the VAC zip from mofo:
cvs -d:ext:cltbld@cvs.mozilla.org:/mofo co -d vnc ref-platforms/win32/vac409.zip
- Run the installer and accept the defaults
Setup cltbld autologin
- 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.
- Add autologin registry keys
wget -Ologon.reg --no-check-certificate https://bug428123.bugzilla.mozilla.org/attachment.cgi?id=367599
- Edit with the proper password, then import into the registry
Download Buildbot startup scripts
As cltbld, with an msys window open:
cd ~/Start\ Menu/Programs/Startup wget -Obuildbot.bat --no-check-certificate https://bugzilla.mozilla.org/attachment.cgi?id=362741 cd /d/mozilla-build wget -Ostart-buildbot.bat --no-check-certificate https://bugzilla.mozilla.org/attachment.cgi?id=362742
Reboot
- Reboot and login over VNC as cltbld
- Set screen resolution to 1280x1024x32
Version 15
Update Tar.exe
Replace tar.exe because of bug 383136cd / wget https://downloads.sourceforge.net/sourceforge/mingw/tar-1.19.90-MSYS-1.0.11-2-bin.tar.gz mv /bin/tar.exe /bin/tar2.exe tar2 zxf tar-1.19.90-MSYS-1.0.11-2-bin.tar.gz rm /bin/tar2.exe rm tar-1.19.90-MSYS-1.0.11-2-bin.tar.gz
Version 16
OPSI Client & Autoit
Enable File and Print Sharing
- Enable File & Print Sharing
- Control Panel -> Network Connections -> Local Area Connection -> Properties
- Enable "Client for Microsoft Networks" and "File and Print Sharing", click Close.
- Open firewall (only to opsi server)
- Control Panel -> Windows Firewall -> Exceptions
- Enable "File and Print Sharing", click "Edit"
- For each entry:
- Click "Change Scope"
- Select "Custom List"
- Enter the IP address of the production OPSI server (10.2.71.64)
OPSI Prep and Install
We need to flip a few options in Windows to enable certain packages to install without prompting.
- Do not prompt for unsigned drivers (needed for at least the windows mobile sdk)
- Control Panel -> System -> Hardware -> Driver Signing, choose "Ignore".
- Security Settings
- Start Menu -> Run -> \\10.2.71.64
- Use 'pcpatch' and the root password when prompted.
- Right click 'opt_pcbin' and select 'Mount as Network Drive'
- Browse to z:\install\preloginloader
- Double click 'opsi-prep.vbs'
- Double click 'service-setup.cmd', hit a key when prompted
- When prompted for a username and password use 'root' and the appropriate password.
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
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
- (as Administrator), run the installer, accept the defaults
Version 17
Java Upgrade
Java was upgraded to version 1.6.0_14 with this OPSI package
Version 18 - 20090817
SDKs for WinCE
The WinCE 5.0 ("Standard SDK") and Tegra 0.4.2 SDK (no link) were added using OPSI (bug 508177).
Version 19 - 20090820
MozillaBuild 1.4
The MozillaBuild (version 1.4) and profilevars packages were added using OPSI bug 505565. MozillaBuild was installed into /d/mozilla-build, overriding the existing install. Profilevars is a batch file that fixes the default profile in MozillaBuild to export some important variables. It can be found here
Version 20 - 20090930
Windows 7 SDK
The Windows 7 SDK was installed with the following components:
- Windows Headers and Libraries
- Windows Development Tools
- Application Verifier
- Debugging Tools for Windows
- Make sure "Debugging Tools for Windows" is installed to the following location:
- x86 %ProgramFiles%/Debugging Tools for Windows/
- x64 %ProgramFiles%/Debugging Tools for Windows (x64)/
- Make sure "Debugging Tools for Windows" is installed to the following location:
Hotfix 949009 was also installed.
Version 21 - 20091014
Disable CAD dialog
To work around a bug in OPSI we disabled the CAD dialog. This was done with the 'disablecad' OPSI package. This package modifies the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\disablecad = REG_DWORD:1
Version 22 - 20091203
Lower OPSI timeout
To prevent the screensaver from starting when OPSI hangs we lowered the OPSI connect timeout. This was done with this OPSI package, which sets the following registry key as follows:
HKEY_LOCAL_MACHINE\Software\opsi.org\pcptch\SecsUntilConnectionTimeout=REG_DWORD:0x1e
Disable "Shutdown Event Tracker"
The shutdown event tracker was disabled to avoid manual intervention after power outages and other improper shutdowns. This was done with this OPSI package, which sets the following registry key as follows:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Reliability\ShutdownReasonOn\REG_DWORD:0x0
Version 23 - 20091214
Tools repository checkout
We require a few scripts from the build/tools repository on the Windows slaves. This OPSI package was used to roll it out, which clones the repository to d:\tools
OPSI Hostkey Generator
We deployed a script and Scheduled Task that is used to update the OPSI hostkey on newly cloned slaves to avoid reinstalling OPSI entirely. This OPSI package did the installation, which is simply adding a scheduled task that runs on boot.
Buildbot TAC Generator
This OPSI package deployed an updated version of the buildbot.bat launcher to cltbld's 'Startup' folder which generates buildbot.tac files for new slaves. The launcher contains passwords so it is not in a public repo. Please ping someone from RelEng if you'd like a copy.
Version 24 - 20100124
Disable JIT debugger
Some unit tests can cause prompts to launch the Visual Studio debugger and Version 9 either didn't work or address this particular case. The prompts were blocking reboots, so this package was deployed to tweak the registry keys.
OPSI packages
Install SSH Server KypM v1.18
See [[1]]
Install DirectX SDK
See [[2]]
Install Mercurial 1.7.5
See [[3]] for details on the OPSI deployment.
For manual installation you can do this:
C:\mozilla-build\wget\wget.exe https://www.mercurial-scm.org/release/windows/mercurial-1.7.5-x86.msi msiexec /i C:\Users\cltbld\mercurial-1.7.5-x86.msi /passive /log hg_install.log INSTALLDIR=d:\mozilla-build\hg
Manual Setup Steps after VMImage
IT Stuff
Try slave firewall setup
Only for try slaves (try-win32-slaveN) We need to open up ports for the try slaves to access the OPSI server. For production slaves, the following ports need to be opened between the slave and production-opsi.b.m.o:
- tcp/udp 137-139
- tcp/445
- tcp/901
- tcp/4447
- icmp ping
For staging slaves, the same changes need to be made, but between the slave and staging-opsi.b.m.o.
Add drive E
- create an 80gb NTFS disk, attach to VM
- use VNC to login as Administrator on VM
- assign to drive letter E
- Volume name should be "BUILDS"
- manually right click on disk E, select properties and go to the general tab f the dialog. At the bottom of the dialog box, verify that "Compress Drive" and "Indexing service" are both unchecked (turned off).
- 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 https://technet.microsoft.com/en-us/library/cc785435.aspx.)
Releng stuff
The first two sections can and should be done ahead of the slaves being cloned.
Add slave(s) to configuration files
The following files need to be updated with new slaves (note that the production Buildbot config is explicitly not updated here, it will be done later):
- buildbot-configs/mozilla2-staging/config.py
- opsi-package-sources/production-slaves (or staging-slaves for slaves that will be in staging permanently).
Once your patches have landed, you need to update the following checkouts:
- On staging-master:
# as cltbld cd /builds/buildbot/user-configs/clean-configs hg pull && hg up cd ../../user-configs2/clean-configs hg pull && hg up
- On production-opsi (or staging-opsi if you updated staging-slaves):
# as cltbld cd opsi-package-sources hg pull && hg up
If the slave is re-using a hostname (eg, it has been recloned) you also need to remove it from the OPSI config on the server in order for it to get the correct hostkey. To do so, run the following command as root on the OPSI server:
# .uib.local for production, .build.mozilla.org for staging opsi-admin -d method deleteClient win32-slaveNN.uib.local
The slave will automatically be setup for OPSI and connect to staging-master.
Change OPSI server (staging slaves only)
If you are cloning or recloning a slave for staging the OPSI server needs to be adjusted in the registry. Open regedit and browse to HKEY_LOCAL_MACHINE\SOFTWARE\opsi.org\pcptch. Change the "opsiServiceURL" key to "https://10.2.71.216:4447".
You also might need to uninstall and re-install opsi if the slave is connecting to production-opsi.
In c:\program files\opsi.org\preloginloader\uninst run deinstall.cmd, slave will reboot then disconnect the mapped drive for production opsi, then do this:
- Start Menu -> Run -> \\10.2.71.216
- Use 'pcpatch' and the root password when prompted.
- Right click 'opt_pcbin' and select 'Mount as Network Drive'
- Browse to z:\install\preloginloader
- Double click 'opsi-prep.vbs'
- Double click 'service-setup.cmd', hit a key when prompted
- When prompted for a username and password use 'root' and the root password on the opsi server.
OPSI forces reboot on completion of install and then you can manage it through the opsi client.
Install Buildbot
Install Buildbot using the following batch script. You will need to find a way to get this batch script onto the system. (Aki sez: scp this to a linux slave, then
\mozilla-build\msys\bin\scp LINUX-SLAVE:buildbot.bat .
)
This installs buildbot into %mozillabuild%\buildbotve, using the version in the SET at the top. It gets Python packages from the puppet master specified in pkg_root. The final stanza will install the latest runslave.py at c:\runslave.py. You will need to enter the administrator password to do so.
@echo off SET version=0.8.4-pre-moz2 REM find mozillabuild SET mozillabuild=d:\mozilla-build SET mozilladrive=d: IF NOT EXIST %mozillabuild%\nul ( SET mozillabuild=c:\mozilla-build SET mozilladrive=c: ) REM find python - some machines have python26, some have python25 SET pythondir=%mozillabuild%\python25\ SET pythondll=python25.dll IF NOT EXIST %pythondir%\python.exe ( REM python26 isn't in a versioned directory for some reason SET pythondir=%mozillabuild%\python SET pythondll=python26.dll ) SET python=%pythondir%\python.exe SET pkg_root=http://production-puppet.build.mozilla.org/production/python-packages SET virtualenv=%mozillabuild%\buildbotve REM get set up rmdir /s /q %virtualenv% if ERRORLEVEL 1 exit /b 1 MKDIR %virtualenv% if ERRORLEVEL 1 exit /b 1 %mozilladrive% cd %virtualenv% REM On systems where Python is not installed systemwide, the python.exe in the virtualenv REM will not be able to find PYTHON*.DLL, so we copy it there "manually" MKDIR %virtualenv%\scripts if ERRORLEVEL 1 exit /b 1 COPY %pythondir%\%pythondll% %virtualenv%\scripts if ERRORLEVEL 1 exit /b 1 REM get the prerequisites for a virtualenv %mozillabuild%\wget\wget %pkg_root%/virtualenv.py if ERRORLEVEL 1 exit /b 1 %mozillabuild%\wget\wget %pkg_root%/pip-0.8.2.tar.gz if ERRORLEVEL 1 exit /b 1 %mozillabuild%\wget\wget %pkg_root%/distribute-0.6.14.tar.gz if ERRORLEVEL 1 exit /b 1 REM create the virtualenv %python% virtualenv.py --python=%python% --distribute %virtualenv% if ERRORLEVEL 1 exit /b 1 REM populate it .\scripts\pip install --no-deps --no-index --find-links=%pkg_root% zope.interface==3.6.1 if ERRORLEVEL 1 exit /b 1 .\scripts\pip install --no-deps --no-index --find-links=%pkg_root% buildbot-slave==%version% if ERRORLEVEL 1 exit /b 1 .\scripts\pip install --no-deps --no-index --find-links=%pkg_root% buildbot==%version% if ERRORLEVEL 1 exit /b 1 REM note that this version of Twisted has been modified to not require a REM compiler; see the puppet manifests for details .\scripts\pip install --no-deps --no-index --find-links=%pkg_root% twisted==10.2.0 if ERRORLEVEL 1 exit /b 1 .\scripts\pip install --no-deps --no-index --find-links=%pkg_root% simplejson==2.1.3 if ERRORLEVEL 1 exit /b 1 runas /user:administrator "%mozillabuild%\wget\wget -OC:\runslave.py https://hg.mozilla.org/build/puppet-manifests/raw-file/tip/modules/buildslave/files/runslave.py" if ERRORLEVEL 1 exit /b 1
Install pywin32
# ssh Administrator@slave d:\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