diff options
author | Andrew McDermott <andrew.mcdermott@linaro.org> | 2014-12-17 10:22:48 +0000 |
---|---|---|
committer | Andrew McDermott <andrew.mcdermott@linaro.org> | 2014-12-17 14:33:30 +0000 |
commit | 1b4f1e21d133ba74ca221a3783a93c47841259de (patch) | |
tree | be13250ea961f5ec2fbc32e7bbdd3c980b7bbf01 | |
parent | 86c60adbcfefd8e8033f523c018f5e00cef5c8b5 (diff) |
General cleanup
-rw-r--r-- | add-openstack-deps.yaml | 12 | ||||
-rwxr-xr-x | build | 8 | ||||
-rw-r--r-- | expand-image.yaml | 35 | ||||
-rwxr-xr-x | in-chroot-stage1.sh | 10 | ||||
-rwxr-xr-x | in-chroot-stage2.sh | 20 | ||||
-rw-r--r-- | job.yaml | 14 | ||||
-rw-r--r-- | lavatest.yaml | 35 | ||||
-rwxr-xr-x | stage2-helper.sh | 5 |
8 files changed, 19 insertions, 120 deletions
diff --git a/add-openstack-deps.yaml b/add-openstack-deps.yaml index 3a4d0e2..d14c0fe 100644 --- a/add-openstack-deps.yaml +++ b/add-openstack-deps.yaml @@ -12,18 +12,22 @@ metadata: run: steps: + - 'resolvconf -u' + - 'dhclient -r; sleep 2; dhclient -v; cat /etc/resolv.conf' - 'pwd' - "set -x" - "set +e" - - "id" - 'set -a; DEBIAN_FRONTEND=noninteractive; DEBCONF_NONINTERACTIVE_SEEN=true; LC_ALL=C; LANGUAGE=C; LANG=C; set +a' - - 'apt-get update' - - 'apt-get -y install wget coreutils qemu-utils' + - 'apt-get -qq -y update' + - 'apt-get -qq -y install wget coreutils qemu-utils' - 'image=$(basename $LAVA_CLOUD_IMG_URL)' - 'wget --progress=dot -e dotbytes=10M -O $image $LAVA_CLOUD_IMG_URL' - 'qemu-img convert -O raw $image cloud.raw' - './chroot-img cloud.raw stage1-helper.sh /in-chroot-stage1.sh' - 'qemu-img convert -f raw -c -O qcow2 cloud.raw ${image}.new' + - 'echo "You should now copy $PWD/${image}.new off this device"' + - 'sleep $LAVA_SLEEP_FOR_ACCESS' params: - LAVA_CLOUD_IMG_URL: 'http://people.linaro.org/~andrew.mcdermott/lava/images/trusty-server-cloudimg-arm64-disk1.img'
\ No newline at end of file + LAVA_CLOUD_IMG_URL: 'http://people.linaro.org/~andrew.mcdermott/lava/images/trusty-server-cloudimg-arm64-disk1.img' + LAVA_SLEEP_FOR_ACCESS: 3600
\ No newline at end of file @@ -1,8 +0,0 @@ -#!/bin/bash - -set -xeu - -: ${LAVA_CLOUD_IMG_URL:=http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-arm64-disk1.img} - -sudo apt-get update -sudo apt-get install -y git wget cloud-utils libguestfs-tools diff --git a/expand-image.yaml b/expand-image.yaml deleted file mode 100644 index 59ab10c..0000000 --- a/expand-image.yaml +++ /dev/null @@ -1,35 +0,0 @@ -metadata: - name: build-bigger-cloudimg - maintainer: - - Andrew McDermott <andrew.mcdermott@linaro.org> - format: "Lava-Test-Shell Test Definition 1.0" - version: 1.0 - description: "Expand UEC image size and underlying partition" - devices: - - kvm - environment: - - lava-test-shell - -run: - steps: - - "set -x" - - "id" - - 'DEBIAN_FRONTEND=noninteractive apt-get update -o Dpkg::Options::="--force-confnew" --force-yes' - - 'DEBIAN_FRONTEND=noninteractive apt-get install --yes wget libguestfs-tools coreutils' - - "image=$(basename $LAVA_CLOUD_IMG_URL)" - - "new_image=new.img" - - "rm -f ${image}*" - - "wget --progress=dot -e dotbytes=10M $LAVA_CLOUD_IMG_URL" - - "mv $image ${image}.dist" - - "qemu-img convert -O qcow2 ${image}.dist ${image}" - - "rm -f ${new_image}" - - "truncate -s $SIZE ${new_image}" - - "virt-resize --expand /dev/sda1 ${image} ${new_image}" - - "qemu-img convert -c -f raw -O qcow2 ${new_image} ${image}" - - "mv ${image} $(basename $image .img)-$SIZE.img" - - "sleep $LAVA_SLEEP_FOR_ACCESS" - -params: - SIZE: '3G' - LAVA_SLEEP_FOR_ACCESS: 3600 - LAVA_CLOUD_IMG_URL: 'http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-arm64-disk1.img' diff --git a/in-chroot-stage1.sh b/in-chroot-stage1.sh index c9360dd..c20b8dc 100755 --- a/in-chroot-stage1.sh +++ b/in-chroot-stage1.sh @@ -13,8 +13,8 @@ do done apt-get update -apt-get install --yes git u-boot-tools xfsprogs -apt-get install --yes qemu-system python-libvirt libvirt-bin +apt-get install -qq --yes git u-boot-tools xfsprogs +apt-get install -qq --yes qemu-system python-libvirt libvirt-bin ### Devstack git clone --depth=1 http://git.linaro.org/leg/openstack/lava-openstack.git @@ -26,7 +26,7 @@ FORCE_PREREQ=1 ./devstack/tools/install_pip.sh FORCE_PREREQ=1 ./devstack/tools/install_prereqs.sh if [ -e /info.txt ]; then grep '^pip' /info.txt | awk -F\| '{print $2}' | xargs pip install - grep '^pkg' /info.txt | awk -F\| '{print $2}' | xargs apt-get install -y + grep '^pkg' /info.txt | awk -F\| '{print $2}' | xargs apt-get -qq -y install fi pip install -U unittest2 @@ -34,6 +34,10 @@ pip install -U unittest2 git clone --depth=1 https://git.openstack.org/stackforge/rally pip install -r rally/requirements.txt +apt-get -qq -y update +apt-get -qq -y upgrade +apt-get -qq -y dist-upgrade + set +e pkill memcached sleep 5 diff --git a/in-chroot-stage2.sh b/in-chroot-stage2.sh deleted file mode 100755 index a9d9cfa..0000000 --- a/in-chroot-stage2.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -xeu - -cp /sources.list /etc/apt - -for i in /usr/bin/apt* -do - rm -f /usr/local/bin/$(basename $i) - ln -s /usr/bin/eatmydata /usr/local/bin/$(basename $i) -done - -sed -i -e '/^rally/d' /pip.after - -apt-get update -apt-get install -y python-pip build-essential -apt-get install -y libxml2-dev libxslt1-dev python-lxml libssl-dev libffi-dev python-dev - -pip install -r /pip.after -apt-get clean @@ -51,18 +51,14 @@ actions: username: ubuntu password_prompt: Password password: password - # The sleep here is pretty mysterious, but without it, on the - # *second* boot into the installed image, the call to sudo asks - # for a password (some kind of race with cloud init?) I haven't - # bracketed to find the length of sleep that is required; 60 - # works and 3 doesn't. - login_commands: ['sleep 60; sudo -s'] + login_commands: ['sudo -s'] - &boot-sata command: boot_linaro_image parameters: boot_cmds: - 'setenv script_addr_r 0x4004000000' + - 'setenv sata 0x0C' - 'scsi init' - 'ext4load scsi 0 ${script_addr_r} boot/boot.scr' - 'source ${script_addr_r}' @@ -70,8 +66,6 @@ actions: - command: lava_test_shell parameters: testdef_repos: - - git-repo: git://frobware.com/net/spicy/home/aim/repos/linaro/leg/openstack/lava-deploy-cloudimg.git - testdef: 'hacking-session.yaml' - parameters: - LAVA_SLEEP_DURATION: 28000 + - git-repo: http://git.linaro.org/git-ro/leg/openstack/lava-devstack-cloudimg.git + testdef: 'add-openstack-deps.yaml' timeout: 28000 diff --git a/lavatest.yaml b/lavatest.yaml deleted file mode 100644 index 12a0924..0000000 --- a/lavatest.yaml +++ /dev/null @@ -1,35 +0,0 @@ -metadata: - name: build-bigger-cloudimg - maintainer: - - Andrew McDermott <andrew.mcdermott@linaro.org> - format: "Lava-Test-Shell Test Definition 1.0" - version: 1.0 - description: "Expand UEC image" - devices: - - kvm mustang - environment: - - lava-test-shell - -run: - steps: - - "set -x" - - "id" - - 'DEBIAN_FRONTEND=noninteractive apt-get update -o Dpkg::Options::="--force-confnew" --force-yes' - - 'DEBIAN_FRONTEND=noninteractive apt-get install --yes wget libguestfs-tools coreutils' - - "image=$(basename $LAVA_CLOUD_IMG_URL)" - - "new_image=new.img" - - "rm -f ${image}*" - - "wget --progress=dot -e dotbytes=10M $LAVA_CLOUD_IMG_URL" - - "mv $image ${image}.dist" - - "qemu-img convert -O qcow2 ${image}.dist ${image}" - - "rm -f ${new_image}" - - "truncate -s $SIZE ${new_image}" - - "virt-resize --expand /dev/sda1 ${image} ${new_image}" - - "qemu-img convert -c -f raw -O qcow2 ${new_image} ${image}" - - "mv ${image} $(basename $image .img)-$SIZE.img" - - "sleep $LAVA_SLEEP_FOR_ACCESS" - -params: - SIZE: '3G' - LAVA_SLEEP_FOR_ACCESS: 3600 - LAVA_CLOUD_IMG_URL: 'http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-arm64-disk1.img' diff --git a/stage2-helper.sh b/stage2-helper.sh deleted file mode 100755 index 08bb7f9..0000000 --- a/stage2-helper.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -if [ "$1" = "in" ]; then - cp in-chroot-stage2.sh /mnt -fi |