stemcell 0.11.3 → 0.11.5
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.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +2 -0
- data/README.md +1 -1
- data/lib/stemcell/launcher.rb +8 -3
- data/lib/stemcell/metadata_launcher.rb +4 -3
- data/lib/stemcell/metadata_source/chef_repository.rb +34 -10
- data/lib/stemcell/metadata_source.rb +11 -2
- data/lib/stemcell/option_parser.rb +22 -1
- data/lib/stemcell/templates/bootstrap.sh.erb +9 -1
- data/lib/stemcell/version.rb +1 -1
- data/spec/fixtures/chef_repo/cookbooks/unit_cookbook/attributes/simple-default.rb +4 -0
- data/spec/fixtures/chef_repo/cookbooks/unit_cookbook/attributes/simple-derived.rb +3 -0
- data/spec/fixtures/chef_repo/cookbooks/unit_cookbook/attributes/simple-override.rb +1 -0
- data/spec/fixtures/chef_repo/cookbooks/unit_cookbook/metadata.rb +1 -0
- data/spec/fixtures/chef_repo/stemcell-cookbook-attribute.json +14 -0
- data/spec/lib/stemcell/metadata_source/chef_repository_spec.rb +100 -4
- data/spec/lib/stemcell/metadata_source/configuration_spec.rb +10 -0
- data/spec/lib/stemcell/metadata_source_spec.rb +25 -1
- data/stemcell.gemspec +2 -0
- metadata +41 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d645147dff53b000f27b6c94e9f258b562be3046
|
4
|
+
data.tar.gz: 8665361d799f879d46469b8763610ded5adda9c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff97aebd5d20e481dd18be4e169d74716bace6f852df0e2c3724c9a3857b8eb6f822528dadfb1dc3b06ea12aea6966d6048c234647d2e59d75e6eb0a626c2323
|
7
|
+
data.tar.gz: 226385834d35ec5a3d2de806db85d718eac90b0b4332a0f8c73c069d4a97739f2606edb3847b32b39d8325b0362c125a50b94602f64c771b7f31c21a44854c7f
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -77,7 +77,7 @@ $ stemcell $your_chef_role --tail
|
|
77
77
|
|
78
78
|
### Terminating:
|
79
79
|
|
80
|
-
To terminate, use the necrosis command and pass a space
|
80
|
+
To terminate, use the necrosis command and pass a space separated list of instance ids:
|
81
81
|
|
82
82
|
```bash
|
83
83
|
$ necrosis i-12345678 i-12345679 i-12345670
|
data/lib/stemcell/launcher.rb
CHANGED
@@ -29,6 +29,7 @@ module Stemcell
|
|
29
29
|
'chef_role',
|
30
30
|
'chef_environment',
|
31
31
|
'chef_data_bag_secret',
|
32
|
+
'chef_data_bag_secret_path',
|
32
33
|
'git_branch',
|
33
34
|
'git_key',
|
34
35
|
'git_origin',
|
@@ -76,6 +77,7 @@ module Stemcell
|
|
76
77
|
@vpc_id = opts['vpc_id']
|
77
78
|
@aws_access_key = opts['aws_access_key']
|
78
79
|
@aws_secret_key = opts['aws_secret_key']
|
80
|
+
@aws_session_token = opts['aws_session_token']
|
79
81
|
end
|
80
82
|
|
81
83
|
def launch(opts={})
|
@@ -185,13 +187,13 @@ module Stemcell
|
|
185
187
|
|
186
188
|
# link to classiclink
|
187
189
|
set_classic_link(instances, opts['classic_link'])
|
188
|
-
@log.info "
|
190
|
+
@log.info "successfully applied classic link settings (if any)"
|
189
191
|
|
190
192
|
# turn on termination protection
|
191
193
|
# we do this now to make sure all other settings worked
|
192
194
|
if opts['termination_protection']
|
193
195
|
enable_termination_protection(instances)
|
194
|
-
@log.info "
|
196
|
+
@log.info "successfully enabled termination protection"
|
195
197
|
end
|
196
198
|
|
197
199
|
# wait for aws to report instance stats
|
@@ -401,13 +403,16 @@ module Stemcell
|
|
401
403
|
:access_key_id => @aws_access_key,
|
402
404
|
:secret_access_key => @aws_secret_key
|
403
405
|
}) if @aws_access_key && @aws_secret_key
|
406
|
+
aws_configs.merge!({
|
407
|
+
:session_token => @aws_session_token,
|
408
|
+
}) if @aws_session_token
|
404
409
|
AWS.config(aws_configs)
|
405
410
|
|
406
411
|
# calculate our ec2 url
|
407
412
|
ec2_url = "ec2.#{@region}.amazonaws.com"
|
408
413
|
|
409
414
|
if @vpc_id
|
410
|
-
@ec2 = AWS::VPC.new(@vpc_id, :ec2_endpoint => ec2_url)
|
415
|
+
@ec2 = AWS::EC2::VPC.new(@vpc_id, :ec2_endpoint => ec2_url)
|
411
416
|
else
|
412
417
|
@ec2 = AWS::EC2.new(:ec2_endpoint => ec2_url)
|
413
418
|
end
|
@@ -95,9 +95,10 @@ module Stemcell
|
|
95
95
|
|
96
96
|
def invoke_launcher(options={})
|
97
97
|
launcher = Launcher.new({
|
98
|
-
'aws_access_key'
|
99
|
-
'aws_secret_key'
|
100
|
-
'
|
98
|
+
'aws_access_key' => options['aws_access_key'],
|
99
|
+
'aws_secret_key' => options['aws_secret_key'],
|
100
|
+
'aws_session_token' => options['aws_session_token'],
|
101
|
+
'region' => options['region'],
|
101
102
|
})
|
102
103
|
# Slice off just the options used for launching.
|
103
104
|
launch_options = {}
|
@@ -25,11 +25,9 @@ module Stemcell
|
|
25
25
|
end
|
26
26
|
|
27
27
|
# This method will return nil if the role has no stemcell metdata.
|
28
|
-
def metadata_for_role(chef_role, chef_environment)
|
29
|
-
|
30
|
-
|
31
|
-
merged_attrs = hash_only_merge!(default_attrs, override_attrs)
|
32
|
-
METADATA_ATTRIBUTES.inject(nil) { |r, key| r || merged_attrs[key] }
|
28
|
+
def metadata_for_role(chef_role, chef_environment, chef_options = {})
|
29
|
+
attrs = expand_role(chef_role, chef_environment, chef_options)
|
30
|
+
METADATA_ATTRIBUTES.inject(nil) { |r, key| r || attrs[key] }
|
33
31
|
end
|
34
32
|
|
35
33
|
private
|
@@ -40,14 +38,40 @@ module Stemcell
|
|
40
38
|
Chef::Config[:role_path] = File.join(chef_root, 'roles')
|
41
39
|
end
|
42
40
|
|
43
|
-
def expand_role(chef_role, chef_environment)
|
44
|
-
|
45
|
-
|
41
|
+
def expand_role(chef_role, chef_environment, chef_options)
|
42
|
+
node = Chef::Node.new
|
43
|
+
node.chef_environment = chef_environment
|
44
|
+
node.run_list << "role[#{chef_role}]"
|
46
45
|
|
47
|
-
|
46
|
+
normal_attributes = chef_options.fetch(:normal_attributes, {})
|
47
|
+
node.consume_attributes(normal_attributes)
|
48
|
+
|
49
|
+
# Load cookbooks.
|
50
|
+
cookbook_loader = Chef::CookbookLoader.new(Chef::Config[:cookbook_path])
|
51
|
+
cookbook_attributes = chef_options.fetch(:cookbook_attributes, [])
|
52
|
+
cookbook_attributes.each do |file_spec|
|
53
|
+
cookbook_name, * = node.parse_attribute_file_spec(file_spec)
|
54
|
+
cookbook_loader.load_cookbook(cookbook_name)
|
55
|
+
end
|
56
|
+
|
57
|
+
cookbook_collection = Chef::CookbookCollection.new(cookbook_loader.cookbooks_by_name)
|
58
|
+
events = Chef::EventDispatch::Dispatcher.new
|
59
|
+
run_context = Chef::RunContext.new(node, cookbook_collection, events)
|
60
|
+
|
61
|
+
# Expand the node's run list.
|
62
|
+
expansion = node.run_list.expand(chef_environment, 'disk')
|
48
63
|
raise RoleExpansionError if expansion.errors?
|
49
64
|
|
50
|
-
|
65
|
+
# Set the default and override attributes.
|
66
|
+
node.attributes.role_default = expansion.default_attrs
|
67
|
+
node.attributes.role_override = expansion.override_attrs
|
68
|
+
|
69
|
+
# Load cookbook attributes.
|
70
|
+
cookbook_attributes.each do |file_spec|
|
71
|
+
node.include_attribute(file_spec)
|
72
|
+
end
|
73
|
+
|
74
|
+
node.attributes
|
51
75
|
end
|
52
76
|
|
53
77
|
end
|
@@ -48,9 +48,18 @@ module Stemcell
|
|
48
48
|
raise ArgumentError, "Missing chef environment" unless environment
|
49
49
|
allow_empty_roles = options.fetch(:allow_empty_roles, false)
|
50
50
|
|
51
|
-
#
|
51
|
+
# Normal and cookbook attributes to load during role metadata expansion
|
52
|
+
normal_attributes = options.fetch(:normal_attributes, {})
|
53
|
+
cookbook_attributes = override_options['chef_cookbook_attributes']
|
54
|
+
cookbook_attributes ||= config.default_options['chef_cookbook_attributes']
|
55
|
+
cookbook_attributes ||= []
|
56
|
+
|
57
|
+
chef_options = {}
|
58
|
+
chef_options[:cookbook_attributes] = cookbook_attributes unless cookbook_attributes.empty?
|
59
|
+
chef_options[:normal_attributes] = normal_attributes unless normal_attributes.empty?
|
52
60
|
|
53
|
-
|
61
|
+
# Step 1: Expand the role metadata
|
62
|
+
role_options = chef_repo.metadata_for_role(role, environment, chef_options)
|
54
63
|
role_empty = role_options.nil? || role_options.empty?
|
55
64
|
|
56
65
|
raise EmptyRoleError if !allow_empty_roles && role_empty
|
@@ -35,6 +35,13 @@ module Stemcell
|
|
35
35
|
:env => 'AWS_SECRET_KEY',
|
36
36
|
:hide => true
|
37
37
|
},
|
38
|
+
{
|
39
|
+
:name => 'aws_session_token',
|
40
|
+
:desc => "aws session token",
|
41
|
+
:type => String,
|
42
|
+
:env => 'AWS_SESSION_TOKEN',
|
43
|
+
:hide => true
|
44
|
+
},
|
38
45
|
{
|
39
46
|
:name => 'region',
|
40
47
|
:desc => "ec2 region to launch in",
|
@@ -180,6 +187,12 @@ module Stemcell
|
|
180
187
|
:type => String,
|
181
188
|
:env => 'CHEF_DATA_BAG_SECRET'
|
182
189
|
},
|
190
|
+
{
|
191
|
+
:name => 'chef_data_bag_secret_path',
|
192
|
+
:desc => "instance-local path to the secret file",
|
193
|
+
:type => String,
|
194
|
+
:env => 'CHEF_DATA_BAG_SECRET_PATH'
|
195
|
+
},
|
183
196
|
{
|
184
197
|
:name => 'chef_role',
|
185
198
|
:desc => "chef role of instance to be launched",
|
@@ -204,6 +217,12 @@ module Stemcell
|
|
204
217
|
:type => String,
|
205
218
|
:env => 'CHEF_ENVIRONMENT'
|
206
219
|
},
|
220
|
+
{
|
221
|
+
:name => 'chef_cookbook_attributes',
|
222
|
+
:desc => "comma-separated list of cookbook attribute files to load during role expansion",
|
223
|
+
:type => String,
|
224
|
+
:env => 'CHEF_COOKBOOK_ATTRIBUTES'
|
225
|
+
},
|
207
226
|
{
|
208
227
|
:name => 'git_origin',
|
209
228
|
:desc => "git origin to use",
|
@@ -383,11 +402,13 @@ module Stemcell
|
|
383
402
|
options['block_device_mappings'] = block_device_mappings
|
384
403
|
end
|
385
404
|
|
386
|
-
# convert security_groups from comma
|
405
|
+
# convert security_groups from comma separated string to ruby array
|
387
406
|
options['security_groups'] &&= options['security_groups'].split(',')
|
388
407
|
options['security_group_ids'] &&= options['security_group_ids'].split(',')
|
389
408
|
# convert ephemeral_devices from comma separated string to ruby array
|
390
409
|
options['ephemeral_devices'] &&= options['ephemeral_devices'].split(',')
|
410
|
+
# convert chef_cookbook_attributes from comma separated string to ruby array
|
411
|
+
options['chef_cookbook_attributes'] &&= options['chef_cookbook_attributes'].split(',')
|
391
412
|
|
392
413
|
# format the classic link options
|
393
414
|
if options['classic_link_vpc_id']
|
@@ -47,7 +47,7 @@ hostname='<%= opts['instance_hostname'] %>'
|
|
47
47
|
domain_name='<%= opts['instance_domain_name'] %>'
|
48
48
|
chef_version='<%= opts['chef_version'] %>'
|
49
49
|
username='<%= opts.fetch('user', ENV['USER']) %>'
|
50
|
-
|
50
|
+
encrypted_data_bag_secret_path='<%= opts['chef_data_bag_secret_path'].to_s %>'
|
51
51
|
|
52
52
|
##
|
53
53
|
## common functions
|
@@ -159,6 +159,14 @@ log_location STDOUT
|
|
159
159
|
Ohai::Config[:plugin_path] << "#{repo_dir}/ohai_plugins"
|
160
160
|
EOF
|
161
161
|
|
162
|
+
if [ -n "$encrypted_data_bag_secret_path" ]; then
|
163
|
+
cat <<EOF >> ${chef_dir}/solo.rb
|
164
|
+
|
165
|
+
encrypted_data_bag_secret "${encrypted_data_bag_secret_path}"
|
166
|
+
EOF
|
167
|
+
fi
|
168
|
+
|
169
|
+
|
162
170
|
encrypted_data_bag_secret_file=${chef_dir}/encrypted_data_bag_secret
|
163
171
|
echo -e "$data_bag_secret" > $encrypted_data_bag_secret_file
|
164
172
|
chmod 0400 $encrypted_data_bag_secret_file
|
data/lib/stemcell/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
override['instance_metadata']['tags']['tag2'] = 'tag2_value_override'
|
@@ -0,0 +1 @@
|
|
1
|
+
name 'unit_cookbook'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"defaults": {
|
3
|
+
"instance_type": "m1.small",
|
4
|
+
"chef_cookbook_attributes": ["cookbook_name::attr_file"]
|
5
|
+
},
|
6
|
+
"backing_store": {
|
7
|
+
"instance_store": {
|
8
|
+
"image_id": "ami-d9d6a6b0"
|
9
|
+
}
|
10
|
+
},
|
11
|
+
"availability_zones": {
|
12
|
+
"us-east-1": ["us-east-1a"]
|
13
|
+
}
|
14
|
+
}
|
@@ -33,12 +33,20 @@ describe Stemcell::MetadataSource::ChefRepository do
|
|
33
33
|
describe '#metadata_for_role' do
|
34
34
|
|
35
35
|
let(:expected_metadata) { FixtureHelper.expected_metadata_for_role(role) }
|
36
|
-
let(:result_metadata) { chef_repo.metadata_for_role(role, environment) }
|
37
|
-
|
36
|
+
let(:result_metadata) { chef_repo.metadata_for_role(role, environment, options) }
|
37
|
+
|
38
|
+
let(:cookbook_attributes) { [] }
|
39
|
+
let(:normal_attributes) { {} }
|
40
|
+
let(:options) {
|
41
|
+
{
|
42
|
+
:cookbook_attributes => cookbook_attributes,
|
43
|
+
:normal_attributes => normal_attributes
|
44
|
+
}
|
45
|
+
}
|
38
46
|
let(:environment) { 'production' }
|
39
47
|
let(:role) { nil }
|
40
48
|
|
41
|
-
context "for a role with no
|
49
|
+
context "for a role with no inheritance" do
|
42
50
|
|
43
51
|
context "and no attributes" do
|
44
52
|
let(:role) { 'unit-simple-none' }
|
@@ -70,7 +78,7 @@ describe Stemcell::MetadataSource::ChefRepository do
|
|
70
78
|
|
71
79
|
end
|
72
80
|
|
73
|
-
context "for a role with
|
81
|
+
context "for a role with inheritance" do
|
74
82
|
|
75
83
|
context "and no attributes" do
|
76
84
|
let(:role) { 'unit-inherit-none' }
|
@@ -102,6 +110,94 @@ describe Stemcell::MetadataSource::ChefRepository do
|
|
102
110
|
|
103
111
|
end
|
104
112
|
|
113
|
+
context "with chef cookbook attributes" do
|
114
|
+
|
115
|
+
context "that are not valid" do
|
116
|
+
let(:role) { 'unit-simple-none' }
|
117
|
+
let(:cookbook_attributes) { ['unknown::attr'] }
|
118
|
+
it "raises an error" do
|
119
|
+
expect { result_metadata }.to raise_error(Chef::Exceptions::CookbookNotFound)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
context "for a role with no inheritance and default attributes" do
|
124
|
+
let(:role) { 'unit-simple-default' }
|
125
|
+
let(:cookbook_attributes) { ['unit_cookbook::simple-default'] }
|
126
|
+
it "returns the expected metdata" do
|
127
|
+
expect(result_metadata).to include(
|
128
|
+
"tags" => {
|
129
|
+
"tag1" => "tag1_value_default",
|
130
|
+
"tag2" => "tag2_value",
|
131
|
+
"tag3" => "tag3_value_attribute_default"
|
132
|
+
}
|
133
|
+
)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
context "for a role with no inheritance and derived attributes" do
|
138
|
+
let(:role) { 'unit-simple-default' }
|
139
|
+
let(:cookbook_attributes) { ['unit_cookbook::simple-derived'] }
|
140
|
+
it "returns the expected metdata" do
|
141
|
+
expect(result_metadata).to include(
|
142
|
+
"tags" => {
|
143
|
+
"tag1" => "tag1_value_default",
|
144
|
+
"derived_tag1" => "tag1_value_default",
|
145
|
+
"tag2" => "tag2_value"
|
146
|
+
}
|
147
|
+
)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
context "that override a role with no inheritance and default attributes" do
|
152
|
+
let(:role) { 'unit-simple-default' }
|
153
|
+
let(:cookbook_attributes) { ['unit_cookbook::simple-override'] }
|
154
|
+
it "returns the expected metdata" do
|
155
|
+
expect(result_metadata).to include(
|
156
|
+
"tags" => {
|
157
|
+
"tag1" => "tag1_value_default",
|
158
|
+
"tag2" => "tag2_value_override"
|
159
|
+
}
|
160
|
+
)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
end
|
165
|
+
|
166
|
+
context "with normal attributes" do
|
167
|
+
let(:role) { 'unit-simple-default' }
|
168
|
+
|
169
|
+
context "for a role with default attribute" do
|
170
|
+
let(:normal_attributes) { { :instance_metadata => { :instance_type => 'test' } } }
|
171
|
+
it "returns the attribute with higher precedence" do
|
172
|
+
expect(result_metadata).to include("instance_type" => "test")
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
context "for a cookbook attribute" do
|
177
|
+
let(:role) { 'unit-simple-default' }
|
178
|
+
let(:cookbook_attributes) { ['unit_cookbook::simple-derived'] }
|
179
|
+
let(:normal_attributes) {
|
180
|
+
{
|
181
|
+
:instance_metadata => {
|
182
|
+
:tags => {
|
183
|
+
'tag1' => 'tag1_value_normal'
|
184
|
+
}
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
188
|
+
it "returns the normal/derived attribute" do
|
189
|
+
expect(result_metadata).to include(
|
190
|
+
"tags" => {
|
191
|
+
"tag1" => "tag1_value_normal",
|
192
|
+
"derived_tag1" => "tag1_value_normal",
|
193
|
+
"tag2" => "tag2_value"
|
194
|
+
}
|
195
|
+
)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
end
|
200
|
+
|
105
201
|
end
|
106
202
|
|
107
203
|
end
|
@@ -44,6 +44,16 @@ describe Stemcell::MetadataSource::Configuration do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
context "when non-required options are present" do
|
48
|
+
let(:config_filename) { 'stemcell-cookbook-attribute.json' }
|
49
|
+
it "sets default_options" do
|
50
|
+
expect(config.default_options).to eql({
|
51
|
+
'instance_type' => 'm1.small',
|
52
|
+
'chef_cookbook_attributes' => ['cookbook_name::attr_file']
|
53
|
+
})
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
47
57
|
context "when defaults are not specified" do
|
48
58
|
let(:config_filename) { 'stemcell-defaults-missing.json' }
|
49
59
|
it "raises" do
|
@@ -167,7 +167,7 @@ describe Stemcell::MetadataSource do
|
|
167
167
|
|
168
168
|
it "calls the repository object to determine the role metadata" do
|
169
169
|
role_metadata.merge!('image_id' => 'ami-nyancat')
|
170
|
-
expect(chef_repo).to receive(:metadata_for_role).with(role, environment) { role_metadata }
|
170
|
+
expect(chef_repo).to receive(:metadata_for_role).with(role, environment, {}) { role_metadata }
|
171
171
|
expect(expansion['image_id']).to eql 'ami-nyancat'
|
172
172
|
end
|
173
173
|
|
@@ -227,6 +227,30 @@ describe Stemcell::MetadataSource do
|
|
227
227
|
end
|
228
228
|
end
|
229
229
|
|
230
|
+
it "calls the config object to retrieve chef cookbook attributes" do
|
231
|
+
default_options.merge!('chef_cookbook_attributes' => ['a::b'])
|
232
|
+
expect(config).to receive(:default_options) { default_options }
|
233
|
+
expect(expansion['chef_cookbook_attributes']).to eql ['a::b']
|
234
|
+
end
|
235
|
+
|
236
|
+
context 'when the override options specify chef cookbook attributes' do
|
237
|
+
let(:options) { { :cookbook_attributes => ['c::d'] } }
|
238
|
+
it 'is the value in the override options' do
|
239
|
+
default_options.merge!('chef_cookbook_attributes' => ['a::b'])
|
240
|
+
override_options.merge!('chef_cookbook_attributes' => ['c::d'])
|
241
|
+
expect(chef_repo).to receive(:metadata_for_role).with(role, environment, options) { role_metadata }
|
242
|
+
expect(expansion['chef_cookbook_attributes']).to eql ['c::d']
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
context 'when the expand options specify chef normal attributes' do
|
247
|
+
before { expand_options[:normal_attributes] = { :a => :b } }
|
248
|
+
it 'is the value in the expand options' do
|
249
|
+
expect(chef_repo).to receive(:metadata_for_role).with(role, environment, expand_options) { role_metadata }
|
250
|
+
expect(expansion).to_not be_nil
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
230
254
|
end
|
231
255
|
|
232
256
|
end
|
data/stemcell.gemspec
CHANGED
@@ -29,6 +29,8 @@ Gem::Specification.new do |s|
|
|
29
29
|
# version dependency. lets explicitly include it here. if this becomes
|
30
30
|
# no-longer a dependency of chef via chef-zero, then remove it
|
31
31
|
s.add_runtime_dependency 'rack', '< 2.0.0'
|
32
|
+
s.add_runtime_dependency 'nokogiri', '< 1.7.0'
|
33
|
+
s.add_runtime_dependency 'ffi-yajl', '< 2.3.1'
|
32
34
|
|
33
35
|
s.add_runtime_dependency 'trollop', '~> 2.1'
|
34
36
|
s.add_runtime_dependency 'aws-creds', '~> 0.2.3'
|
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.11.
|
4
|
+
version: 0.11.5
|
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:
|
14
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: aws-sdk-v1
|
@@ -69,6 +69,34 @@ dependencies:
|
|
69
69
|
- - "<"
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: 2.0.0
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: nokogiri
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 1.7.0
|
79
|
+
type: :runtime
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - "<"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 1.7.0
|
86
|
+
- !ruby/object:Gem::Dependency
|
87
|
+
name: ffi-yajl
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 2.3.1
|
93
|
+
type: :runtime
|
94
|
+
prerelease: false
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - "<"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 2.3.1
|
72
100
|
- !ruby/object:Gem::Dependency
|
73
101
|
name: trollop
|
74
102
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,6 +185,10 @@ files:
|
|
157
185
|
- lib/stemcell/option_parser.rb
|
158
186
|
- lib/stemcell/templates/bootstrap.sh.erb
|
159
187
|
- lib/stemcell/version.rb
|
188
|
+
- spec/fixtures/chef_repo/cookbooks/unit_cookbook/attributes/simple-default.rb
|
189
|
+
- spec/fixtures/chef_repo/cookbooks/unit_cookbook/attributes/simple-derived.rb
|
190
|
+
- spec/fixtures/chef_repo/cookbooks/unit_cookbook/attributes/simple-override.rb
|
191
|
+
- spec/fixtures/chef_repo/cookbooks/unit_cookbook/metadata.rb
|
160
192
|
- spec/fixtures/chef_repo/roles-expected-metadata/unit-inherit-both.json
|
161
193
|
- spec/fixtures/chef_repo/roles-expected-metadata/unit-inherit-default.json
|
162
194
|
- spec/fixtures/chef_repo/roles-expected-metadata/unit-inherit-none.json
|
@@ -176,6 +208,7 @@ files:
|
|
176
208
|
- spec/fixtures/chef_repo/stemcell-azs-missing.json
|
177
209
|
- spec/fixtures/chef_repo/stemcell-backing-store-empty.json
|
178
210
|
- spec/fixtures/chef_repo/stemcell-backing-store-missing.json
|
211
|
+
- spec/fixtures/chef_repo/stemcell-cookbook-attribute.json
|
179
212
|
- spec/fixtures/chef_repo/stemcell-defaults-missing.json
|
180
213
|
- spec/fixtures/chef_repo/stemcell.json
|
181
214
|
- spec/lib/stemcell/launcher_spec.rb
|
@@ -206,11 +239,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
239
|
version: '0'
|
207
240
|
requirements: []
|
208
241
|
rubyforge_project:
|
209
|
-
rubygems_version: 2.5.
|
242
|
+
rubygems_version: 2.5.2
|
210
243
|
signing_key:
|
211
244
|
specification_version: 4
|
212
245
|
summary: no summary
|
213
246
|
test_files:
|
247
|
+
- spec/fixtures/chef_repo/cookbooks/unit_cookbook/attributes/simple-default.rb
|
248
|
+
- spec/fixtures/chef_repo/cookbooks/unit_cookbook/attributes/simple-derived.rb
|
249
|
+
- spec/fixtures/chef_repo/cookbooks/unit_cookbook/attributes/simple-override.rb
|
250
|
+
- spec/fixtures/chef_repo/cookbooks/unit_cookbook/metadata.rb
|
214
251
|
- spec/fixtures/chef_repo/roles-expected-metadata/unit-inherit-both.json
|
215
252
|
- spec/fixtures/chef_repo/roles-expected-metadata/unit-inherit-default.json
|
216
253
|
- spec/fixtures/chef_repo/roles-expected-metadata/unit-inherit-none.json
|
@@ -230,6 +267,7 @@ test_files:
|
|
230
267
|
- spec/fixtures/chef_repo/stemcell-azs-missing.json
|
231
268
|
- spec/fixtures/chef_repo/stemcell-backing-store-empty.json
|
232
269
|
- spec/fixtures/chef_repo/stemcell-backing-store-missing.json
|
270
|
+
- spec/fixtures/chef_repo/stemcell-cookbook-attribute.json
|
233
271
|
- spec/fixtures/chef_repo/stemcell-defaults-missing.json
|
234
272
|
- spec/fixtures/chef_repo/stemcell.json
|
235
273
|
- spec/lib/stemcell/launcher_spec.rb
|