Installation
This page is description of installation of build system on three machines:
lxdist-i386
,
lxdist-amd64
,
lxdist-ia64
.
Prerequisition
For purpose of build system separate partition should be prepared with capacity
~30GB
, mounted under
/build
.
Installation of necessary packages on all machines. Example for
lxdist-i386
:
[root@lxdist-i386 ~]# yum -y install createrepo
[root@lxdist-i386 ~]# yum -y install mock
[root@lxdist-i386 ~]# groupadd buider
[root@lxdist-i386 ~]# useradd -g builder -G wheel,mock -d /build/ -s /bin/bash builder
[root@lxdist-i386 ~]# mkdir -p /build/workspace
[root@lxdist-i386 ~]# mkdir -p /build/mock
[root@lxdist-i386 ~]# chown -R builder:builder /build
[root@lxdist-i386 ~]# rm -rf /var/lib/mock
[root@lxdist-i386 ~]# ln -s /build/mock /var/lib/mock
[root@lxdist-i386 ~]# passwd builder
Putting files to proper place
Now you can log in as builder:
[root@lxdist-i386 ~]# su - builder
[lxdist-i386] /build/ > cp /afs/cern.ch/project/linux/dev/newbuildsys/install.sh /build
[lxdist-i386] /build/ > ./install.sh
Script will create
/build/slcb
directory, and will copy there all neccessary files.
Preparation of enviroment
Now it is time to create chroot enviroments (there will be two builder instances):
[lxdist-i386] /build/slcb/ > cd /build/slcb/
[lxdist-i386] /build/slcb/ > ./mkchroot.sh slc-4-i386-core 01
[lxdist-i386] /build/slcb/ > ./mkchroot.sh slc-4-i386-core 02
Chroots in directory
/build/mock
will be created.
Installation off all packages in chroots (can take ~30min):
[lxdist-i386] /build/slcb/ > cd /build/slcb/
[lxdist-i386] /build/slcb/ > ./fullchroot.sh slc-4-i386-core 01 1
[lxdist-i386] /build/slcb/ > ./fullchroot.sh slc-4-i386-core 02 1
Server and builder configuration
Check files:
/build/slcb/lxdist-i386.conf
and
/build/slcb/lxdist-i386-1.conf
.
Starting builders...
Run first builder instance inside screen session..
[lxdist-i386] /build > screen -S one
[lxdist-i386] /build > /build/slcb/runbuilder-1
Ctrl-A Ctrl-D
Run second builder instance inside screen session..
[lxdist-i386] /build > screen -S two
[lxdist-i386] /build > /build/slcb/runbuilder-2
Ctrl-A Ctrl-D
In case of problems look into files
/build/slcb/logs/builder-*.log
Starting server...
Log in as
linbuild
user to
lxdist-ia64.cern.ch
machine and run server instance inside screen session..
[lxdist-ia64] /build/slcb > cd /build/slcb
[lxdist-ia64] /build/slcb > screen -S server
[lxdist-ia64] /build/slcb > /build/slcb/runserver
Ctrl-A Ctrl-D
In case of problems look into file
/build/slcb/logs/server.log
Starting other tasks...
Log in as
linbuild
user to
lxdist-ia64.cern.ch
machine. Check if there are some running acrontab jobs:
[lxdist-ia64] /build/slcb > cd /build/slcb
[lxdist-ia64] /build/slcb > acrontab -l
Add more jobs to acrontab:
[lxdist-ia64] /build/slcb > acrontab < /build/slcb/etc/acrontab.conf
This will start monitor scripts, status generation script, logrotate, and advisories update script:
[lxdist-ia64] /build/slcb > cat /build/slcb/etc/acrontab.conf
0,30 * * * * lxdist-ia64.cern.ch /build/slcb/server/monitor.py -c /build/slcb/monitor.conf >> /build/slcb/logs/monitor.log
15,45 * * * * lxdist-ia64.cern.ch /build/slcb/server/monitor.py -c /build/slcb/monitor-2.conf >> /build/slcb/logs/monitor-2.log
2,12,22,32,42,52 * * * * lxdist-ia64.cern.ch /build/slcb/server/status.py -c /build/slcb/status.conf --html -o /build/slcb/www/
3,13,23,33,43,53 * * * * lxdist-ia64.cern.ch /usr/sbin/logrotate -s /build/slcb/alogrotate.state /build/slcb/etc/alogrotate.conf
7 * * * * lxdist-ia64.cern.ch /build/aerrate/update_advirsories.sh
Monitor logs are also avalaible in directory
/build/slcb/logs/
Run some tests
Log in as
linbuild
user to
lxdist-ia64.cern.ch
machine. Use client script to check if all builders are ready...
[lxdist-ia64] /build > cd /build/slcb/slcb-client
[lxdist-ia64] /build/slcb/slcb-client > ./client.py list_builders
Builders:
------------------------------------------------------------------------------------------
lxdist-i386.cern.ch:30001 i386 i486 i586 i686 athlon noarch alive slc-3-i386-core slc-4-i386-core
lxdist-i386.cern.ch:30011 i386 i486 i586 i686 athlon noarch alive slc-3-i386-core slc-4-i386-core
lxdist-amd64.cern.ch:30001 x86_64 amd64 ia32e noarch alive slc-3-x86_64-core slc-4-x86_64-core
lxdist-amd64.cern.ch:30011 x86_64 amd64 ia32e noarch alive slc-3-x86_64-core slc-4-x86_64-core
lxdist-ia64.cern.ch:30001 ia64 noarch alive slc-4-ia64-core slc-3-ia64-core
lxdist-ia64.cern.ch:30011 ia64 noarch alive slc-4-ia64-core slc-3-ia64-core
Put some easy-to-build SRPM file into one of monitor incoming directories (specified in
/build/slcb/monitor.conf
file), wait some time, watching logs (
/build/slcb/logs/monitor.log
and
/build/slcb/logs/server.log
), and check if some output appeared in outcoming directory.
--
LeszekGrzanka - 08 Oct 2007