ReleaseEngineering/worker configuration/2008
Contents
- 1 Overview
- 2 AMI Creation
- 3 Puppet Configuration =
- 4 Manual Configuration/Tweaks
- 5 EC2 Service Userdata Scripts
- 6 OLD PRE 2015-11 Configuration Notes (Incomplete)
- 6.1 Overview
- 6.2 Windows 2008 Build Slave Configuration Managed by Microsoft Deployment Workbench Configuration
- 6.3 Starting Operating System
- 6.4 Base Configuration Capture (MDT Task Sequence ID SW2008_BASE_001)
- 6.5 Configuration
- 6.6 Data Center Deployment Configuration (MDT Task Sequence SW2008_DPLY_001)
- 6.7 Configuration
- 6.8 Cloud Deploy Configuration Capture (MDT Task Sequence ID W2008_CLD_002)
- 6.9 Configuration
Overview
As of 2015-11-24 the configuration of 2008 buildbot slaves consists of 4 parts. The initial manual build of the AWS AMI, application of the 2008 PuppetAgain catalog, manual configuration changes, and lastly the EC2 userdata scripts.
Manual configuration changes will eventually be part of PuppetAgain, and as well as portion of the manual AMI creation. These were currently left out do to the priority of getting buildbot builds working in AWS over the individual automation and management pieces.
AMI Creation
Starting Operating System
Due to a deep level issue affecting hg clone and hg bundle times we move away from using a custom AMI built of a Microsoft Deployment Workbench image and starting with an AWS vanilla AMI: Windows_Server-2008-R2_SP1-English-64Bit-Base-2015.09.09 (ami-31620c54).
Installed Applications
- Visual Studio 2010
- ISO: SW_DVD5_NTRL_Visual_Studio_2010SP1_MultiLang_FPP_VL_MLF_X17-40329
- Resulting Version: 10.0.30319.1 RTMRel
- ISO: SW_DVD5_NTRL_Visual_Studio_2010SP1_MultiLang_FPP_VL_MLF_X17-40329
- Visual Studio 2013
- ISO: en_visual_studio_premium_2013_with_update_3_x86_dvd_4836351
- Resulting Version:
- ISO: en_visual_studio_premium_2013_with_update_3_x86_dvd_4836351
- Puppet Agent
- Including a method to pull Puppet authentication certs and keys (most recently used puppetized temp vbs script)
- Include a copy of the puppet.conf in C:\ProgramData\PuppetLabs\puppet\etc
- Based off of : http://hg.mozilla.org/build/puppet/file/tip/modules/puppet/templates/puppet.conf.erb
- This is now handled by the Userdata scripts
- Other Applications that can be moved into PuppetAgain management
- Direct X SDK
- Windows 8 SDK
Other Configuration
- Rename administrator account to Root
- Can be moved into the EC2 userdata scripts pre-Puppet run
- Roll back patching level to 2011-06
- ADD script
- Set os_version variable "reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v os_version /t REG_SZ /d 2008"
Puppet Configuration =
Manual Configuration/Tweaks
(These tweaks have been ported into Puppet. Keeping the list here for historical reference.)
Mercurial Tweaks
- File copies into C:\mozilla-build\hg
- Bundleclone.py
- A newer version of the caperm.pem is needed
- Current configuration uses caperm.pem stripped from Mercurial-3.5.1
- Lines added to the mercurial.ini
- Under [extensions]
- bundleclone=C:\mozilla-build\hg\bundleclone.py
- share =
- Under [bundleclone]
- prefers = ec2region=us-west-2, stream=revlogv1
- This line should be ultimately be managed with the EC2 userdata scripts to determine which location for specific AWS region
- prefers = ec2region=us-west-2, stream=revlogv1
- Under [ui]
- username = Mozilla Release Engineering <release@mozilla.com>
- traceback = True
- Under [hostfingerprints]
- hg.mozilla.org = af:27:b9:34:47:4e:e5:98:01:f6:83:2b:51:c9:aa:d8:df:fb:1a:27
- Under [extensions]
Runner Configuration
- Add support for purgebuild runner task
- purgebuild.py https://hg.mozilla.org/build/tools/raw-file/c210728881d4/buildfarm/maintenance/purge_builds.py
- Copy to C:\opt\runner
- Add 1-purge_builds.bat to C:\opt\runner\tasks.d
- Content: "%MOZILLABUILD%\msys\bin\bash" --login -c "'%BUILDBOT_PATH%\Scripts\python' "/C/opt/runner/purge_builds.py" --not "/c/users/.cltbld/.ssh:999d" --not info --not 'rel-*:10d' --not 'tb-rel-*:10d' -s 35 /C/builds/moz2_slave
- purgebuild.py https://hg.mozilla.org/build/tools/raw-file/c210728881d4/buildfarm/maintenance/purge_builds.py
Buildbot Tweaks
- File copies were needed specifically to have sendchange work. Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1175701
- Copy from C:\mozilla-build\buildbotve\Lib\site-packages to C:\mozilla-build\python27\Lib\site-packages:
- buildbot module
- twisted module
- zope module
- Twisted-10.2.0-py2.7.egg-info
- zope.interface-3.6.1-py2.7-nspkg.pth
- Copy from C:\mozilla-build\buildbotve\Lib\site-packages to C:\mozilla-build\python27\Lib\site-packages:
Services
- Disable Windows Defender Service
- Disable Puppet Service
Other File Changes
- SSH keys, API keys, and API tokens need to be copied over to C:\builds and C:\users\cltbld\.ssh
- This should happen through the Puppet run. However, currently it is not happening in AWS.
- Cltbld permissions added to:
- C:\builds\crash-stats-api.token
- C:\builds\google-oath-api.key
- Add AWS credentials to C:\Users\cltbld\.boto
- Update yasm.exe to 1.3 in C:\mozilla-build\
- Rename the exe from yasm-1.3.0-win64.exe to yasm.exe
- Source: http://yasm.tortall.net/Download.html
EC2 Service Userdata Scripts
OLD PRE 2015-11 Configuration Notes (Incomplete)
Overview
The building of the 2008 builder slave image uses both the Microsoft Deployment Workbench (MDT) and Puppet configuration software. In the case of AWS instances the Amazon EC2 service is also utilized.
The initial steps is building a base image in MDT. The base image is comprised of large applications that will seldom change, Microsoft SDKs, applications that may aid in deployment, and Windows Server Update Service (WSUS) components.
The second portion of this differs according to datacenter deployment or cloud deployment. Differences are documented below.However, in both cases the image has Puppet installed, and the image is prep to be ran against the PuppetAgain. As well a configurations that Puppet needs to run or at the time made more sense to be done through MDT.
General MDT documentation: https://mana.mozilla.org/wiki/display/SYSADMIN/Microsoft+Deployment+Toolkit+2012+Update+1+General+Documentation
Windows 2008 Build Slave Configuration Managed by Microsoft Deployment Workbench Configuration
Starting Operating System
The process is begun with Windows Server 2008 R2 SP1 iso (en_windows_server_2008_r2_with_sp1_vl_build_x64_dvd_617403.iso). The iso file is mounted, in our case, using Virtual CloneDrive. Once the iso file is mounted it is then imported into the MDT.
Base Configuration Capture (MDT Task Sequence ID SW2008_BASE_001)
The modification here is found under tasks sequence steps -> State Restore -> Custom Tasks -> Mozilla Custom.
Applications
Microsoft Visual Studio 2010
- This application install varies away from the typical MDT install. The files needed to be extracted from the iso and have the F# portion removed. The extracted files are then copied over local, and the installation command is ran
Microsoft Visual Studio 2013 Update 3
- A reboot needs to occur between the installation of 2010 and 2013
Microsoft Windows Windows 8 SDK
Microsoft Windows Windows Direct X SDK
Microsoft Net Framework 3.5
Configuration
WSUS Updates
- Various registry settings are needed
Data Center Deployment Configuration (MDT Task Sequence SW2008_DPLY_001)
The modification here is found under tasks sequence steps -> State Restore -> Custom Tasks -> Mozilla Custom.
Applications
Puppet
- Package installation
- This installs version 3.4.3
- Future updates will be managed through Puppet
- Kill the Puppet service
- In order to control when Puppet runs
- Set Puppet Registry bits
- "Type"=dword:00000010
- "Start"=dword:00000003
- "ErrorControl"=dword:00000001
- Copy over WGET from "Z:\Applications\WGET" to "C:\Windows\System32"
- Needed to run the Puppetize vbs to obtain certs
- Copy over puppet.conf from Z:\Applications\Puppet Puppet\puppet.conf" to "C:\programdata\Puppetlabs\puppet\etc\"
- A copy of pupept.conf is needed prior to the Pupeptize vbs being ran
- After this initial copy the file is managed by Puppet
- Copy over the Pupeptize vbs from "Z:\Scripts\" to "C:\ProgramData\Puppetlabs\puppet\var\"
- Run Puppetize vbs
- Run Puppet
Configuration
Rename Administrator to root
- Copy over security template, root.inf, from "Z:\Files\root"
- Apply template cmd /c secedit /configure /db %temp%\temp.sdb /cfg C:\root.inf
- Set registry so that root may continue to auto-login during task sequence execution
Set a os_version "reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v os_version /t REG_SZ /d 2008"
- For Puppet use. Currently there is no facter fact to differentiate between Windows OSes
- For Puppet use. Currently there is no facter fact to differentiate between Windows OSes
Disable Server Manager Window "reg add HKCU\Software\Microsoft\ServerManager /t REG_DWORD /v DoNotOpenServerManagerAtLogon /d 1 /f
- Because the registry setting is HKey current user it is quite difficult to implement through Puppet
- Needs to be done after reboot post Puppet run
Cloud Deploy Configuration Capture (MDT Task Sequence ID W2008_CLD_002)
The modification here is found under tasks sequence steps -> State Restore -> Custom Tasks -> Mozilla Custom.
Puppet
- Package installation
- This installs version 3.4.3
- Future updates will be managed through Puppet
- Kill the Puppet service
- In order to control when Puppet runs
- Copy over WGET from "Z:\Applications\WGET" to "C:\Windows\System32"
- Needed to run the Puppetize vbs to obtain certs
- Copy over puppet.conf from Z:\Applications\Puppet Puppet\puppet.conf" to "C:\programdata\Puppetlabs\puppet\etc\"
- A copy of pupept.conf is needed prior to the Pupeptize vbs being ran
- After this initial copy the file is managed by Puppet
- Copy over the Pupeptize vbs from "Z:\Scripts\" to "C:\ProgramData\Puppetlabs\puppet\var\"
- Run Puppetize vbs
- Run Puppet
EC2 config service
- Installation ""Z:\Applications\AWS EC2config service\Ec2Install.exe" /passive /norestart2config service\"
Citrix PV
- Copy from "Z:\Applications\Citrix-Win_PV" to "c:\Citrix-Win"
- "C:\Citrix-Win\upgrade.bat" to install
Configuration
Rename Administrator to root
- Copy over security template, root.inf, from "Z:\Files\root"
- Apply template cmd /c secedit /configure /db %temp%\temp.sdb /cfg C:\root.inf
- Set registry so that root may continue to auto-login during task sequence execution
Set a os_version "reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v os_version /t REG_SZ /d 2008"
- For Puppet use. Currently there is no facter fact to differentiate between Windows OSes
- For Puppet use. Currently there is no facter fact to differentiate between Windows OSes