User:Callek/Refresh Master Steps
From MozillaWiki
- Make sure seabld exists, and is part of "wheel" group (/etc/groups)
- Make sure root password set properly
- Assume network is setup properly by IT.
- Assume sendmail is configured correctly
- Trust that /etc/ntp.conf points to a ntp server we can use.
- Not installing anything for ganglia or nagios
### LOCALLY scp ./* seabld@<machine>:~
### REMOTE su - # Set noatime mount -o remount -o noatime / mount -o remount -o noatime /builds mv /home/seabld/sudoers /etc/sudoers chgrp root /etc/sudoers chown root /etc/sudoers chmod 0440 /etc/sudoers mkdir /tools chgrp seabld /builds chown seabld /builds #Turn on NTPD /sbin/chkconfig ntpd on #Install GPG key for epel-release rpm --import http://download.fedora.redhat.com/pub/epel/RPM-GPG-KEY-EPEL-5 yum install /home/seabld/epel-release-5-4* # From Official Repo's yum install screen strace mysql-devel git gcc python26 \ python26-virtualenv sendmail-cf sendmail sed # Ensure sendmail is on /sbin/chkconfig sendmail on rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt yum install /home/seabld/mercurial-1.8.1-1.el5.rf.i386.rpm mkdir /tools/misc-python exit
####LOCALLY scp ./misc-python/* root@<machine>:/tools/misc-python/
### REMOTE cd /builds mkdir buildbot cd /builds/buildbot /usr/bin/hg clone -r seamonkey-production http://hg.mozilla.org/build/buildbot-configs # Queue mkdir /builds/buildbot/queue /usr/bin/python2.6 /tools/misc-python/virtualenv.py \ --python=/usr/bin/python2.6 --distribute /builds/buildbot/queue export PIP_DOWNLOAD_CACHE=/builds/buildbot/pip_cache /builds/buildbot/queue/bin/pip install --no-deps --no-index \ --find-links=http://people.mozilla.org/~dmitchell/ \ buildbot==0.8.4-pre-moz1 simplejson Twisted==10.1.0 \ zope.interface==3.6.1 mozillapulse==.4 carrot==0.10.7 \ amqplib==0.6.1 anyjson==0.3 pytz==2011d /usr/bin/hg clone http://hg.mozilla.org/users/Callek_gmail.com/tools/ \ /builds/buildbot/queue/tools cd /builds/buildbot/queue/tools /builds/buildbot/queue/bin/python setup.py develop
# Master itself cd /builds/buildbot mkdir master01 cd buildbot-configs /usr/bin/virtualenv-2.6 --distribute --no-site-packages \ -p /usr/bin/python2.6 /builds/buildbot/master01 /builds/buildbot/master01/bin/pip install --no-deps \ --find-links=http://people.mozilla.org/~dmitchell/ -r master-pip.txt ## Install It /usr/bin/hg clone -b production-0.8 \ http://hg.mozilla.org/build/buildbot /builds/buildbot/master01/buildbot (cd /builds/buildbot/master01/buildbot/master; \ /builds/buildbot/master01/bin/python setup.py develop install) /usr/bin/hg clone -b seamonkey-production \ http://hg.mozilla.org/build/buildbotcustom \ /builds/buildbot/master01/buildbotcustom /usr/bin/hg clone -b seamonkey-production \ http://hg.mozilla.org/build/buildbot-configs \ /builds/buildbot/master01/buildbot-configs /usr/bin/hg clone http://hg.mozilla.org/users/Callek_gmail.com/tools/ \ /builds/buildbot/master01/tools ln -sf /builds/buildbot/master01/buildbotcustom \ /builds/buildbot/master01/lib/python2.6/site-packages/buildbotcustom echo "/builds/buildbot/master01/tools/lib/python" > \ /builds/buildbot/master01/lib/python2.6/site-packages/build-tools-lib.pth ## Config It cd /builds/buildbot/master01/buildbot-configs; /builds/buildbot/master01/bin/buildbot create-master \ /builds/buildbot/master01/master cd /builds/buildbot/master01/master ## Setup Symlinks ln -s /builds/buildbot/master01/buildbot-configs/seamonkey/config.py \ /builds/buildbot/master01/master/config.py ln -s /builds/buildbot/master01/buildbot-configs/seamonkey/l10n-changesets-comm-beta \ /builds/buildbot/master01/master/l10n-changesets-comm-beta ln -s /builds/buildbot/master01/buildbot-configs/seamonkey/l10n-changesets-comm-release \ /builds/buildbot/master01/master/l10n-changesets-comm-release ln -s /builds/buildbot/master01/buildbot-configs/seamonkey/master-main.cfg \ /builds/buildbot/master01/master/master-main.cfg ln -s /builds/buildbot/master01/buildbot-configs/seamonkey/master.cfg \ /builds/buildbot/master01/master/master.cfg ln -s /builds/buildbot/master01/buildbot-configs/seamonkey/release-comm-1.9.1.py \ /builds/buildbot/master01/master/release-comm-1.9.1.py ln -s /builds/buildbot/master01/buildbot-configs/seamonkey/release-comm-beta.py \ /builds/buildbot/master01/master/release-comm-beta.py ln -s /builds/buildbot/master01/buildbot-configs/seamonkey/release-comm-release.py \ /builds/buildbot/master01/master/release-comm-release.py ln -s /builds/buildbot/master01/buildbot-configs/seamonkey/release_master.py \ /builds/buildbot/master01/master/release_master.py ln -s /builds/buildbot/master01/buildbot-configs/seamonkey/release_config.py \ /builds/buildbot/master01/master/release_config.py rm Makefile.sample master.cfg.sample mv ~/BuildSlaves.py /builds/buildbot/master01/master/BuildSlaves.py mv ~/passwords.py /builds/buildbot/master01/master/passwords.py cp /builds/buildbot/master01/buildbot-configs/Makefile.master \ /builds/buildbot/master01/Makefile cd /builds/buildbot/master01 sed -i 's!PWD=!PWD:=!' Makefile # Do PWD expansion early sed -i 's!HG=.*!HG=/usr/bin/hg!' Makefile # Fixup Hg loc cp /builds/buildbot/master01/master/passwords.py \ /builds/buildbot/queue/passwords.py # Install Crontab su - mv /home/seabld/master01.crontab /etc/cron.d/master01 chgrp root /etc/cron.d/master01 chown root /etc/cron.d/master01 chmod 644 /etc/cron.d/master01 mkdir /etc/default/buildbot.d chmod 755 /etc/default/buildbot.d mv /home/seabld/command_runner.initd /etc/init.d/command_runner chown root /etc/init.d/command_runner chgrp root /etc/init.d/command_runner chmod 755 /etc/init.d/command_runner mv /home/seabld/pulse_publisher.initd /etc/init.d/pulse_publisher chown root /etc/init.d/pulse_publisher chgrp root /etc/init.d/pulse_publisher chmod 755 /etc/init.d/pulse_publisher mv /home/seabld/run_command_runner.sh \ /builds/buildbot/queue/run_command_runner.sh chmod 755 /builds/buildbot/queue/run_command_runner.sh chown root /builds/buildbot/queue/run_command_runner.sh chgrp root /builds/buildbot/queue/run_command_runner.sh mv /home/seabld/run_pulse_publisher.sh \ /builds/buildbot/queue/run_pulse_publisher.sh chmod 755 /builds/buildbot/queue/run_pulse_publisher.sh chown root /builds/buildbot/queue/run_pulse_publisher.sh chgrp root /builds/buildbot/queue/run_pulse_publisher.sh mv /home/seabld/buildbot.initd /etc/init.d/buildbot chgrp root /etc/init.d/buildbot chown root /etc/init.d/buildbot chmod 755 /etc/init.d/buildbot
echo "/builds/buildbot/master01" > /etc/default/buildbot.d/master01
/sbin/chkconfig command_runner on /sbin/chkconfig pulse_publisher on /sbin/chkconfig buildbot on
MANUALLY TRANSFER ssh CONFIGs/KEYS
LOOKS like that should be it.