Merge lp:~fginther/vmbuilder/jenkins_kvm-artful-update into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm

Proposed by Francis Ginther
Status: Merged
Merged at revision: 793
Proposed branch: lp:~fginther/vmbuilder/jenkins_kvm-artful-update
Merge into: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm
Diff against target: 134 lines (+41/-46)
2 files modified
jenkins/CloudImages_Update_Builder.sh (+2/-2)
templates/img-update.tmpl (+39/-44)
To merge this branch: bzr merge lp:~fginther/vmbuilder/jenkins_kvm-artful-update
Reviewer Review Type Date Requested Status
Ubuntu on EC2 Pending
Review via email: mp+332056@code.launchpad.net

Commit message

Update CloudImages_Update_Builder.sh to use zesty images for artful and newer builds and drop installation of ubuntu-device-flash. Also remove references to precise in the builder script and template.

Description of the change

Update CloudImages_Update_Builder.sh to use zesty images for artful and newer builds and drop installation of ubuntu-device-flash. Also remove references to precise in the builder script and template.

To post a comment you must log in.
791. By Francis Ginther

Try with yakkety images.

792. By Francis Ginther

Use a zesty builder.

793. By Francis Ginther

Fix missing .

794. By Francis Ginther

Fix zfs install.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'jenkins/CloudImages_Update_Builder.sh'
--- jenkins/CloudImages_Update_Builder.sh 2016-08-03 10:33:46 +0000
+++ jenkins/CloudImages_Update_Builder.sh 2017-10-18 20:55:35 +0000
@@ -18,13 +18,13 @@
1818
19# Copy the target disk image19# Copy the target disk image
20case ${SUITE} in20case ${SUITE} in
21 precise|trusty|wily|xenial)21 trusty|xenial|zesty)
22 disk_orig="${SUITE}-server-cloudimg-${ARCH}-disk1.img"22 disk_orig="${SUITE}-server-cloudimg-${ARCH}-disk1.img"
23 builder_img=/srv/builder/images/trusty-builder-latest.img23 builder_img=/srv/builder/images/trusty-builder-latest.img
24 ;;24 ;;
25 *)25 *)
26 disk_orig="${SUITE}-server-cloudimg-${ARCH}.img"26 disk_orig="${SUITE}-server-cloudimg-${ARCH}.img"
27 builder_img=/srv/builder/images/yakkety-builder-latest.img27 builder_img=/srv/builder/images/zesty-builder-latest.img
28 ;;28 ;;
29esac29esac
3030
3131
=== modified file 'templates/img-update.tmpl'
--- templates/img-update.tmpl 2017-10-10 22:34:03 +0000
+++ templates/img-update.tmpl 2017-10-18 20:55:35 +0000
@@ -44,14 +44,6 @@
4444
45[ "${dev_uuid}" == "${odev_uuid}" ] && fail "device ID's are the same. This is bad"45[ "${dev_uuid}" == "${odev_uuid}" ] && fail "device ID's are the same. This is bad"
4646
47# dist_ge(dist1,dist2)
48# return true if dist1 is newer or the same as dist2
49dist_ge() { [[ "$1" > "$2" || "$1" == "$2" ]]; }
50
51# dist_ge(dist1,dist2)
52# return true if dist2 is older than or the same as dist2
53dist_le() { [[ "$1" < "$2" || "$1" == "$2" ]]; }
54
55operation_files() {47operation_files() {
5648
57 for i in $(seq 0 $((${#file_list[@]} - 1)))49 for i in $(seq 0 $((${#file_list[@]} - 1)))
@@ -210,28 +202,29 @@
210 dkms202 dkms
211 git)203 git)
212204
213if [ "${suite}" == "precise" ]; then205case "${suite}" in
214 pkgs+=(linux-source-3.2.0 qemu-kvm-extras qemu-kvm-extras-static)206 trusty|xenial) # not for yakkety onward
215else207 xchroot apt-add-repository -y ppa:snappy-dev/tools
216 case "${suite}" in208 xchroot apt-add-repository -y ppa:ubuntu-sdk-team/ppa
217 trusty|xenial) # not for yakkety onward209 ;;
218 xchroot apt-add-repository -y ppa:snappy-dev/tools210esac
219 xchroot apt-add-repository -y ppa:ubuntu-sdk-team/ppa211xchroot apt-add-repository -y multiverse
220 ;;212pkgs+=(qemu-user-static
221 esac213 qemu-user
222 xchroot apt-add-repository -y multiverse214 ubuntu-snappy-cli
223 pkgs+=(qemu-user-static215 python-openstackclient
224 qemu-user216 cloud-utils)
225 ubuntu-device-flash217case "${suite}" in
226 ubuntu-snappy-cli218 trusty|xenial)
227 python-openstackclient219 pkgs+=(ubuntu-core-security-utils)
228 cloud-utils)220 ;;
229 case "${suite}" in221esac
230 trusty|xenial)222# ubuntu-device-flash was dropped after zesty
231 pkgs+=(ubuntu-core-security-utils)223case "${suite}" in
232 ;;224 trusty|xenial|zesty)
233 esac225 pkgs+=(ubuntu-device-flash)
234fi226 ;;
227esac
235228
236# Installation of packages229# Installation of packages
237debug "Performing package operations"230debug "Performing package operations"
@@ -241,19 +234,21 @@
241debug "Package operations complete"234debug "Package operations complete"
242235
243# Install ZFS236# Install ZFS
244if dist_ge ${suite} xenial; then237case "${suite}" in
245 xchroot apt-get -y install zfsutils-linux238 trusty)
246239 debug "Installing ZFS"
247else240 xchroot apt-add-repository -y ppa:zfs-native/stable
248 debug "Installing ZFS"241 xchroot apt-get update
249 xchroot apt-add-repository -y ppa:zfs-native/stable242 xchroot apt-get -y install spl
250 xchroot apt-get update243 xchroot dpkg-reconfigure spl
251 xchroot apt-get -y install spl244 xchroot apt-get -y install ubuntu-zfs
252 xchroot dpkg-reconfigure spl245 xchroot dpkg-reconfigure dkms
253 xchroot apt-get -y install ubuntu-zfs246 debug "Installed ZFS"
254 xchroot dpkg-reconfigure dkms247 ;;
255 debug "Installed ZFS"248 *)
256fi249 xchroot apt-get -y install zfsutils-linux
250 ;;
251esac
257252
258# Modify boot settings253# Modify boot settings
259debug "Modifying in-image settings for builder"254debug "Modifying in-image settings for builder"
@@ -264,7 +259,7 @@
264xchroot update-initramfs -u -k all259xchroot update-initramfs -u -k all
265# On yakkety and later, reinstall grub-pc which is no longer in the base image260# On yakkety and later, reinstall grub-pc which is no longer in the base image
266case $suite in261case $suite in
267 precise|trusty|xenial)262 trusty|xenial)
268 xchroot dpkg-reconfigure grub-pc263 xchroot dpkg-reconfigure grub-pc
269 ;;264 ;;
270 *)265 *)

Subscribers

People subscribed via source and target branches