sfn 3.0.0 → 3.0.2
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/CHANGELOG.md +5 -0
- data/README.md +4 -2
- data/lib/sfn/command/conf.rb +5 -1
- data/lib/sfn/command/update.rb +1 -1
- data/lib/sfn/command_module/template.rb +14 -14
- data/lib/sfn/planner/aws.rb +2 -2
- data/lib/sfn/version.rb +1 -1
- 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: ff21ffb339f3f1e06331e13f7766efc450968c8d
|
4
|
+
data.tar.gz: 80fad1d08580b2d49cd5d8b78faf863cd81675b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f292c003150464857fa0ce03605704d67a27f5d7f867d23fe9c4ac839c2797ed18e325bb85b393ce6f379b4c41087bb738ce4fa2b8f8b60256c4c7f7a34730c
|
7
|
+
data.tar.gz: 18c983f3de8d5319be07f723e10e7cfde201e2330b03508b3cba6af0b81f0b27f7ee0c937c64f456c7f0b48a55772e7af65802faf95126eb0b4f1c614f045329
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# v3.0.2
|
2
|
+
* [fix] Properly scrub nested stack pseudo property on update (#189)
|
3
|
+
* [fix] Process nested stacks before removal within AWS planner (#190)
|
4
|
+
* [enhancement] Add configuration options for Google cloud (#188)
|
5
|
+
|
1
6
|
# v3.0.0
|
2
7
|
_Major release includes breaking changes!_
|
3
8
|
* [feature] Add support for Google Cloud Deployment Manager (#181)
|
data/README.md
CHANGED
data/lib/sfn/command/conf.rb
CHANGED
@@ -81,7 +81,7 @@ Configuration.new do
|
|
81
81
|
# nesting_prefix 'nested-templates'
|
82
82
|
# Remote provider credentials
|
83
83
|
credentials do
|
84
|
-
# Remote provider name (:aws, :azure, :open_stack, :rackspace)
|
84
|
+
# Remote provider name (:aws, :azure, :google, :open_stack, :rackspace)
|
85
85
|
provider :aws
|
86
86
|
# AWS credentials information
|
87
87
|
aws_access_key_id ENV['AWS_ACCESS_KEY_ID']
|
@@ -117,6 +117,10 @@ Configuration.new do
|
|
117
117
|
rackspace_api_key ENV['RACKSPACE_API_KEY']
|
118
118
|
rackspace_username ENV['RACKSPACE_USERNAME']
|
119
119
|
rackspace_region ENV['RACKSPACE_REGION']
|
120
|
+
# Google Cloud Deployment Manager credentials
|
121
|
+
google_service_account_email ENV['GOOGLE_SERVICE_ACCOUNT_EMAIL']
|
122
|
+
google_service_account_private_key ENV['GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY']
|
123
|
+
google_project ENV['GOOGLE_PROJECT']
|
120
124
|
end
|
121
125
|
end
|
122
126
|
EOF
|
data/lib/sfn/command/update.rb
CHANGED
@@ -274,7 +274,7 @@ module Sfn
|
|
274
274
|
if(diff[:updated].nil?)
|
275
275
|
ui.puts
|
276
276
|
else
|
277
|
-
ui.puts ui.color("+#{diff[:updated]}", :green)
|
277
|
+
ui.puts ui.color("+#{diff[:updated].to_s.gsub('__MODIFIED_REFERENCE_VALUE__', '<Dependency Modified>')}", :green)
|
278
278
|
end
|
279
279
|
end
|
280
280
|
end
|
@@ -312,13 +312,13 @@ module Sfn
|
|
312
312
|
|
313
313
|
# Extract currently defined parameters for nested template
|
314
314
|
#
|
315
|
-
# @param
|
315
|
+
# @param template [SparkleFormation]
|
316
316
|
# @param stack_name [String]
|
317
317
|
# @param c_stack [Miasma::Models::Orchestration::Stack]
|
318
318
|
# @return [Hash]
|
319
|
-
def extract_current_nested_template_parameters(
|
320
|
-
if(
|
321
|
-
current_parameters =
|
319
|
+
def extract_current_nested_template_parameters(template, stack_name, c_stack=nil)
|
320
|
+
if(template.parent)
|
321
|
+
current_parameters = template.parent.compile.resources.set!(stack_name).properties.parameters
|
322
322
|
current_parameters.nil? ? Smash.new : current_parameters._dump
|
323
323
|
else
|
324
324
|
Smash.new
|
@@ -328,11 +328,11 @@ module Sfn
|
|
328
328
|
# Store template in remote bucket and update given result hash
|
329
329
|
#
|
330
330
|
# @param full_stack_name [String] unique resource name for template
|
331
|
-
# @param
|
331
|
+
# @param template [SparkleFormation, Hash] template instance
|
332
332
|
# @param result [Hash]
|
333
333
|
# @return [Hash]
|
334
|
-
def store_template(full_stack_name,
|
335
|
-
stack_definition =
|
334
|
+
def store_template(full_stack_name, template, result)
|
335
|
+
stack_definition = template.is_a?(SparkleFormation) ? dump_stack_for_storage(template) : template
|
336
336
|
bucket = provider.connection.api_for(:storage).buckets.get(
|
337
337
|
config[:nesting_bucket]
|
338
338
|
)
|
@@ -352,16 +352,16 @@ module Sfn
|
|
352
352
|
# Remove internally used `Stack` property from Stack resources and
|
353
353
|
# and generate compiled Hash
|
354
354
|
#
|
355
|
-
# @param
|
355
|
+
# @param template [SparkleFormation]
|
356
356
|
# @return [Hash]
|
357
|
-
def dump_stack_for_storage(
|
358
|
-
nested_stacks =
|
359
|
-
[nested_resource
|
357
|
+
def dump_stack_for_storage(template)
|
358
|
+
nested_stacks = template.nested_stacks(:with_resource, :with_name).map do |nested_stack, nested_resource, nested_name|
|
359
|
+
[nested_name, nested_resource, nested_resource.properties.delete!(:stack)]
|
360
360
|
end
|
361
|
-
stack_definition =
|
361
|
+
stack_definition = template.dump
|
362
362
|
if(config[:plan])
|
363
|
-
nested_stacks.each do |nested_name, nested_data|
|
364
|
-
|
363
|
+
nested_stacks.each do |nested_name, nested_resource, nested_data|
|
364
|
+
nested_resource.properties.set!(:stack, nested_data)
|
365
365
|
end
|
366
366
|
end
|
367
367
|
stack_definition
|
data/lib/sfn/planner/aws.rb
CHANGED
@@ -272,10 +272,10 @@ module Sfn
|
|
272
272
|
end
|
273
273
|
new_parameters.merge!(get_global_parameters(stack))
|
274
274
|
new_template_hash = new_template.to_smash
|
275
|
-
scrub_stack_properties(new_template_hash)
|
276
275
|
|
277
276
|
plan_nested_stacks(stack, translator, origin_template, new_template_hash, plan_results)
|
278
277
|
|
278
|
+
scrub_stack_properties(new_template_hash)
|
279
279
|
update_template = dereference_template(
|
280
280
|
t_key, new_template_hash, new_parameters,
|
281
281
|
plan_results[:replace].keys + plan_results[:unavailable].keys
|
@@ -315,7 +315,7 @@ module Sfn
|
|
315
315
|
stk.data[:logical_id] == stack_name
|
316
316
|
end
|
317
317
|
new_stack_exists = is_stack?(new_template_hash.get('Resources', stack_name, 'Type'))
|
318
|
-
new_stack_template = new_template_hash.
|
318
|
+
new_stack_template = new_template_hash.fetch('Resources', stack_name, 'Properties', 'Stack', Smash.new)
|
319
319
|
new_stack_parameters = new_stack_template.fetch('Parameters', Smash.new)
|
320
320
|
new_stack_type = new_template_hash.fetch('Resources', stack_name, 'Type',
|
321
321
|
origin_template.get('Resources', stack_name, 'Type')
|
data/lib/sfn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bogo-cli
|