Merge lp:~zulcss/vmbuilder/vmbuilder-jaunty-ec2 into lp:vmbuilder/trunk

Proposed by Chuck Short
Status: Needs review
Proposed branch: lp:~zulcss/vmbuilder/vmbuilder-jaunty-ec2
Merge into: lp:vmbuilder/trunk
Diff against target: None lines
To merge this branch: bzr merge lp:~zulcss/vmbuilder/vmbuilder-jaunty-ec2
Reviewer Review Type Date Requested Status
Soren Hansen Needs Fixing
Ubuntu Virtualisation team Pending
Review via email: mp+6208@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Soren Hansen (soren) wrote :
Download full text (28.4 KiB)

On Wed, May 06, 2009 at 11:29:59AM -0000, Soren Hansen wrote:
> You have been requested to review the proposed merge of lp:~zulcss/vmbuilder/vmbuilder-jaunty-ec2 into lp:vmbuilder.

> === added file 'VMBuilder/plugins/ec2/README'
> --- VMBuilder/plugins/ec2/README 1970-01-01 00:00:00 +0000
> +++ VMBuilder/plugins/ec2/README 2009-05-04 13:58:48 +0000
> @@ -0,0 +1,14 @@
> +This is the command to use to create an ec2 image with vmbuilder:
> +
> +Note: you must have ec2-ami-tools installed.

Yes, ec2-ami-tools are required, but it seems odd to put that in the
README. Lots of other packages are needed, and they (like ec2-ami-tools)
are listed as dependencies of the package. If you care about people who
use vmbuilder outside the context of Ubuntu, you could add a preflight
check to make sure the ami tools are installed, and bail out if not.

> +
> +sudo vmbuilder xen ubuntu --suite={hardy,intrepid} --ec2 \
> + --ec2-cert=<place where your ec2 cert is> \
> + --ec2-key=<place where your ec2 key is> \
> + --ec2-access-key=<your aws access key> \
> + --ec2-secret-key=<your aws secret key> \
> + --ec2-user=<your aws # number> \
> + --ec2-bucket=<your ec2 bucket name> \
> + --ec2-prefix=<image prefix> \
> + --ec2-version="Description of your EC2 image" \
> + --debug
>
> === modified file 'VMBuilder/plugins/ec2/__init__.py'
> --- VMBuilder/plugins/ec2/__init__.py 2008-11-28 11:18:43 +0000
> +++ VMBuilder/plugins/ec2/__init__.py 2009-05-01 19:24:18 +0000
> @@ -36,6 +36,7 @@
> group.add_option('--ec2-secret-key', metavar='SECRET_ID', help='AWS secret access key.')
> group.add_option('--ec2-kernel','--ec2-aki', metavar='AKI', help='EC2 AKI (kernel) to use.')
> group.add_option('--ec2-ramdisk','--ec2-ari', metavar='ARI', help='EC2 ARI (ramdisk) to use.')
> + group.add_option('--ec2-version',metavar='EC2_VER',help='Specifity the EC2 image version.')

Please use spaces instead of tabs. Note: This is far from the only occurrence of this problem.

> self.vm.register_setting_group(group)
>
> def preflight_check(self):
> @@ -59,17 +60,45 @@
>
> if not self.vm.ec2_kernel:
> logging.debug('No ec2-aki choosen setting to default. Use --ec2-kernel to change this')
> - if self.vm.arch == 'amd64':
> - self.vm.ec2_kernel = 'aki-d314f0ba'
> - else:
> - self.vm.ec2_kernel = 'aki-af14f0c6'
> + if self.vm.suite == 'hardy':
> + if self.vm.arch == 'amd64':
> + self.vm.ec2_kernel = 'aki-a27493cb'
> + else:
> + self.vm.ec2_kernel = 'aki-a17493c8'
> + elif self.vm.suite == 'intrepid':
> + if self.vm.arch == 'amd64':
> + self.vm.ec2_kernel = 'aki-20c12649'
> + else:
> + self.vm.ec2_kernel = 'aki-20c12649'
> + elif self.vm.suite == 'jaunty':
> + if self.vm.arch == 'amd64':
> + self.vm.ec2_kernel = 'aki-d653b4bf'
> + else:
> + s...

Revision history for this message
Soren Hansen (soren) wrote :

I just noticed I forgot the "tag" my review or whatever you want to call it, so doing so now.

review: Needs Fixing

Unmerged revisions

335. By Chuck Short

Add readme to show how to run vmbuilder for ec2

334. By Chuck Short

Add missing default for landscape-client

333. By Chuck Short

Fix jaunty

332. By Chuck Short

Update aki/ari for jaunty

331. By Chuck Short

juanty needs hvc0

330. By Chuck Short

Added warning about out dated AKI and ARI

329. By Chuck Short

Update AKI and ARI for hardy again *sigh*

328. By Chuck Short

Add landscape-client support for ec2

327. By Chuck Short

Clean up intrepid

326. By Chuck Short

Update i386 AKI and ARI for hardy

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'VMBuilder/plugins/ec2/README'
--- VMBuilder/plugins/ec2/README 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/README 2009-05-04 13:58:48 +0000
@@ -0,0 +1,14 @@
1This is the command to use to create an ec2 image with vmbuilder:
2
3Note: you must have ec2-ami-tools installed.
4
5sudo vmbuilder xen ubuntu --suite={hardy,intrepid} --ec2 \
6 --ec2-cert=<place where your ec2 cert is> \
7 --ec2-key=<place where your ec2 key is> \
8 --ec2-access-key=<your aws access key> \
9 --ec2-secret-key=<your aws secret key> \
10 --ec2-user=<your aws # number> \
11 --ec2-bucket=<your ec2 bucket name> \
12 --ec2-prefix=<image prefix> \
13 --ec2-version="Description of your EC2 image" \
14 --debug
015
=== modified file 'VMBuilder/plugins/ec2/__init__.py'
--- VMBuilder/plugins/ec2/__init__.py 2008-11-28 11:18:43 +0000
+++ VMBuilder/plugins/ec2/__init__.py 2009-05-01 19:24:18 +0000
@@ -36,6 +36,7 @@
36 group.add_option('--ec2-secret-key', metavar='SECRET_ID', help='AWS secret access key.')36 group.add_option('--ec2-secret-key', metavar='SECRET_ID', help='AWS secret access key.')
37 group.add_option('--ec2-kernel','--ec2-aki', metavar='AKI', help='EC2 AKI (kernel) to use.')37 group.add_option('--ec2-kernel','--ec2-aki', metavar='AKI', help='EC2 AKI (kernel) to use.')
38 group.add_option('--ec2-ramdisk','--ec2-ari', metavar='ARI', help='EC2 ARI (ramdisk) to use.')38 group.add_option('--ec2-ramdisk','--ec2-ari', metavar='ARI', help='EC2 ARI (ramdisk) to use.')
39 group.add_option('--ec2-version',metavar='EC2_VER',help='Specifity the EC2 image version.')
39 self.vm.register_setting_group(group)40 self.vm.register_setting_group(group)
4041
41 def preflight_check(self):42 def preflight_check(self):
@@ -59,17 +60,45 @@
5960
60 if not self.vm.ec2_kernel:61 if not self.vm.ec2_kernel:
61 logging.debug('No ec2-aki choosen setting to default. Use --ec2-kernel to change this')62 logging.debug('No ec2-aki choosen setting to default. Use --ec2-kernel to change this')
62 if self.vm.arch == 'amd64':63 if self.vm.suite == 'hardy':
63 self.vm.ec2_kernel = 'aki-d314f0ba'64 if self.vm.arch == 'amd64':
64 else:65 self.vm.ec2_kernel = 'aki-a27493cb'
65 self.vm.ec2_kernel = 'aki-af14f0c6'66 else:
67 self.vm.ec2_kernel = 'aki-a17493c8'
68 elif self.vm.suite == 'intrepid':
69 if self.vm.arch == 'amd64':
70 self.vm.ec2_kernel = 'aki-20c12649'
71 else:
72 self.vm.ec2_kernel = 'aki-20c12649'
73 elif self.vm.suite == 'jaunty':
74 if self.vm.arch == 'amd64':
75 self.vm.ec2_kernel = 'aki-d653b4bf'
76 else:
77 self.vm.ec2_kernel = 'aki-c553b4ac'
78
79 logging.info('%s - AKI to be used.' %(self.vm.ec2_kernel))
80 logging.info('WARNING! You might be using an outdated AKI. Please check xxx')
6681
67 if not self.vm.ec2_ramdisk:82 if not self.vm.ec2_ramdisk:
68 logging.debug('No ec2-ari choosen setting to default. Use --ec2-ramdisk to change this.')83 logging.debug('No ec2-ari choosen setting to default. Use --ec2-ramdisk to change this.')
69 if self.vm.arch == 'amd64':84 if self.vm.suite == 'hardy':
70 self.vm.ec2_ramdisk = 'ari-d014f0b9'85 if self.vm.arch == 'amd64':
71 else:86 self.vm.ec2_ramdisk = 'ari-b87493d1'
72 self.vm.ec2_ramdisk = 'ari-ac14f0c5'87 else:
88 self.vm.ec2_ramdisk = 'ari-ae7493c7'
89 elif self.vm.suite == 'intrepid':
90 if self.vm.arch == 'amd64':
91 self.vm.ec2_ramdisk = 'ari-0ac12663'
92 else:
93 self.vm.ec2_ramdisk = 'ari-21c12648'
94 elif self.vm.suite == 'jaunty':
95 if self.vm.arch == 'amd64':
96 self.vm.ec2_ramdisk = 'ari-d753b4be'
97 else:
98 self.vm.ec2_ramdisk = 'ari-c253b4ab'
99
100 logging .info('%s - ARI to be used.'%(self.vm.ec2_ramdisk))
101 logging.info('WARNING! You might be using an outdated AKI. Please check xxx')
73102
74 if not self.vm.ec2_bucket:103 if not self.vm.ec2_bucket:
75 raise VMBuilderUserError('When building for EC2 you must provide an S3 bucket to hold the AMI')104 raise VMBuilderUserError('When building for EC2 you must provide an S3 bucket to hold the AMI')
@@ -80,29 +109,28 @@
80 if not self.vm.ec2_secret_key:109 if not self.vm.ec2_secret_key:
81 raise VMBuilderUserError('When building for EC2 you must provide your AWS secret access key.')110 raise VMBuilderUserError('When building for EC2 you must provide your AWS secret access key.')
82111
83112 logging.info('Installing common software')
84 if not self.vm.addpkg:113 self.install_common()
85 self.vm.addpkg = []114 if self.vm.suite == 'hardy':
86115 self.install_hardy()
87 self.vm.addpkg += ['openssh-server']116 elif self.vm.suite == 'intrepid':
88 self.vm.addpkg += ['ec2-init']117 self.install_intrepid()
89 self.vm.addpkg += ['openssh-server']118 elif self.vm.suite == 'jaunty':
90 self.vm.addpkg += ['ec2-modules']119 self.install_jaunty()
91 self.vm.addpkg += ['server^']
92 self.vm.addpkg += ['standard^']
93
94 if not self.vm.ppa:
95 self.vm.ppa = []
96
97 self.vm.ppa += ['ubuntu-ec2']
98120
99 def post_install(self):121 def post_install(self):
100 if not self.vm.ec2:122 if not self.vm.ec2:
101 return123 return
102124
103 logging.info("Running ec2 postinstall")125 logging.info("Running ec2 postinstall")
104 self.install_from_template('/etc/event.d/xvc0', 'upstart')126 logging.info("Running common post install")
105 self.run_in_target('passwd', '-l', self.vm.user)127 if self.vm.suite == 'hardy':
128 self.postinstall_hardy()
129 elif self.vm.suite == 'intrepid':
130 self.postinstall_intrepid()
131 elif self.vm.suite == 'jaunty':
132 self.postinstall_jaunty()
133 self.postinstall_common()
106134
107 def deploy(self):135 def deploy(self):
108 if not self.vm.ec2:136 if not self.vm.ec2:
@@ -121,4 +149,112 @@
121149
122 return True150 return True
123151
152 def install_common(self):
153 if not self.vm.ec2:
154 return False
155
156 if not self.vm.addpkg:
157 self.vm.addpkg = []
158
159 logging.info('Installing common software.')
160 self.vm.addpkg += ['openssh-server',
161 'ec2-init',
162 'standard^',
163 'ec2-ami-tools',
164 'update-motd',
165 'curl',
166 'screen',
167 'screen-profiles']
168
169 if not self.vm.ppa:
170 self.vm.ppa = []
171
172 self.vm.ppa += ['ubuntu-on-ec2']
173
174 def install_hardy(self):
175 if not self.vm.ec2:
176 return False
177
178 logging.info('Installing software for hardy.')
179 self.vm.addpkg += ['ruby',
180 'libc6-xen',
181 'libopenssl-ruby']
182
183
184 def postinstall_hardy(self):
185 if not self.vm.ec2:
186 return False
187
188 logging.info('Running post-install for hardy')
189 # work around for libc6/xen bug in hardy.
190 self.install_from_template('/etc/ld.so.conf.d/libc6-xen.conf', 'xen-ld-so-conf')
191 self.run_in_target('apt-get', 'remove', '-y', 'libc6-i686')
192
193 self.install_from_template('/etc/update-motd.d/51_update-motd', '51_update-motd-hardy')
194 self.install_from_template('/etc/event.d/xvc0', 'xvc0')
195 self.run_in_target('update-rc.d', '-f', 'hwclockfirst.sh', 'remove')
196
197 def install_intrepid(self):
198 if not self.vm.ec2:
199 return False
200
201 logging.info('Installing software for intrepid')
202 self.vm.addpkg += ['ec2-modules',
203 'ruby',
204 'libopenssl-ruby',
205 'server^',
206 'policykit',
207 'landscape-common',
208 'landscape-client']
209
210 def postinstall_intrepid(self):
211 if not self.vm.ec2:
212 return False
213
214 logging.info('Running post-install for intrepid')
215 self.install_from_template('/etc/update-motd.d/51_update-motd', '51_update-motd-intrepid')
216 self.install_from_template('/etc/default/landscape-client', 'landscape_client')
217
218 def install_jaunty(self):
219 if not self.vm.ec2:
220 return False
221
222 logging.info('Installing software for jaunty')
223 self.vm.addpkg += ['ec2-modules',
224 'ruby1.8',
225 'server^',
226 'libopenssl-ruby1.8',
227 'landscape-common',
228 'landscape-client']
229
230 def postinstall_jaunty(self):
231 if not self.vm.ec2:
232 return False
233
234 logging.info('Running post-install for jaunty')
235 self.install_from_template('/etc/update-motd.d/51_update-motd', '51_update-motd-intrepid')
236 self.install_from_template('/etc/default/landscape-client', 'landscape_client')
237 self.install_from_template('/etc/event.d/hvc0', 'hvc0')
238
239 def postinstall_common(self):
240 if not self.vm.ec2:
241 return False
242
243 logging.info('Running common post-install')
244 self.install_from_template('/etc/ssh/sshd_config', 'sshd_config')
245 self.run_in_target('chpasswd', '-e', stdin='ubuntu:!\n')
246 # this makes my skin crawl
247 self.install_from_template('/etc/sudoers', 'sudoers')
248 # this doesnt
249 self.run_in_target('chmod', '755', '/etc/update-motd.d/51_update-motd')
250 self.install_from_template('/etc/ec2_version', 'ec2_version', { 'version' : self.vm.ec2_version })
251
252 self.run_in_target('rm', '-f', '/etc/localtime')
253 self.run_in_target('ln', '-s', '/usr/share/zoneinfo/UTC', '/etc/localtime')
254
255 self.run_in_target('usermod', '-u', '135', 'ubuntu')
256 self.run_in_target('chown', '-R', 'ubuntu', '/home/ubuntu')
257
258 self.run_in_target('update-rc.d', '-f', 'hwclock.sh', 'remove')
259
124register_plugin(EC2)260register_plugin(EC2)
125261
=== added file 'VMBuilder/plugins/ec2/templates/51_update-motd-hardy.tmpl'
--- VMBuilder/plugins/ec2/templates/51_update-motd-hardy.tmpl 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/templates/51_update-motd-hardy.tmpl 2009-03-24 16:33:47 +0000
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3echo "---------------------------------------------------------------------"
4echo "At the moment, only the core of the system is installed. To tune the "
5echo "system to your needs, you can choose to install one or more "
6echo "predefined collections of software by running the following "
7echo "command: "
8echo " "
9echo " sudo tasksel "
10echo "---------------------------------------------------------------------"
011
=== added file 'VMBuilder/plugins/ec2/templates/51_update-motd-intrepid.tmpl'
--- VMBuilder/plugins/ec2/templates/51_update-motd-intrepid.tmpl 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/templates/51_update-motd-intrepid.tmpl 2009-03-24 16:33:47 +0000
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3echo "---------------------------------------------------------------------"
4echo "At the moment, only the core of the system is installed. To tune the "
5echo "system to your needs, you can choose to install one or more "
6echo "predefined collections of software by running the following "
7echo "command: "
8echo " "
9echo " sudo tasksel --section server "
10echo "---------------------------------------------------------------------"
011
=== added file 'VMBuilder/plugins/ec2/templates/51_update-motd-jaunty.tmpl'
--- VMBuilder/plugins/ec2/templates/51_update-motd-jaunty.tmpl 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/templates/51_update-motd-jaunty.tmpl 2009-03-24 16:33:47 +0000
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3echo "---------------------------------------------------------------------"
4echo "At the moment, only the core of the system is installed. To tune the "
5echo "system to your needs, you can choose to install one or more "
6echo "predefined collections of software by running the following "
7echo "command: "
8echo " "
9echo " sudo tasksel --section server "
10echo "---------------------------------------------------------------------"
011
=== added file 'VMBuilder/plugins/ec2/templates/ec2_version.tmpl'
--- VMBuilder/plugins/ec2/templates/ec2_version.tmpl 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/templates/ec2_version.tmpl 2009-03-24 16:33:47 +0000
@@ -0,0 +1,1 @@
1$version
02
=== added file 'VMBuilder/plugins/ec2/templates/hvc0.tmpl'
--- VMBuilder/plugins/ec2/templates/hvc0.tmpl 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/templates/hvc0.tmpl 2009-03-26 17:13:31 +0000
@@ -0,0 +1,16 @@
1# hvc0 - getty
2#
3# This service maintains a getty on tty1 from the point the system is
4# started until it is shut down again.
5
6start on stopped rc2
7start on stopped rc3
8start on stopped rc4
9start on stopped rc5
10
11stop on runlevel 0
12stop on runlevel 1
13stop on runlevel 6
14
15respawn
16exec /sbin/getty 38400 hvc0
017
=== added file 'VMBuilder/plugins/ec2/templates/landscape_client.tmpl'
--- VMBuilder/plugins/ec2/templates/landscape_client.tmpl 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/templates/landscape_client.tmpl 2009-04-07 12:51:57 +0000
@@ -0,0 +1,1 @@
1CLOUD=1
02
=== added file 'VMBuilder/plugins/ec2/templates/sshd_config.tmpl'
--- VMBuilder/plugins/ec2/templates/sshd_config.tmpl 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/templates/sshd_config.tmpl 2009-03-24 16:33:47 +0000
@@ -0,0 +1,77 @@
1# Package generated configuration file
2# See the sshd(8) manpage for details
3
4# What ports, IPs and protocols we listen for
5Port 22
6# Use these options to restrict which interfaces/protocols sshd will bind to
7#ListenAddress ::
8#ListenAddress 0.0.0.0
9Protocol 2
10# HostKeys for protocol version 2
11HostKey /etc/ssh/ssh_host_rsa_key
12HostKey /etc/ssh/ssh_host_dsa_key
13#Privilege Separation is turned on for security
14UsePrivilegeSeparation yes
15
16# Lifetime and size of ephemeral version 1 server key
17KeyRegenerationInterval 3600
18ServerKeyBits 768
19
20# Logging
21SyslogFacility AUTH
22LogLevel INFO
23
24# Authentication:
25LoginGraceTime 120
26PermitRootLogin yes
27StrictModes yes
28
29RSAAuthentication yes
30PubkeyAuthentication yes
31#AuthorizedKeysFile %h/.ssh/authorized_keys
32
33# Don't read the user's ~/.rhosts and ~/.shosts files
34IgnoreRhosts yes
35# For this to work you will also need host keys in /etc/ssh_known_hosts
36RhostsRSAAuthentication no
37# similar for protocol version 2
38HostbasedAuthentication no
39# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
40#IgnoreUserKnownHosts yes
41
42# To enable empty passwords, change to yes (NOT RECOMMENDED)
43PermitEmptyPasswords no
44
45# Change to yes to enable challenge-response passwords (beware issues with
46# some PAM modules and threads)
47ChallengeResponseAuthentication no
48
49# Change to no to disable tunnelled clear text passwords
50PasswordAuthentication no
51
52# Kerberos options
53#KerberosAuthentication no
54#KerberosGetAFSToken no
55#KerberosOrLocalPasswd yes
56#KerberosTicketCleanup yes
57
58# GSSAPI options
59#GSSAPIAuthentication no
60#GSSAPICleanupCredentials yes
61
62X11Forwarding yes
63X11DisplayOffset 10
64PrintMotd no
65PrintLastLog yes
66TCPKeepAlive yes
67#UseLogin no
68
69#MaxStartups 10:30:60
70#Banner /etc/issue.net
71
72# Allow client to pass locale environment variables
73AcceptEnv LANG LC_*
74
75Subsystem sftp /usr/lib/openssh/sftp-server
76
77UsePAM yes
078
=== added file 'VMBuilder/plugins/ec2/templates/sudoers.tmpl'
--- VMBuilder/plugins/ec2/templates/sudoers.tmpl 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/templates/sudoers.tmpl 2009-03-24 16:33:47 +0000
@@ -0,0 +1,23 @@
1# /etc/sudoers
2#
3# This file MUST be edited with the 'visudo' command as root.
4#
5# See the man page for details on how to write a sudoers file.
6#
7
8Defaults env_reset
9
10# Uncomment to allow members of group sudo to not need a password
11# %sudo ALL=NOPASSWD: ALL
12
13# Host alias specification
14
15# User alias specification
16
17# Cmnd alias specification
18
19# User privilege specification
20root ALL=(ALL) ALL
21ubuntu ALL=(ALL) NOPASSWD:ALL
22
23# Members of the admin group may gain root privileges
024
=== removed file 'VMBuilder/plugins/ec2/templates/upstart.tmpl'
--- VMBuilder/plugins/ec2/templates/upstart.tmpl 2008-11-11 18:28:57 +0000
+++ VMBuilder/plugins/ec2/templates/upstart.tmpl 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
1# tty1 - getty
2#
3# This service maintains a getty on tty1 from the point the system is
4# started until it is shut down again.
5
6start on stopped rc2
7start on stopped rc3
8start on stopped rc4
9start on stopped rc5
10
11stop on runlevel 0
12stop on runlevel 1
13stop on runlevel 6
14
15respawn
16exec /sbin/getty 38400 xvc0
170
=== added file 'VMBuilder/plugins/ec2/templates/xen-ld-so-conf.tmpl'
--- VMBuilder/plugins/ec2/templates/xen-ld-so-conf.tmpl 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/templates/xen-ld-so-conf.tmpl 2009-03-24 16:33:47 +0000
@@ -0,0 +1,1 @@
1hwcap 0 nosegneg
02
=== added file 'VMBuilder/plugins/ec2/templates/xvc0.tmpl'
--- VMBuilder/plugins/ec2/templates/xvc0.tmpl 1970-01-01 00:00:00 +0000
+++ VMBuilder/plugins/ec2/templates/xvc0.tmpl 2009-03-26 17:13:31 +0000
@@ -0,0 +1,16 @@
1# xvc0 - getty
2#
3# This service maintains a getty on tty1 from the point the system is
4# started until it is shut down again.
5
6start on stopped rc2
7start on stopped rc3
8start on stopped rc4
9start on stopped rc5
10
11stop on runlevel 0
12stop on runlevel 1
13stop on runlevel 6
14
15respawn
16exec /sbin/getty 38400 xvc0
017
=== modified file 'VMBuilder/plugins/firstscripts/__init__.py'
--- VMBuilder/plugins/firstscripts/__init__.py 2008-09-30 13:01:58 +0000
+++ VMBuilder/plugins/firstscripts/__init__.py 2009-03-24 13:22:36 +0000
@@ -41,11 +41,17 @@
41 41
42 if self.vm.firstboot:42 if self.vm.firstboot:
43 logging.debug("Checking if firstboot script %s exists" % (self.vm.firstboot,))43 logging.debug("Checking if firstboot script %s exists" % (self.vm.firstboot,))
44 if not(os.access(self.vm.firstboot, os.X_OK)):
45 raise MBuilderUserError("The first-boot script is not executable")
46
44 if not(os.path.isfile(self.vm.firstboot)):47 if not(os.path.isfile(self.vm.firstboot)):
45 raise VMBuilderUserError('The path to the first-boot script is invalid: %s. Make sure you are providing a full path.' % self.vm.firstboot)48 raise VMBuilderUserError('The path to the first-boot script is invalid: %s. Make sure you are providing a full path.' % self.vm.firstboot)
46 49
47 if self.vm.firstlogin:50 if self.vm.firstlogin:
48 logging.debug("Checking if first login script %s exists" % (self.vm.firstlogin,))51 logging.debug("Checking if first login script %s exists" % (self.vm.firstlogin,))
52 if not(os.access(self.vm.firstlogin, os.X_OK)):
53 raise VMBuilderUserError("The first-login script is not executable")
54
49 if not(os.path.isfile(self.vm.firstlogin)):55 if not(os.path.isfile(self.vm.firstlogin)):
50 raise VMBuilderUserError('The path to the first-login script is invalid: %s. Make sure you are providing a full path.' % self.vm.firstlogin)56 raise VMBuilderUserError('The path to the first-login script is invalid: %s. Make sure you are providing a full path.' % self.vm.firstlogin)
5157
5258
=== modified file 'VMBuilder/plugins/ubuntu/dapper.py'
--- VMBuilder/plugins/ubuntu/dapper.py 2008-12-16 15:29:50 +0000
+++ VMBuilder/plugins/ubuntu/dapper.py 2009-03-24 13:30:11 +0000
@@ -81,6 +81,9 @@
81 logging.debug("Installing ssh keys")81 logging.debug("Installing ssh keys")
82 self.install_authorized_keys()82 self.install_authorized_keys()
8383
84 logging.debug("Install xen kernel")
85 self.install_xen_kernel()
86
84 logging.debug("Installing extra packages")87 logging.debug("Installing extra packages")
85 self.install_extras()88 self.install_extras()
8689
8790
=== modified file 'VMBuilder/plugins/ubuntu/hardy.py'
--- VMBuilder/plugins/ubuntu/hardy.py 2008-11-06 15:36:18 +0000
+++ VMBuilder/plugins/ubuntu/hardy.py 2009-03-24 15:28:46 +0000
@@ -18,13 +18,30 @@
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20import suite20import suite
21import logging
22import VMBuilder
23from VMBuilder.util import run_cmd
21from VMBuilder.plugins.ubuntu.gutsy import Gutsy24from VMBuilder.plugins.ubuntu.gutsy import Gutsy
2225
23class Hardy(Gutsy):26class Hardy(Gutsy):
24 virtio_net = True27 virtio_net = True
2528
26 def xen_kernel_path(self):29 def xen_kernel_path(self):
27 return '/boot/vmlinuz-2.6.24-19-xen'30 rcmd = run_cmd('chroot', self.destdir, 'dpkg', '-S', 'xen')
31 temp = rcmd[0].split(": ")
32 xen_kernel = temp[0].split("linux-image-")
33 path = '/boot/vmlinuz-%s' %xen_kernel
34 return path
2835
29 def xen_ramdisk_path(self):36 def xen_ramdisk_path(self):
30 return '/boot/initrd.img-2.6.24-19-xen'37 rcmd = run_cmd('chroot', self.destdir, 'dpkg', '-S', 'xen')
38 temp = rcmd[0].split(": ")
39 xen_ramdisk = temp[0].split("linux-image-")
40 path = '/boot/initrd.img-%s' %xen_ramdisk
41 return path
42
43 def install_xen_kernel(self):
44 import VMBuilder.plugins.xen
45
46 if isinstance(self.vm.hypervisor, VMBuilder.plugins.xen.Xen):
47 self.run_in_target('apt-get', '-y', '--force-yes', 'install', 'linux-image-xen')
3148
=== modified file 'VMBuilder/plugins/ubuntu/intrepid.py'
--- VMBuilder/plugins/ubuntu/intrepid.py 2009-02-17 14:39:16 +0000
+++ VMBuilder/plugins/ubuntu/intrepid.py 2009-03-24 15:28:46 +0000
@@ -35,3 +35,8 @@
35 run_cmd('sed', '-ie', 's/^# kopt=root=\([^ ]*\)\(.*\)/# kopt=root=UUID=%s\\2/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)35 run_cmd('sed', '-ie', 's/^# kopt=root=\([^ ]*\)\(.*\)/# kopt=root=UUID=%s\\2/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)
36 run_cmd('sed', '-ie', 's/^# groot.*/# groot=%s/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)36 run_cmd('sed', '-ie', 's/^# groot.*/# groot=%s/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)
37 run_cmd('sed', '-ie', '/^# kopt_2_6/ d', '%s/boot/grub/menu.lst' % self.destdir)37 run_cmd('sed', '-ie', '/^# kopt_2_6/ d', '%s/boot/grub/menu.lst' % self.destdir)
38 def install_xen_kernel(self):
39 import VMBuilder.plugins.xen
40
41 if isinstance(self.vm.hypervisor, VMBuilder.plugins.xen.Xen):
42 logging.info('Skipping Xen kernel installation.')
3843
=== modified file 'VMBuilder/plugins/ubuntu/jaunty.py'
--- VMBuilder/plugins/ubuntu/jaunty.py 2008-12-04 16:27:22 +0000
+++ VMBuilder/plugins/ubuntu/jaunty.py 2009-03-24 15:28:46 +0000
@@ -31,3 +31,9 @@
31 run_cmd('sed', '-ie', 's/^# kopt=root=\([^ ]*\)\(.*\)/# kopt=root=UUID=%s\\2/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)31 run_cmd('sed', '-ie', 's/^# kopt=root=\([^ ]*\)\(.*\)/# kopt=root=UUID=%s\\2/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)
32 run_cmd('sed', '-ie', 's/^# groot.*/# groot=%s/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)32 run_cmd('sed', '-ie', 's/^# groot.*/# groot=%s/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)
33 run_cmd('sed', '-ie', '/^# kopt_2_6/ d', '%s/boot/grub/menu.lst' % self.destdir)33 run_cmd('sed', '-ie', '/^# kopt_2_6/ d', '%s/boot/grub/menu.lst' % self.destdir)
34
35 def install_xen_kernel(self):
36 import VMBuilder.plugins.xen
37
38 if isinstance(self.vm.hypervisor, VMBuilder.plugins.xen.Xen):
39 logging.info('Skipping Xen kernel installation.')
3440
=== modified file 'VMBuilder/plugins/ubuntu/templates/sources.list.tmpl'
--- VMBuilder/plugins/ubuntu/templates/sources.list.tmpl 2008-11-28 09:59:59 +0000
+++ VMBuilder/plugins/ubuntu/templates/sources.list.tmpl 2009-03-24 13:15:03 +0000
@@ -9,7 +9,7 @@
99
10#if $ppa10#if $ppa
11#for $p in $ppa11#for $p in $ppa
12deb http://ppa.launchpad.net/$p/ubuntu $suite #slurp12deb http://ppa.launchpad.net/$p/ppa/ubuntu $suite #slurp
13#echo ' '.join($components)13#echo ' '.join($components)
1414
15#end for15#end for
1616
=== modified file 'debian/control'
--- debian/control 2008-12-16 13:39:21 +0000
+++ debian/control 2009-03-24 13:17:11 +0000
@@ -9,7 +9,7 @@
99
10Package: python-vm-builder10Package: python-vm-builder
11Architecture: all11Architecture: all
12Depends: kvm (>= 1:69) | qemu, debootstrap (>= 1.0.9), parted, kpartx, ubuntu-keyring, ${python:Depends}, python-cheetah, devscripts12Depends: kvm (>= 1:69) | qemu, debootstrap (>= 1.0.9), parted, kpartx, ubuntu-keyring, ${python:Depends}, python-cheetah, devscripts, rsync
13Recommends: python-libvirt13Recommends: python-libvirt
14XB-Python-Version: ${python:Versions}14XB-Python-Version: ${python:Versions}
15Description: VM builder15Description: VM builder
1616
=== modified file 'debian/python-vm-builder-ec2.install'
--- debian/python-vm-builder-ec2.install 2008-10-20 22:09:39 +0000
+++ debian/python-vm-builder-ec2.install 2009-03-24 14:03:02 +0000
@@ -1,1 +1,1 @@
1debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/ec21debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/ec2
22
=== modified file 'debian/python-vm-builder.install'
--- debian/python-vm-builder.install 2008-10-21 08:14:00 +0000
+++ debian/python-vm-builder.install 2009-03-24 14:15:32 +0000
@@ -1,12 +1,12 @@
1debian/tmp/etc1debian/tmp/etc
2debian/tmp/usr/bin/vmbuilder2debian/tmp/usr/bin/vmbuilder
3debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/*.py3debian/tmp/usr/lib/python*/*-packages/VMBuilder/*.py
4debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/*.py4debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/*.py
5debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/cli5debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/cli
6debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/firstscripts6debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/firstscripts
7debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/kvm7debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/kvm
8debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/libvirt8debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/libvirt
9debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/postinst9debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/postinst
10debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/ubuntu10debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/ubuntu
11debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/xen11debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/xen
12debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/vmware12debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/vmware

Subscribers

People subscribed via source and target branches