guignol 0.3.10 → 0.3.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: 602a8585b6cfa0db283f93cdfba5b3cf3b83df95
4
- data.tar.gz: 5612487338b4c8fc3fc38fd1faf281443568746c
3
+ metadata.gz: 6b0f962e2f0e7ea9c001589f806953114824f90c
4
+ data.tar.gz: 8d77edcfc2f89886fb24c5a76a6aac0c1a83c393
5
5
  SHA512:
6
- metadata.gz: fbd093e9fc9047efc71bb618af7c5f87a6ee827509ef8f7aeb6aad2748fe91f98642628151e663a291d18cbb8ebf7a19ca4a956f9ec57bc053e222b6690cfecf
7
- data.tar.gz: bf1dc14babf9a08fbdec9ef987a967756de7caa4f9fc3b4bb643b13401e0fc98f70d781ce08b259a864426bc38af66d88ec85bd184bb6972767f8c9eaac9de2f
6
+ metadata.gz: 1ea90b6c5c7a26e657c522ac159ecc32314ad797ac0ab61a09e9f7857bcc43c2ef31c19b62301bb25e9b8043e793e3c5bf3cdf189f4c36a5dfdec99734ff0843
7
+ data.tar.gz: fc396f426f5dcfbab51af910abd72aa00bcb56508c58f2727ab427f126cedbfc4fb4247c94b0be7f371b92c9ab416e0c4823323f61109806b64df74c8d1d1dce
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- guignol (0.3.10)
4
+ guignol (0.3.12)
5
5
  activesupport
6
6
  fog (~> 1.12.0)
7
7
  parallel (~> 0.6.2)
@@ -11,7 +11,7 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activesupport (4.0.1)
14
+ activesupport (4.0.3)
15
15
  i18n (~> 0.6, >= 0.6.4)
16
16
  minitest (~> 4.2)
17
17
  multi_json (~> 1.3)
@@ -33,14 +33,14 @@ GEM
33
33
  nokogiri (~> 1.5.0)
34
34
  ruby-hmac
35
35
  formatador (0.2.4)
36
- i18n (0.6.5)
36
+ i18n (0.6.9)
37
37
  method_source (0.8.1)
38
- mime-types (1.25)
38
+ mime-types (2.0)
39
39
  minitest (4.7.5)
40
- multi_json (1.8.2)
40
+ multi_json (1.8.4)
41
41
  net-scp (1.1.2)
42
42
  net-ssh (>= 2.6.5)
43
- net-ssh (2.6.8)
43
+ net-ssh (2.7.0)
44
44
  nokogiri (1.5.10)
45
45
  parallel (0.6.5)
46
46
  pry (0.9.12.2)
data/README.md CHANGED
@@ -164,6 +164,8 @@ Note that Guignol does not delete volumes when tearing down instances.
164
164
  - `:username`
165
165
  Will be used for the SSH connection performed by the `execute` command.
166
166
 
167
+ - `:root_ebs_size`
168
+ Create instance with a bigger root EBS volume
167
169
 
168
170
 
169
171
  ## "User data" boot script
@@ -217,6 +219,7 @@ This one just contains 1 machine, `fubar.example.com.`
217
219
  :image_id: ami-15f7c961
218
220
  :flavor_id: m1.small
219
221
  :key_name: john-doe
222
+ :root_ebs_size: 30
220
223
  :security_group_ids:
221
224
  - sg-7e638abc
222
225
  :volumes:
@@ -39,6 +39,11 @@ module Guignol::Models
39
39
  zones = create_options[:volumes].map { |name,volume_options| Volume.new(name, volume_options).availability_zone }.compact.uniq
40
40
  availability_zone = create_options[:availability_zone]
41
41
 
42
+ if options[:root_ebs_size]
43
+ raise "root_ebs_size have to be a number" unless options[:root_ebs_size].is_a? Integer
44
+ create_options[:block_device_mapping] = [{"DeviceName"=>"/dev/sda1", "Ebs.VolumeSize"=>options[:root_ebs_size], "Ebs.DeleteOnTermination"=>"true"}]
45
+ end
46
+
42
47
  # check if provided availability_zone is valid
43
48
  if availability_zone
44
49
  unless availability_zone.match(connection.region)
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Guignol
3
- VERSION = "0.3.10"
3
+ VERSION = "0.3.12"
4
4
  end
@@ -56,11 +56,21 @@ describe Guignol::Models::Instance do
56
56
  expect { instance.create }.to_not raise_error
57
57
  end
58
58
 
59
+ it 'does not break when providing a root ebs size' do
60
+ instance = described_class.new(name, options.merge(:root_ebs_size => 30))
61
+ expect { instance.create }.to_not raise_error
62
+ end
63
+
59
64
  it 'does not allow an availability zone that does not match the region' do
60
65
  instance = described_class.new(name, options.merge(:availability_zone => 'us-west-1a'))
61
66
  expect { instance.create }.to raise_error('availability zone us-west-1a is not in the defined region eu-west-1')
62
67
  end
63
68
 
69
+ it 'does not allow a non numeric root ebs size' do
70
+ instance = described_class.new(name, options.merge(:root_ebs_size => 'foobar'))
71
+ expect { instance.create }.to raise_error
72
+ end
73
+
64
74
  it 'requires existing volumes to live in a given availability zone'
65
75
  it 'reuses existing volumes'
66
76
  it 'fails when existing volumes are in different zones'
data/spec/spec_helper.rb CHANGED
@@ -11,6 +11,6 @@ ENV['AWS_SECRET_ACCESS_KEY'] = 'aws-password'
11
11
 
12
12
  RSpec.configure do |config|
13
13
  config.before do
14
- Fog::Mock.reset
14
+ Fog::Mock.reset
15
15
  end
16
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guignol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.10
4
+ version: 0.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Letessier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-18 00:00:00.000000000 Z
11
+ date: 2014-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler