<> ||<>|| ## page was renamed from UbuntuEngineering/QA/sprints/QAAutomationSprintJun2011/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 {{{ wazn-upgrade runs upgrade tests /home/upgrade-tester 8 NORMAL 1 TEST_TIMEOUT 4800 }}} 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 [[attachment: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, "sudo upgrade-from-grub-legacy" , remove the old menu.list by running rm -f /boot/grub/menu.lst* and reboot at the end. (https://help.ubuntu.com/community/Grub2/Upgrading contains more information)