19: def bundle
20:
21: @machines.each do |m|
22: li machine_separator(m.name, m.instid)
23:
24: cmd = "ec2-bundle-instance"
25: args = [m.instid, "--region", @@global.region.to_s]
26: args += ["-b", @@global.bucket, "-p", @argv.name]
27: args += ["-o", @@global.accesskey, "-w", @@global.secretkey]
28: args += ["-K", @@global.pkey, "-C", @@global.cert]
29:
30:
31: args += ["--no-bucket-setup"] if @@global.region.to_s == 'eu-west-1'
32:
33: if @@global.verbose > 0
34: li "Running: " << Rye.prepare_command(cmd, args), $/
35: end
36:
37: unless @@global.quiet
38: li "Bundling can take up to 60 minutes."
39: li "Check the status with the following command:"
40: li Rudy::Huxtable.generate_rudy_command('bundle-status').bright
41: li $/, "When complete, register the image with the command:"
42: li Rudy::Huxtable.generate_rudy_command('images', '-R', @argv.name).bright
43: end
44:
45: execute_check(:medium)
46:
47: ret = Rye.shell cmd, args
48: li ret.stderr, ret.stdout
49: end
50: end