ReferencePlatforms/Test/Win7 64-bit: Difference between revisions

Line 93: Line 93:


= Buildbot Startup / Post-clone automation =
= Buildbot Startup / Post-clone automation =
=== Install Buildbot ===
Install Buildbot using the following batch script.  You will need to find a way to get this batch script onto the system.  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.  Note that runas /administrator doesn't work in W7, so you'll need to use VNC to install runslave.py (below)
<pre><nowiki>
@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
</nowiki></pre>
You will need to do this with administrator privs.  The only way to get these privs is to right-click "Command Prompt" on the start menu, and select "Run as Administrator".  Then use 'wget' to download the file.
<pre>
REM REMEMBER: "Run as Administrator"
wget -O c:\runslave.py http://hg.mozilla.org/build/puppet-manifests/raw-file/tip/modules/buildslave/files/runslave.py
dir C:\runslave.py
</pre>
The Task Scheduler is used to start Buildbot on boot. To enable it, run the following in a cmd window:
The Task Scheduler is used to start Buildbot on boot. To enable it, run the following in a cmd window:
  cd c:\users\cltbld\desktop
  cd c:\users\cltbld\desktop
canmove, Confirmed users
1,394

edits