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

Proposed by Francis Ginther
Status: Merged
Merged at revision: 793
Proposed branch: lp:~fginther/vmbuilder/new-artful-builder
Merge into: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm
Diff against target: 139 lines (+46/-46)
2 files modified
jenkins/CloudImages_Update_Builder.sh (+7/-2)
templates/img-update.tmpl (+39/-44)
To merge this branch: bzr merge lp:~fginther/vmbuilder/new-artful-builder
Reviewer Review Type Date Requested Status
Dan Watkins (community) Approve
Philip Roche Approve
Chris Glass (community) Approve
Review via email: mp+332487@code.launchpad.net

Commit message

Update source image and package set for artful. Dropping packages that no longer exist.

Description of the change

Update source image and package set for artful. Dropping packages that no longer exist.

This was used to build a new artful builder on jerff [1] which was then used to build a 17.10 Oracle Compute image [2]

[1] - https://cloud-images-jenkins.canonical.com/job/Update_Builder_Image/91/
[2] - https://cloud-images-jenkins.canonical.com/job/CloudImages_SmallCPC_Base/4753/

To post a comment you must log in.
Revision history for this message
Dan Watkins (oddbloke) wrote :

Couple of inline comments, but broadly speaking I like this a lot.

review: Needs Fixing
794. By Francis Ginther

Restore proper builder setup for zesty and build anything newer with artful.

Revision history for this message
Dan Watkins (oddbloke) wrote :

One last comment inline.

review: Needs Fixing
Revision history for this message
Chris Glass (tribaal) wrote :

Looks good! nitpicks inline.

+1

review: Approve
795. By Francis Ginther

Use zesty to build zesty and unify indentation over the code being modified.

Revision history for this message
Philip Roche (philroche) wrote :

+1

review: Approve
Revision history for this message
Dan Watkins (oddbloke) :
review: Approve

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-26 19:37:10 +0000
@@ -18,13 +18,18 @@
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)
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 zesty)
26 # Zesty needs yakkety or newer due to ext4 tool changes
27 disk_orig="${SUITE}-server-cloudimg-${ARCH}.img"
28 builder_img=/srv/builder/images/zesty-builder-latest.img
29 ;;
25 *)30 *)
26 disk_orig="${SUITE}-server-cloudimg-${ARCH}.img"31 disk_orig="${SUITE}-server-cloudimg-${ARCH}.img"
27 builder_img=/srv/builder/images/yakkety-builder-latest.img32 builder_img=/srv/builder/images/artful-builder-latest.img
28 ;;33 ;;
29esac34esac
3035
3136
=== modified file 'templates/img-update.tmpl'
--- templates/img-update.tmpl 2017-10-10 22:34:03 +0000
+++ templates/img-update.tmpl 2017-10-26 19:37:10 +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