Merge lp:~codyshepherd/vmbuilder/jenkins_kvm into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm

Proposed by Cody Shepherd
Status: Merged
Merged at revision: 833
Proposed branch: lp:~codyshepherd/vmbuilder/jenkins_kvm
Merge into: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm
Diff against target: 83 lines (+69/-1)
2 files modified
templates/img-azure-19.04-addin.tmpl (+1/-1)
templates/img-azure-19.10-addin.tmpl (+68/-0)
To merge this branch: bzr merge lp:~codyshepherd/vmbuilder/jenkins_kvm
Reviewer Review Type Date Requested Status
Tobias Koch (community) Approve
David Krauser (community) Approve
Review via email: mp+368352@code.launchpad.net

Commit message

Add azure template for Eoan.

Description of the change

Add azure template for Eoan. This should fix failing archive tests.

To post a comment you must log in.
831. By Cody Shepherd

Really adding the template this time.

Revision history for this message
Pat Viafore (patviafore) :
832. By Cody Shepherd

Fixing suite labeling in comments

Revision history for this message
David Krauser (davidkrauser) :
review: Needs Information
833. By Cody Shepherd

Adding CLOUD_IMG_STR to mirror Alan hook

Revision history for this message
Cody Shepherd (codyshepherd) :
Revision history for this message
David Krauser (davidkrauser) :
review: Approve
Revision history for this message
Tobias Koch (tobijk) wrote :

Thanks a lot for figuring this out!

review: Approve
Revision history for this message
Steve Langasek (vorlon) wrote :

comment inline

Revision history for this message
Steve Langasek (vorlon) wrote :

(Or maybe not comment inline, what the hell, lp? Here's the comment.)

Revision history for this message
Cody Shepherd (codyshepherd) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'templates/img-azure-19.04-addin.tmpl'
2--- templates/img-azure-19.04-addin.tmpl 2019-04-24 13:12:06 +0000
3+++ templates/img-azure-19.04-addin.tmpl 2019-06-04 19:50:51 +0000
4@@ -1,5 +1,5 @@
5 # vi: ts=4 noexpandtab syntax=sh
6-# Insert the Cosmic (18.10) Config
7+# Insert the Disco (19.04) Config
8 CLOUD_IMG_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
9 cat << EOF > ${mp}/etc/default/grub.d/50-cloudimg-settings.cfg
10 # Windows Azure specific grub settings
11
12=== added file 'templates/img-azure-19.10-addin.tmpl'
13--- templates/img-azure-19.10-addin.tmpl 1970-01-01 00:00:00 +0000
14+++ templates/img-azure-19.10-addin.tmpl 2019-06-04 19:50:51 +0000
15@@ -0,0 +1,68 @@
16+# vi: ts=4 noexpandtab syntax=sh
17+# Insert the Eoan (19.10) Config
18+CLOUD_IMG_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
19+cat << EOF > ${mp}/etc/default/grub.d/50-cloudimg-settings.cfg
20+# Windows Azure specific grub settings
21+${CLOUD_IMG_STR}
22+
23+# Set the default commandline
24+GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 earlyprintk=ttyS0"
25+
26+# Set the grub console type
27+GRUB_TERMINAL=serial
28+
29+# Set the serial command
30+GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"
31+
32+# Set the recordfail timeout
33+GRUB_RECORDFAIL_TIMEOUT=0
34+
35+# Do not wait on grub prompt
36+GRUB_TIMEOUT=0
37+EOF
38+
39+# Add in the client keep alive
40+cat << EOF >> "${mp}/etc/ssh/sshd_config"
41+
42+${CLOUD_IMG_STR}
43+ClientAliveInterval 120
44+EOF
45+
46+# Add the configuration for Cloud-init
47+cat << EOF > "${mp}/etc/cloud/cloud.cfg.d/90-azure.cfg"
48+${CLOUD_IMG_STR}
49+system_info:
50+ package_mirrors:
51+ - arches: [i386, amd64]
52+ failsafe:
53+ primary: http://archive.ubuntu.com/ubuntu
54+ security: http://security.ubuntu.com/ubuntu
55+ search:
56+ primary:
57+ - http://azure.archive.ubuntu.com/ubuntu/
58+ security: []
59+ - arches: [armhf, armel, default]
60+ failsafe:
61+ primary: http://ports.ubuntu.com/ubuntu-ports
62+ security: http://ports.ubuntu.com/ubuntu-ports
63+
64+EOF
65+
66+# Apply a workaround for adding multiple NICs (SF Case #222480)
67+# This clears cloud-init's persistent network object, forcing network
68+# rediscovery on each boot (which correctly finds NICs added after VM creation)
69+mkdir -p "${mp}/lib/systemd/system/cloud-init-local.service.d"
70+cat << EOF > "${mp}/lib/systemd/system/cloud-init-local.service.d/50-azure-clear-persistent-obj-pkl.conf"
71+[Service]
72+ExecStartPre=-/bin/sh -xc 'if [ -e /var/lib/cloud/instance/obj.pkl ]; then echo "cleaning persistent cloud-init object"; rm /var/lib/cloud/instance/obj.pkl; fi; exit 0'
73+EOF
74+
75+# Frame buffer fix
76+cat << EOF >> "${mp}/etc/initramfs-tools/modules"
77+
78+${CLOUD_IMG_STR}
79+# Need for slow boot times due to framebuffer
80+hyperv_fb
81+EOF
82+
83+xchroot update-initramfs -u -k all

Subscribers

People subscribed via source and target branches