build-cloud 0.0.11 → 0.0.12
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/README.md +4 -0
- data/bin/build-cloud +4 -3
- data/build-cloud.gemspec +1 -1
- data/lib/build-cloud.rb +1 -1
- data/lib/build-cloud/networkinterface.rb +12 -7
- 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: 72245a7b0957d72c26f62ede91be794720d3ba03
|
4
|
+
data.tar.gz: 71459cd2a0588ef2bea38220abbef0fa972b9f9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9143dd5d438d7a701d78916678bde29efcc604e244d946df970085289c0c4600a66674de73179c1d8694ba93e08b7550bdb830f50079cdd4b5aa2155655f4056
|
7
|
+
data.tar.gz: 3f253ebf2b891078e41250cd4d2b02f6faf77474404ecb3cfa14602c55b032fc85a58cab91c9f09e6fd6516b2a64377743c951e4c462df86a2e5e08b662d50f5
|
data/README.md
CHANGED
@@ -22,6 +22,10 @@ See the command line help for `build-cloud`.
|
|
22
22
|
|
23
23
|
## Changelog
|
24
24
|
|
25
|
+
2015-08-24 - version 0.0.12 - adds support for tagging network interfaces, permits multiple config files to be passed on the commandline, fixes a bug with S3 buckets named to contain dots.
|
26
|
+
|
27
|
+
2015-05-18 - version 0.0.11 - fixed problems with IAM roles
|
28
|
+
|
25
29
|
2015-04-14 - version 0.0.10 - adds "lifecycle" functionality for security groups. Existing security groups will now have rules removed from them or added to them to make AWS reflect the YAML passed to build-cloud. Previously, once a security group had been created by build-cloud, it was never subsequently updated.
|
26
30
|
|
27
31
|
2014-12-12 - version 0.0.9 - bugfixes to file path resolution. It is worth noting that when multiple files are passed to `--config` they're treated as relative to the CWD - this is what you'd expect from referencing a file in a command line option. When file(s) are specified in an `:include` key in the given YAML file, relative paths given there are considered to be relative to the location of the YAML file given to `--config` - this is to ensure consistent behaviour regardless of what $CWD is when calling build-cloud.
|
data/bin/build-cloud
CHANGED
@@ -34,9 +34,10 @@ require 'build-cloud/dhcpoptionsset'
|
|
34
34
|
options = {}
|
35
35
|
optparse = OptionParser.new do |opts|
|
36
36
|
|
37
|
-
options[:config] =
|
37
|
+
options[:config] = []
|
38
38
|
opts.on('-c', '--config file1,file2', Array, 'Config files - second and subsequent files merged into first.') do |c|
|
39
|
-
options[:config]
|
39
|
+
options[:config] << c
|
40
|
+
options[:config].flatten!
|
40
41
|
end
|
41
42
|
|
42
43
|
options[:debug] = false
|
@@ -92,7 +93,7 @@ begin
|
|
92
93
|
|
93
94
|
optparse.parse!
|
94
95
|
|
95
|
-
if options[:config].
|
96
|
+
if options[:config].empty?
|
96
97
|
raise OptionParser::MissingArgument, "--config"
|
97
98
|
end
|
98
99
|
|
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.12"
|
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
@@ -255,7 +255,7 @@ class BuildCloud
|
|
255
255
|
@fog_interfaces = {
|
256
256
|
|
257
257
|
:compute => Fog::Compute::AWS.new( fog_options ),
|
258
|
-
:s3 => Fog::Storage::AWS.new( fog_options ),
|
258
|
+
:s3 => Fog::Storage::AWS.new( fog_options.merge(:path_style => true)),
|
259
259
|
:as => Fog::AWS::AutoScaling.new( fog_options ),
|
260
260
|
:elb => Fog::AWS::ELB.new( fog_options ),
|
261
261
|
:iam => Fog::AWS::IAM.new( fog_options_regionless ),
|
@@ -66,16 +66,22 @@ class BuildCloud::NetworkInterface
|
|
66
66
|
options[:description] = options[:name]
|
67
67
|
options.delete(:name)
|
68
68
|
|
69
|
+
tags = options[:tags]
|
70
|
+
options.delete(:tags)
|
71
|
+
|
69
72
|
interface = @compute.network_interfaces.new(options)
|
70
73
|
interface.save
|
71
74
|
wait_until_ready
|
72
75
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
tags.merge!({'Name' => options[:description]})
|
77
|
+
tags.each do |k,v|
|
78
|
+
attributes = {}
|
79
|
+
attributes[:resource_id] = interface.network_interface_id
|
80
|
+
attributes[:key] = k
|
81
|
+
attributes[:value] = v
|
82
|
+
interface_tag = @compute.tags.new(attributes)
|
83
|
+
interface_tag.save
|
84
|
+
end
|
79
85
|
|
80
86
|
if options[:assign_new_public_ip] and ! options[:existing_public_ip].nil?
|
81
87
|
raise "Cannot specifiy both new and existing IP addresses"
|
@@ -105,7 +111,6 @@ class BuildCloud::NetworkInterface
|
|
105
111
|
end
|
106
112
|
|
107
113
|
@log.debug( interface.inspect )
|
108
|
-
@log.debug( interface_tag.inspect )
|
109
114
|
@log.debug( ip.inspect ) unless ! options[:assign_new_public_ip]
|
110
115
|
@log.debug( ip.inspect ) unless options[:existing_public_ip].nil?
|
111
116
|
|
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.12
|
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-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|