UpgradeTestingSetup

Pre-requistes

The server hosting this project requires the following features:

  • kvm enabled - the testing framework using hardware virtualisation features; these need to be enabled (normally done in the BIOS setup screens and be done by anyone via the kvm console)
  • http access to archive.ubuntu.com and changelogs.ubuntu.com
  • bzr access to code.launchpad.net is a bonus (but not strictly needed)
  • A local user to run the tests. For example add a user named "upgrade-tester". Grant him sudo privileges without password to /usr/bin/ubuntu-vm-builder. Add the line below to /etc/sudoers

upgrade-tester ALL = NOPASSWD: /usr/bin/ubuntu-vm-builder

and add membership to kvm and libvirtd (install ubuntu-vm-builder first)

$ sudo adduser upgrade-tester kvm
$ sudo adduser upgrade-tester libvirtd

Installation

Install the required packages

sudo apt-get install bzr ubuntu-vm-builder

Then, as user "upgrade-tester", get the source

bzr branch lp:auto-upgrade-testing

Edit ~/auto-upgrade-testing/share/profiles/default.cfg.d/default.cfg and set:

;[DEFAULT]
AutoUpgradeTesterBaseDir=/home/upgrade-tester

[NonInteractive]
UseUpgraderFromBzr=false

If you're using an apt-cacher apt proxy then set these additional configuration parameters in default.cfg

Proxy=http://nnn.nnn.nnn.nnn:3142/

Replace 'nnn.nnn.nnn.nnn:3142' by the address:port of your apt proxy

and create the basedir:

mkdir auto-upgrade-tester

Then run:

cd ~/update-manager/AutoUpgradeTester
bin/auto-upgrade-tester share/profiles/server

This will prompt once for sudo to create the base image (as defined by the setting BaseImage in section KVM of the profile) with ubuntu-vm-builder.

The auto-upgrade-tester has been ported to python3, as a consequence on Precise you'll want to call the interpreter explicitely:

python bin/auto-upgrade-tester share/profiles/server

Then all the profiles can be tested using:

bin/run_and_publish_tests.sh

or alternatively "auto-upgrader-tester --auto" if jenkins is doing the result collection.

Jenkins Setup

Optionally, setup a new node on phad named "wazn-upgrade" with the following configuration

    <slave>
      <name>wazn-upgrade</name>
      <description>runs upgrade tests</description>
      <remoteFS>/home/upgrade-tester</remoteFS>
      <numExecutors>8</numExecutors>
      <mode>NORMAL</mode>
      <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
      <launcher class="hudson.slaves.JNLPLauncher"/>
      <label>upgrade-test amd64 i386</label>
      <nodeProperties>
        <hudson.slaves.EnvironmentVariablesNodeProperty>
          <envVars serialization="custom">
            <unserializable-parents/>
            <tree-map>
              <default>
                <comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../../../../../slave/nodeProperties/hudson.slaves.EnvironmentVariablesNodeProperty/envVars/tree-map/default/comparator"/>
              </default>
              <int>1</int>
              <string>TEST_TIMEOUT</string>
              <string>4800</string>
            </tree-map>
          </envVars>
        </hudson.slaves.EnvironmentVariablesNodeProperty>
      </nodeProperties>
    </slave>

and start jenkins slave on wazn if it is not already running:

./auto-upgrade-tester-jenkins-slave -n wazn-upgrade http://nnn.nnn.nnn.nnn:8080/&

Replace nnn.nnn.nnn.nnn:8080 by the host:port of the jenkins master.

Job configuration example for Quantal Desktop Upgrade from Precise quantal-upgrade-precise-desktop.config.xml

Notes

  • On precise, you'll need vmbuilder and debootstrap from the highest release you want to bootstrap. For example to upgrade from Raring to Saucy you'll need to bootstrap raring, so you'll need debootstrap and vmbuilder from Raring.
  • Due to a change in the way the kernel detects its environment vmbuilder needs the argument --addpkg=linux-image-generic
  • In order to have the correct version of grub installed in the base images to make sure that the images boot with the latest kernel after the upgrades, run,

QATeam/UpgradeTestingSetup (last edited 2013-07-15 16:58:14 by 02dcf20c)