vm_shepherd 3.6.1 → 3.6.2

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: b60886b794bcc80be233a697303896117ba30bd8
4
- data.tar.gz: 9c19f82ea6a62127b8622a847c6253f925dd80c1
3
+ metadata.gz: e078bebb55b78c281cc95058e277828fac2d924e
4
+ data.tar.gz: 78696d4efed26e9faf0564074b4eef5045d24f26
5
5
  SHA512:
6
- metadata.gz: 9a16267362a30cd6b1fc2697cbd475dff8cd49591fa4b363a4a22b21b5d629405070fdab4ae302094fb74f4f39d24b963dc1f785a62812b2371fe5261101c891
7
- data.tar.gz: 97cb4e3d2d8040b40ce1f226b738091e832738813e1d06e57702e3100426861265e0420bbe9b6de2b2b716264e145be5898063b5e795cd0b4da0f3fcdd5edc8f
6
+ metadata.gz: 6b5cec04dd46e3ddff775260f5a46c2c806f345e0abbc0290011ba119bdea1bf1d301cdab3d144c46c32f6130fde72952e5c24ded934dc925a53f390d117dd7e
7
+ data.tar.gz: d56dd9eddd7559f576db8ce70ccee7a882fee117bb0d0a2f3e77e1e5618bb454402d58fd7309d543954a216edc071052ed8989099b0e655d3d6499e391b09703
@@ -167,7 +167,7 @@ module VmShepherd
167
167
  key_name: vm_config.fetch('key_name'),
168
168
  security_group_ids: [env_config.fetch('outputs').fetch('security_group')],
169
169
  subnet: env_config.fetch('outputs').fetch('public_subnet_id'),
170
- instance_type: OPS_MANAGER_INSTANCE_TYPE
170
+ instance_type: vm_config.dig('instance_type') || OPS_MANAGER_INSTANCE_TYPE
171
171
  }
172
172
 
173
173
  if (instance_profile = env_config.fetch('outputs').fetch('instance_profile', nil))
@@ -1,3 +1,3 @@
1
1
  module VmShepherd
2
- VERSION = '3.6.1'.freeze
2
+ VERSION = '3.6.2'.freeze
3
3
  end
@@ -320,6 +320,27 @@ module VmShepherd
320
320
  end
321
321
  end
322
322
 
323
+ context 'when the instance type is specified in the vm config' do
324
+ let(:vm_config) do
325
+ {
326
+ 'vm_name' => 'some-vm-name',
327
+ 'key_name' => 'ssh-key-name',
328
+ 'instance_type' => 't3.medium'
329
+ }
330
+ end
331
+
332
+ it 'creates an instance' do
333
+ expect(ec2).to receive_message_chain(:instances, :create).with(
334
+ image_id: ami_id,
335
+ key_name: 'ssh-key-name',
336
+ security_group_ids: ['security-group-id'],
337
+ subnet: 'public-subnet-id',
338
+ instance_type: 't3.medium').and_return(instance)
339
+
340
+ ami_manager.deploy(ami_file_path: ami_file_path, vm_config: vm_config)
341
+ end
342
+ end
343
+
323
344
  context 'when the ip address is in use' do
324
345
  it 'retries until the IP address is available' do
325
346
  expect(instances).to receive(:create).and_raise(AWS::EC2::Errors::InvalidIPAddress::InUse).once
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vm_shepherd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.1
4
+ version: 3.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ops Manager Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-16 00:00:00.000000000 Z
11
+ date: 2019-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-v1