abiquo-etk 0.4.23 → 0.4.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.23
1
+ 0.4.24
data/abiquo-etk.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{abiquo-etk}
8
- s.version = "0.4.23"
8
+ s.version = "0.4.24"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sergio Rubio"]
12
- s.date = %q{2010-10-25}
12
+ s.date = %q{2010-10-26}
13
13
  s.description = %q{Tools to troubleshoot your Abiquo installation}
14
14
  s.email = %q{srubio@abiquo.com}
15
15
  s.executables = ["abiquo-check-16-install", "aetk-setup-rs", "aetk-setup-v2v", "abicli", "aetk-setup-server"]
@@ -82,6 +82,16 @@ if ARGV[0] == 'instant-deploy'
82
82
  :long => '--mem MEM',
83
83
  :description => 'Virtual Machine memory (in bytes)',
84
84
  :default => '512'
85
+
86
+ option :ssh_port,
87
+ :long => '--ssh-port PORT',
88
+ :description => 'Forwarded SSH port (Default 2300)',
89
+ :default => '2300'
90
+
91
+ option :tomcat_port,
92
+ :long => '--tomcat-port PORT',
93
+ :description => 'Forwarded Tomcat port (Default 8980',
94
+ :default => '8980'
85
95
 
86
96
  option :help,
87
97
  :short => "-h",
@@ -130,6 +140,8 @@ if ARGV[0] == 'instant-deploy'
130
140
  disk_file = params[:disk_file] || "#{target_dir}/abiquo.qcow2"
131
141
  iso_url = params[:iso_url]
132
142
  mem = params[:mem]
143
+ tomcat_port = params[:tomcat_port]
144
+ ssh_port = params[:ssh_port]
133
145
  # Create target directory
134
146
  begin
135
147
  FileUtils.mkdir(target_dir)
@@ -171,15 +183,17 @@ if ARGV[0] == 'instant-deploy'
171
183
 
172
184
  # Boot
173
185
  puts "\nAfter the install process, open the browser and type:\n"
174
- puts "\nhttp://127.0.0.1:8980/client-premium\n\n"
186
+ puts "\nhttp://127.0.0.1:#{tomcat_port}/client-premium\n\n"
175
187
  puts "To open the Abiquo Web Console."
188
+ puts "\nTo SSH to the Abiquo VM type:"
189
+ puts "ssh -p #{ssh_port} localhost\n\n"
176
190
  puts "\nBooting the Installer...\n\n"
177
191
  File.open(target_dir + '/run.sh', 'w') do |f|
178
192
  f.puts "#!/bin/sh"
179
193
  f.puts "MEM=#{mem}"
180
194
  f.puts "TAP=vtap0"
181
195
  f.puts ""
182
- f.puts "kvm -m #{mem} -drive file=#{File.basename(disk_file)} -net user,hostfwd=tcp:127.0.0.1:8980-:8080,hostfwd=tcp:127.0.0.1:2300-:22 -net nic -boot order=c > /dev/null 2>&1"
196
+ f.puts "kvm -m #{mem} -drive file=#{File.basename(disk_file)} -net user,hostfwd=tcp:0.0.0.0:#{tomcat_port}-:8080,hostfwd=tcp:0.0.0.0:#{ssh_port}-:22 -net nic -boot order=c > /dev/null"
183
197
  f.puts ""
184
198
  f.puts "#"
185
199
  f.puts "# Comment the above line and uncomment this to use bridged networking."
@@ -188,7 +202,7 @@ if ARGV[0] == 'instant-deploy'
188
202
  f.puts "#"
189
203
  f.puts "#kvm -m #{mem} -drive file=#{File.basename(disk_file)} -net tap,ifname=$TAP -net nic -boot order=c > /dev/null 2>&1"
190
204
  end
191
- boot_vm :disk_file => disk_file, :cdrom => cdrom, :mem => mem
205
+ boot_vm :disk_file => disk_file, :cdrom => cdrom, :mem => mem, :tomcat_port => tomcat_port, :ssh_port => ssh_port
192
206
  end
193
207
 
194
208
  def distribution_version
@@ -201,7 +215,12 @@ if ARGV[0] == 'instant-deploy'
201
215
  disk_file = params[:disk_file]
202
216
  cdrom = params[:cdrom]
203
217
  mem = params[:mem]
204
- `kvm -m 1024 -drive file=#{disk_file} -net user,hostfwd=tcp:127.0.0.1:8980-:8080,hostfwd=tcp:127.0.0.1:2300-:22 -net nic -drive file=#{cdrom},media=cdrom -boot order=cd -boot once=d > /dev/null 2>&1 `
218
+ tomcat_port = params[:tomcat_port]
219
+ ssh_port = params[:ssh_port]
220
+ output = `kvm -m 1024 -drive file=#{disk_file} -net user,hostfwd=tcp:0.0.0.0:#{tomcat_port}-:8080,hostfwd=tcp:0.0.0.0:#{ssh_port}-:22 -net nic -drive file=#{cdrom},media=cdrom -boot order=cd -boot once=d 2>&1 `
221
+ if $? != 0
222
+ puts "Error booting the VM: #{output}"
223
+ end
205
224
  end
206
225
 
207
226
  target_dir = "abiquo-instant-deploy-#{Time.now.strftime "%s"}"
@@ -222,6 +241,9 @@ if ARGV[0] == 'instant-deploy'
222
241
  print "Abiquo Instant Deploy: ".bold
223
242
  puts "One Command Cloud Builder\n\n"
224
243
  puts "Building the cloud into #{target_dir.bold} directory..."
225
- install_iso(:target_dir => target_dir, :iso_url => url, :mem => cli.config[:mem])
244
+ install_iso(:target_dir => target_dir, :iso_url => url, :mem => cli.config[:mem],
245
+ :tomcat_port => cli.config[:tomcat_port],
246
+ :ssh_port => cli.config[:ssh_port]
247
+ )
226
248
 
227
249
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abiquo-etk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 33
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 23
10
- version: 0.4.23
9
+ - 24
10
+ version: 0.4.24
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Rubio
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-25 00:00:00 +02:00
18
+ date: 2010-10-26 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency