stemcell 0.13.0 → 0.13.1

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
  SHA256:
3
- metadata.gz: e65ab6388e741e11ab2f46af451098bd7fe70cb847f3ea8f1b9b9d229c860c2c
4
- data.tar.gz: 568f4aecc9c7518ed156355035b39843b04d006bec7876438d707e097e071d30
3
+ metadata.gz: 9942211d9334ce09b4a56299f2bc7e3e903d57eb871a60a8a1228c549e6b1407
4
+ data.tar.gz: 3e70bbdc1434124922c4be3cfb29e6842d6cda8210a1555fe3c36e4887740a11
5
5
  SHA512:
6
- metadata.gz: 53d4581e807c8c1373189437a5e0afb42e0dc00c62b3b2b18797a31ae72d483ac066af02c455cfc3fc9a98dcc5452f433bfef618b8f8e56643f5748cff22ce12
7
- data.tar.gz: 431fe9ee22ac0f42ff40227f1ce39e74a88af53af1fb4dc571cace78d167e346d125a2615d35799060853767801412a8c8d4ba35603d269ebc1b5232ec4bbda5
6
+ metadata.gz: c4f0a32c8fe858b23bd3ddbbb30ca752a0b23c0a2782d9fd0cf56d9cda0e344bdaa3c2361b1df9f4d5f5413ca88e15c714c868ee2efaa1b304dd74d248601fdb
7
+ data.tar.gz: a9fb4751d0fe25b94f4c47785da168a9e0e909464d0354461adc8db5d01487d5ea696ebcbc79e74267b6ccd114a794a5e5d13ed90bd6b831a20c3bb5ae5b4906
data/.travis.yml CHANGED
@@ -5,5 +5,6 @@ rvm:
5
5
  - 2.1.2
6
6
  - 2.2.4
7
7
  - 2.3.1
8
+ - 2.6.8
8
9
  before_install:
9
10
  - gem install bundler -v 1.16.3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.13.1
2
+ - Support for specifying --cpu-options
3
+
1
4
  # 0.13.0
2
5
  - Migrate to AWS SDK to v3
3
6
  - Drop support for ClassicLink
@@ -132,6 +132,7 @@ module Stemcell
132
132
  # comma-separated list when presented as defaults.
133
133
  pd['security_groups'] &&= pd['security_groups'].join(',')
134
134
  pd['tags'] &&= pd['tags'].to_a.map { |p| p.join('=') }.join(',')
135
+ pd['cpu_options'] &&= pd['cpu_options'].to_a.map { |p| p.join('=') }.join(',')
135
136
  pd['chef_cookbook_attributes'] &&= pd['chef_cookbook_attributes'].join(',')
136
137
  end
137
138
 
@@ -31,6 +31,7 @@ module Stemcell
31
31
  'chef_environment',
32
32
  'chef_data_bag_secret',
33
33
  'chef_data_bag_secret_path',
34
+ 'cpu_options',
34
35
  'git_branch',
35
36
  'git_key',
36
37
  'git_origin',
@@ -178,6 +179,11 @@ module Stemcell
178
179
  launch_options[:block_device_mappings] = opts['block_device_mappings']
179
180
  end
180
181
 
182
+ # specify cpu options (optional)
183
+ if opts['cpu_options']
184
+ launch_options[:cpu_options] = opts['cpu_options']
185
+ end
186
+
181
187
  # specify ephemeral block device mappings (optional)
182
188
  if opts['ephemeral_devices']
183
189
  launch_options[:block_device_mappings] ||= []
@@ -187,6 +187,12 @@ module Stemcell
187
187
  :type => String,
188
188
  :env => 'CHEF_DATA_BAG_SECRET_PATH'
189
189
  },
190
+ {
191
+ :name => 'cpu_options',
192
+ :desc => "comma-separated list of cpu option key=value pairs",
193
+ :type => String,
194
+ :env => 'CPU_OPTIONS'
195
+ },
190
196
  {
191
197
  :name => 'chef_role',
192
198
  :desc => "chef role of instance to be launched",
@@ -345,6 +351,16 @@ module Stemcell
345
351
  options['tags'] = tags
346
352
  end
347
353
 
354
+ # convert cpu_options from comma separated string to ruby hash
355
+ if options['cpu_options']
356
+ cpu_options = {}
357
+ options['cpu_options'].split(',').each do |cpu_opt|
358
+ key, value = cpu_opt.split('=')
359
+ cpu_options[key] = value
360
+ end
361
+ options['cpu_options'] = cpu_options
362
+ end
363
+
348
364
  # parse block_device_mappings to convert it from the standard CLI format
349
365
  # to the EC2 Ruby API format.
350
366
  # All of this is a bit hard to find so here are some docs links to
@@ -1,3 +1,3 @@
1
1
  module Stemcell
2
- VERSION = "0.13.0"
2
+ VERSION = "0.13.1"
3
3
  end
@@ -71,7 +71,8 @@ describe Stemcell::Launcher do
71
71
  'count' => 2,
72
72
  'security_groups' => ['sg_name1', 'sg_name2'],
73
73
  'user' => 'some_user',
74
- 'wait' => true
74
+ 'wait' => true,
75
+ 'cpu_options' => 'core_count=1,threads_per_core=1'
75
76
  }
76
77
  }
77
78
 
@@ -107,7 +108,8 @@ describe Stemcell::Launcher do
107
108
  { :key => "stemcell", :value => Stemcell::VERSION },
108
109
  ]},
109
110
  ],
110
- :user_data => Base64.encode64('template')
111
+ :user_data => Base64.encode64('template'),
112
+ :cpu_options => 'core_count=1,threads_per_core=1'
111
113
  )).and_return(instances)
112
114
  launched_instances = launcher.send(:launch, launch_options)
113
115
  expect(launched_instances.map(&:public_ip_address)).to all(be_truthy)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stemcell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Rhoads
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-12-14 00:00:00.000000000 Z
14
+ date: 2022-01-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: aws-eventstream