build-cloud 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/build-cloud.gemspec +1 -1
- data/lib/build-cloud.rb +5 -8
- data/lib/build-cloud/iamrole.rb +4 -3
- 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: 5ce7d885b72b7593b17233987dc7c3324654df41
|
4
|
+
data.tar.gz: 7efd51bc6a75e8a0f3261ea841a4a5137f9acdbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35cb9ddcce62def01bf5d1f1dbd4f1c34a07f1135e78aaa334449471e96ebc2f754465f385725716cb10b421feb2205a39e9b6c316dbcff1b1f100c06c89f7ac
|
7
|
+
data.tar.gz: ecedfa232cedb594acd795d2f0ed12a45159743689cdeea9c7ec8620e78254131a3fd8a3c89e1a4cd21f0d6ec1cd8062a89ff93fa43da0e4f603891b3071a93c
|
data/build-cloud.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "build-cloud"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.11"
|
8
8
|
spec.authors = ["The Scale Factory"]
|
9
9
|
spec.email = ["info@scalefactory.com"]
|
10
10
|
spec.summary = %q{Tools for building resources in AWS}
|
data/lib/build-cloud.rb
CHANGED
@@ -245,26 +245,23 @@ class BuildCloud
|
|
245
245
|
|
246
246
|
@mock and Fog.mock!
|
247
247
|
|
248
|
-
|
248
|
+
fog_options_regionless = {
|
249
249
|
:aws_access_key_id => @config[:aws_access_key_id] ||= ENV['AWS_ACCESS_KEY'],
|
250
250
|
:aws_secret_access_key => @config[:aws_secret_access_key] ||= ENV['AWS_SECRET_KEY'],
|
251
|
-
:region => @config[:aws_region],
|
252
251
|
}
|
253
252
|
|
253
|
+
fog_options = fog_options_regionless.merge( { :region => @config[:aws_region] } )
|
254
|
+
|
254
255
|
@fog_interfaces = {
|
255
256
|
|
256
257
|
:compute => Fog::Compute::AWS.new( fog_options ),
|
257
258
|
:s3 => Fog::Storage::AWS.new( fog_options ),
|
258
259
|
:as => Fog::AWS::AutoScaling.new( fog_options ),
|
259
260
|
:elb => Fog::AWS::ELB.new( fog_options ),
|
260
|
-
:iam => Fog::AWS::IAM.new(
|
261
|
+
:iam => Fog::AWS::IAM.new( fog_options_regionless ),
|
261
262
|
:rds => Fog::AWS::RDS.new( fog_options ),
|
262
263
|
:elasticache => Fog::AWS::Elasticache.new( fog_options ),
|
263
|
-
:r53 => Fog::DNS::AWS.new(
|
264
|
-
:aws_access_key_id => @config[:aws_access_key_id] ||= ENV['AWS_ACCESS_KEY'],
|
265
|
-
:aws_secret_access_key => @config[:aws_secret_access_key] ||= ENV['AWS_SECRET_KEY'],
|
266
|
-
)
|
267
|
-
|
264
|
+
:r53 => Fog::DNS::AWS.new( fog_options_regionless )
|
268
265
|
}
|
269
266
|
|
270
267
|
end
|
data/lib/build-cloud/iamrole.rb
CHANGED
@@ -36,6 +36,8 @@ class BuildCloud::IAMRole
|
|
36
36
|
|
37
37
|
@log.debug( role.inspect )
|
38
38
|
|
39
|
+
@iam.create_instance_profile( @options[:rolename] )
|
40
|
+
|
39
41
|
policies.each do |policy|
|
40
42
|
|
41
43
|
@log.debug( "Adding policy #{policy}" )
|
@@ -45,11 +47,10 @@ class BuildCloud::IAMRole
|
|
45
47
|
@iam.put_role_policy( @options[:rolename], policy[:policy_name],
|
46
48
|
policy_document )
|
47
49
|
|
48
|
-
@iam.create_instance_profile( @options[:rolename] )
|
49
|
-
@iam.add_role_to_instance_profile( @options[:rolename], @options[:rolename] )
|
50
|
-
|
51
50
|
end
|
52
51
|
|
52
|
+
@iam.add_role_to_instance_profile( @options[:rolename], @options[:rolename] )
|
53
|
+
|
53
54
|
end
|
54
55
|
|
55
56
|
def read
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Scale Factory
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|