elasticity 5.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +9 -1
- data/README.md +2 -0
- data/lib/elasticity/job_flow.rb +2 -0
- data/lib/elasticity/version.rb +1 -1
- data/spec/lib/elasticity/job_flow_spec.rb +35 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 214e0a6224f1c25d0cab456008171d242f5b2cb6
|
4
|
+
data.tar.gz: 417acbc3a8b312eabea4a86d4db2b1b9f726e8fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 856569d07a95865b11b3d54ebbbdad531b646200fd1df2eb609b75f408eb1be2d1b2eae0bc5625da1a222ebfed5c0e8b4eefc54dd36a4df0e66f0f43f290e5b3
|
7
|
+
data.tar.gz: c46610d0917cd5089dccc6aa8712007d536b3a3ed5f94acb8cc7328a4c07e218efe3000c26f32508a03dae53ca28b98eae9b8de2df8d65e2d363e8bb4ac0ea06
|
data/HISTORY.md
CHANGED
@@ -1,10 +1,18 @@
|
|
1
|
-
## 5.0 -
|
1
|
+
## 5.0.1 - April 12, 2015
|
2
|
+
|
3
|
+
- Bear with me here :) Backmerged into 4.0.4 to add [IAM Service Role support](http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-iam-roles-creatingroles.html) per @alexanderdean. As part of the forward merge, bumping the version to trigger an update.
|
4
|
+
|
5
|
+
## 5.0 - March 28, 2015
|
2
6
|
|
3
7
|
- Major version bump as there are language support implications.
|
4
8
|
- Now supporting only the latest version of the 2.x minors (e.g. 2.0.x, 2.1.x, etc.) versus specific minor-minor releases. This was an oversight on my part in how I both configured Travis and communicated support for the 2.x line.
|
5
9
|
- Removed support for Ruby 1.9.3 as it has been [unsupported since 2/23/2015](https://www.ruby-lang.org/en/news/2014/01/10/ruby-1-9-3-will-end-on-2015/).
|
6
10
|
- Removed "support" for JRuby. It was in poor form that I originally claimed to support JRuby as I do not have the time to dedicate to such an endeavor. Compatibility is merely coincidental and it would not be responsible for me to continue communicating ongoing support when that is not my intention. Apologies to those this may inconvenience.
|
7
11
|
|
12
|
+
## 4.0.5 - April 9, 2015
|
13
|
+
|
14
|
+
- Thanks to @alexanderdean, pull request [#82](https://github.com/rslifka/elasticity/pull/82) adds support for profile roles.
|
15
|
+
|
8
16
|
## 4.0.4 - November 20, 2014
|
9
17
|
|
10
18
|
- Thanks to @jshafton, pull request [#79](https://github.com/rslifka/elasticity/pull/79) adds support for job flow roles.
|
data/README.md
CHANGED
@@ -106,6 +106,8 @@ jobflow.name = 'Elasticity Job Flow'
|
|
106
106
|
|
107
107
|
# For new AWS accounts, this is required to be set
|
108
108
|
jobflow.ec2_subnet_id = nil
|
109
|
+
jobflow.jobflow_role = nil
|
110
|
+
jobflow.service_role = nil
|
109
111
|
|
110
112
|
jobflow.action_on_failure = 'TERMINATE_JOB_FLOW'
|
111
113
|
jobflow.keep_job_flow_alive_when_no_steps = false
|
data/lib/elasticity/job_flow.rb
CHANGED
@@ -23,6 +23,7 @@ module Elasticity
|
|
23
23
|
attr_accessor :visible_to_all_users
|
24
24
|
attr_accessor :enable_debugging
|
25
25
|
attr_accessor :job_flow_role
|
26
|
+
attr_accessor :service_role
|
26
27
|
|
27
28
|
attr_reader :access_key
|
28
29
|
attr_reader :secret_key
|
@@ -187,6 +188,7 @@ module Elasticity
|
|
187
188
|
config[:steps] = steps
|
188
189
|
config[:log_uri] = @log_uri if @log_uri
|
189
190
|
config[:job_flow_role] = @job_flow_role if @job_flow_role
|
191
|
+
config[:service_role] = @service_role if @service_role
|
190
192
|
config[:bootstrap_actions] = @bootstrap_actions.map{|a| a.to_aws_bootstrap_action} unless @bootstrap_actions.empty?
|
191
193
|
config
|
192
194
|
end
|
data/lib/elasticity/version.rb
CHANGED
@@ -4,22 +4,25 @@ describe Elasticity::JobFlow do
|
|
4
4
|
Elasticity::JobFlow.new('access', 'secret')
|
5
5
|
end
|
6
6
|
|
7
|
-
its(:access_key) { should == 'access' }
|
8
|
-
its(:secret_key) { should == 'secret' }
|
9
7
|
its(:action_on_failure) { should == 'TERMINATE_JOB_FLOW' }
|
10
8
|
its(:ec2_key_name) { should == nil }
|
11
|
-
its(:
|
9
|
+
its(:name) { should == 'Elasticity Job Flow' }
|
12
10
|
its(:instance_count) { should == 2 }
|
13
11
|
its(:log_uri) { should == nil }
|
14
12
|
its(:master_instance_type) { should == 'm1.small' }
|
15
|
-
its(:name) { should == 'Elasticity Job Flow' }
|
16
13
|
its(:slave_instance_type) { should == 'm1.small' }
|
17
14
|
its(:ami_version) { should == 'latest' }
|
18
15
|
its(:keep_job_flow_alive_when_no_steps) { should == false }
|
16
|
+
its(:ec2_subnet_id) { should == nil }
|
19
17
|
its(:placement) { should == 'us-east-1a' }
|
18
|
+
its(:region) { should == 'us-east-1' }
|
20
19
|
its(:visible_to_all_users) { should == false }
|
21
20
|
its(:enable_debugging) { should == false }
|
22
|
-
its(:
|
21
|
+
its(:job_flow_role) { should == nil }
|
22
|
+
its(:service_role) { should == nil }
|
23
|
+
|
24
|
+
its(:access_key) { should == 'access' }
|
25
|
+
its(:secret_key) { should == 'secret' }
|
23
26
|
|
24
27
|
describe '.initialize' do
|
25
28
|
it 'should set the access and secret keys to nil by default' do
|
@@ -357,7 +360,7 @@ describe Elasticity::JobFlow do
|
|
357
360
|
end
|
358
361
|
end
|
359
362
|
|
360
|
-
context 'when a
|
363
|
+
context 'when a job flow role is not specified' do
|
361
364
|
let(:jobflow_with_no_job_flow_role) do
|
362
365
|
Elasticity::JobFlow.new('_', '_').tap do |jf|
|
363
366
|
jf.job_flow_role = nil
|
@@ -370,6 +373,32 @@ describe Elasticity::JobFlow do
|
|
370
373
|
|
371
374
|
end
|
372
375
|
|
376
|
+
describe 'service role' do
|
377
|
+
|
378
|
+
context 'when a service role is specified' do
|
379
|
+
let(:jobflow_with_service_role) do
|
380
|
+
Elasticity::JobFlow.new('_', '_').tap do |jf|
|
381
|
+
jf.service_role = 'SERVICE_ROLE'
|
382
|
+
end
|
383
|
+
end
|
384
|
+
it 'should incorporate it into the jobflow config' do
|
385
|
+
jobflow_with_service_role.send(:jobflow_config).should be_a_hash_including({:service_role => 'SERVICE_ROLE'})
|
386
|
+
end
|
387
|
+
end
|
388
|
+
|
389
|
+
context 'when a service role is not specified' do
|
390
|
+
let(:jobflow_with_no_service_role) do
|
391
|
+
Elasticity::JobFlow.new('_', '_').tap do |jf|
|
392
|
+
jf.service_role = nil
|
393
|
+
end
|
394
|
+
end
|
395
|
+
it 'should not make space for it in the jobflow config' do
|
396
|
+
jobflow_with_no_service_role.send(:jobflow_config).should_not have_key(:service_role)
|
397
|
+
end
|
398
|
+
end
|
399
|
+
|
400
|
+
end
|
401
|
+
|
373
402
|
describe 'bootstrap actions' do
|
374
403
|
|
375
404
|
context 'when bootstrap actions are specified' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Slifka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|