openstudio-aws 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d33b30a0656911cefb58ff085e87a4b36ee1ff8
4
- data.tar.gz: 9ccc2d0a0d75e654dfdd20dd7ef211c43b90d407
3
+ metadata.gz: 699415a56f0293421b14a37ba67b5111aa5052bd
4
+ data.tar.gz: 810e3e506a8c02bbe90b51926cace86195c64a4d
5
5
  SHA512:
6
- metadata.gz: d20b55e37e3f1c1f7a457af6140726e83d5caa119326cbfe67a2f510cf86d178887f3fc9e373dac9ba7cacd0189259e7e2323e176ea1ea2f5d4ad57742191280
7
- data.tar.gz: 8c642295ea9555236f4686f587ee85b53f5c9e6bf1826e845845847ccc7838f845ba0ab016b64e0d20808402b4bed6d2d9eb309268a1fb5272da5fb1b0281145
6
+ metadata.gz: 48dea35a21a4c763bf31eeb6b2316349001c300fe92a2c62924b530c30a99607ce88bd4068b0eec91c7bec6b46f88ccef25ea0a0bef67a81fb85eaa6db123512
7
+ data.tar.gz: 2d6c65e2adfd51d7c21e1856b5f35ba728624a2fb4104919c1c1b366f3f0826d3b8f1708fa5ef46ea8ad2b357950c07e8e9c060321d3a701a83357ebcf2db1a1
@@ -60,11 +60,17 @@ module OpenStudio
60
60
  end
61
61
 
62
62
  def create_workers(number_of_instances, instance_data = {})
63
- defaults = {instance_type: "m2.4xlarge", image_id: @default_amis['worker']}
63
+ defaults = {instance_type: "m2.4xlarge"}
64
64
  instance_data = defaults.merge(instance_data)
65
65
 
66
+ if instance_data[:image_id].nil?
67
+ if instance_data[:instance_type] =~ /cc2|c3/
68
+ instance_data[:image_id] = @default_amis['cc2worker']
69
+ else
70
+ instance_data[:image_id] = @default_amis['worker']
71
+ end
72
+ end
66
73
 
67
- #todo: raise an exception if the instance type and image id don't match
68
74
  raise "Can't create workers without a server instance running" if @os_aws.server.nil?
69
75
 
70
76
  @os_aws.launch_workers(instance_data[:image_id], instance_data[:instance_type], number_of_instances)
@@ -1,6 +1,6 @@
1
1
  module OpenStudio
2
2
  module Aws
3
- VERSION = "0.1.11"
3
+ VERSION = "0.1.12"
4
4
  OPENSTUDIO_VERSION = "1.2.1"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstudio-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Long