ReleaseEngineering/Upgrading Buildbot: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with "= Structure = Mozilla's copy of Buildbot is at http://hg.mozilla.org/build/buildbot. There are two branches in this repository - ''upstream'' and ''default''. The former is ba...")
 
(→‎Staging a New Master: notes about buildbotconfig prereqs)
Line 33: Line 33:
   cd master/
   cd master/
   python setup.py install
   python setup.py install
At the momemnt, you'll also need to install some prereqs for buildbotconfig using ''easy_install'' (see {{bug|608296}}):
* pycrypto
* pyasn1
* argparse


Back in your staging directory, edit the Makefile to point it at the new version:
Back in your staging directory, edit the Makefile to point it at the new version:

Revision as of 16:18, 9 November 2010

Structure

Mozilla's copy of Buildbot is at http://hg.mozilla.org/build/buildbot. There are two branches in this repository - upstream and default. The former is basically a copy of the Buildbot source from git, while the latter is the locally patched version.

If you have a look at the revision graph, you'll see that upstream gets updated with each new buildbot release, then merged into default.

Upgrading Process

Get a copy of upstream Buildbot from a tag, as a tarball. The easiest way is to go to the 'downloads' page on github and download the appropriate tarball. You can also make a clone and use git archive.

In a checkout of build/buildbot,

  • switch to the upstream branch,
  • rm -rf everything,
  • untar the tarball, and
  • use hg addremove to process any added or removed files.

Commit with a message like "Imported Buildbot-0.8.2 source", then tag with e.g., BUILDBOT_0_8_2.

Switch to the default branch and use hg merge to merge the changes. Resolve any conflicts (bearing in mind that they may be significant, rather than merely textual).

IMPORTANT: edit master/buildbot/VERSION and slave/buildslave/VERSION to reflect the new version -- Buildbot's usual tactic of using git describe to determine the version doesn't work with hg.

Commit your updates to default. That's it - now it's time to test!

Staging a New Master

On a staging machine,

  • clone your hg repo into /tmp or somewhere convenient
  • create a new virtualenv in /tools:
 /tools/python-2.6.5/bin/virtualenv /tools/buildbot-0.8.2
  • activate it
 source /tools/buildbot-0.8.2/bin/activate
  • install the buildbot (master) package
 cd master/
 python setup.py install

At the momemnt, you'll also need to install some prereqs for buildbotconfig using easy_install (see bug 608296):

* pycrypto
* pyasn1
* argparse

Back in your staging directory, edit the Makefile to point it at the new version:

 BUILDBOT=/tools/buildbot-0.8.2/bin/buildbot

that's it - make restart and check the /about URI to make sure it upgraded (and that you remembered to change VERSION). You will probably need to run buildbot upgrade-master to upgrade the database first, but the buildmaster will tell you that.