~fginther/vmbuilder/jenkins_kvm-ci-wa-all

« back to all changes in this revision

Viewing changes to templates/img-azure-18.10-addin.tmpl

  • Committer: Francis Ginther
  • Date: 2018-07-03 03:05:09 UTC
  • mfrom: (799.1.1 jenkins_kvm-add-azure-cc)
  • Revision ID: francis.ginther@canonical.com-20180703030509-a2dgsqu2oh76ke0p
Add a cosmic version of the Azure suite specific template files, img-azure-18.10-addin.tmpl.
[a=fginther][r=rcj,philroche]

MP: https://code.launchpad.net/~ubuntu-on-ec2/vmbuilder/jenkins_kvm-add-azure-cc/+merge/348835

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vi: ts=4 noexpandtab syntax=sh
 
2
# Insert the Cosmic (18.10) Config
 
3
CLOUD_IMG_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
 
4
cat << EOF > ${mp}/etc/default/grub.d/50-cloudimg-settings.cfg
 
5
# Windows Azure specific grub settings
 
6
${CLOUD_IMG_STR}
 
7
 
 
8
# Set the default commandline
 
9
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 earlyprintk=ttyS0 rootdelay=300"
 
10
 
 
11
# Set the grub console type
 
12
GRUB_TERMINAL=serial
 
13
 
 
14
# Set the serial command
 
15
GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"
 
16
 
 
17
# Set the recordfail timeout
 
18
GRUB_RECORDFAIL_TIMEOUT=0
 
19
 
 
20
# Do not wait on grub prompt
 
21
GRUB_TIMEOUT=0
 
22
EOF
 
23
 
 
24
# Add in the client keep alive
 
25
cat << EOF >> "${mp}/etc/ssh/sshd_config"
 
26
 
 
27
${CLOUD_IMG_STR}
 
28
ClientAliveInterval 120
 
29
EOF
 
30
 
 
31
# Add the configuration for Cloud-init
 
32
cat << EOF > "${mp}/etc/cloud/cloud.cfg.d/90-azure.cfg"
 
33
${CLOUD_IMG_STR}
 
34
system_info:
 
35
   package_mirrors:
 
36
     - arches: [i386, amd64]
 
37
       failsafe:
 
38
         primary: http://archive.ubuntu.com/ubuntu
 
39
         security: http://security.ubuntu.com/ubuntu
 
40
       search:
 
41
         primary:
 
42
           - http://azure.archive.ubuntu.com/ubuntu/
 
43
         security: []
 
44
     - arches: [armhf, armel, default]
 
45
       failsafe:
 
46
         primary: http://ports.ubuntu.com/ubuntu-ports
 
47
         security: http://ports.ubuntu.com/ubuntu-ports
 
48
 
 
49
EOF
 
50
 
 
51
# Frame buffer fix
 
52
cat << EOF >> "${mp}/etc/initramfs-tools/modules"
 
53
 
 
54
# Need for slow boot times due to framebuffer
 
55
hyperv_fb
 
56
EOF
 
57
 
 
58
xchroot update-initramfs -u -k all