User:Bhearsum:Build/Buildserver ref image: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
mNo edit summary
m (wip)
Line 44: Line 44:
  Listen * 2401  
  Listen * 2401  
  Repos /cvsroot
  Repos /cvsroot
CvsArgs -u
Run these commands:
Run these commands:
  cvsd-buildroot /cvs
  cvsd-buildroot /cvs
  mkdir -p /cvs/var/lock
  mkdir -p /cvs/var/lock
  adduser cvsd
  adduser cvsd
== Install CVS ==
CVS must be patched to work in this setup.
wget http://ftp.gnu.org/non-gnu/cvs/source/stable/1.11.22/cvs-1.11.22.tar.bz2
wget http://people.mozilla.com/~bhearsum/Build/Misc/cvs.noreadlocks.patch
tar -jvxf cvs-1.11.22.tar.bz2
cd cvs-1.11.22/src
patch -p0 < ../../cvs.noreadlocks.patch
./configure --prefix=/cvs
make
make install


== Rsync cvs-mirror.m.o ==
== Rsync cvs-mirror.m.o ==
Line 66: Line 78:


If you want to continually update your mirror you should create a cron job to do so. Otherwise you can run the above script at any time to do it manually.
If you want to continually update your mirror you should create a cron job to do so. Otherwise you can run the above script at any time to do it manually.
== Create a buildbot master ==
mkdir -p /buildbot/master
chown -R buildbot /buildbot
su - buildbot
cd /buildbot/master
buildbot create-master .
mv Makefile.sample Makefile
master.cfg:

Revision as of 20:16, 28 June 2007

WIP

Buildserver Ref Image

This document describes how to create a "Build server" ref image. More info is in bug#385911.

Copy Linux Buildbot ref image

VM->Clone Next Next 'Create a full clone', Next Choose a location, Next Finish

Add a 10GB drive

VM->Settings Add Next Next Next 10GB, Next Choose location, Finish

Boot up the VM and 'mkdir /cvs'. Create a single partition on the new hard drive (/dev/sdb). mkfs -t ext3 -j /dev/sdb1 echo "/dev/sdb1 /cvs ext3 defaults 0 0" >> /etc/fstab mount -a

Install and setup CVSD

Install CVSD:

wget http://ch.tudelft.nl/~arthur/cvsd/cvsd-1.0.13.tar.gz
tar -zvxf cvsd-1.0.13.tar.gz
cd cvsd-1.0.13
./configure
make
make install

Setup CVSD:

mkdir /etc/cvsd
cp /usr/local/etc/cvsd/cvsd.conf /etc/cvsd
cp /usr/local/etc/init.d/cvsd /etc/init.d
chkconfig --add cvsd

Edit /etc/cvsd/cvsd.conf and change the following parameters:

RootJail /cvs
Listen * 2401 
Repos /cvsroot
CvsArgs -u

Run these commands:

cvsd-buildroot /cvs
mkdir -p /cvs/var/lock
adduser cvsd

Install CVS

CVS must be patched to work in this setup.

wget http://ftp.gnu.org/non-gnu/cvs/source/stable/1.11.22/cvs-1.11.22.tar.bz2
wget http://people.mozilla.com/~bhearsum/Build/Misc/cvs.noreadlocks.patch
tar -jvxf cvs-1.11.22.tar.bz2
cd cvs-1.11.22/src
patch -p0 < ../../cvs.noreadlocks.patch
./configure --prefix=/cvs
make
make install

Rsync cvs-mirror.m.o

These instructions taken from How to Create a CVS Mirror:

Create a directory for the repository

mkdir /cvs/cvsroot

Add that directory to your cvsd.conf

echo "/cvsroot" >> /etc/cvsd/cvsd.conf

Create an 'rsync-excludes' file to ignore history, users

echo "CVSROOT/passwd" > /cvs/etc/rsync-excludes
echo "CVSROOT/writers" >> /cvs/etc/rsync-excludes
echo "CVSROOT/history" >> /cvs/etc/rsync-excludes
echo "CVSROOT/history*" >> /cvs/etc/rsync-excludes

Copy this script that will perform an rsync of the Mozilla CVS

/etc/init.d/cvsd stop
rsync -q -az --delete --exclude-from=/cvs/etc/rsync-excludes cvs-mirror.mozilla.org::mozilla /cvs/cvsroot
/etc/init.d/cvsd start

If you want to continually update your mirror you should create a cron job to do so. Otherwise you can run the above script at any time to do it manually.

Create a buildbot master

mkdir -p /buildbot/master
chown -R buildbot /buildbot
su - buildbot
cd /buildbot/master
buildbot create-master .
mv Makefile.sample Makefile

master.cfg: