ufo 6.3.9 → 6.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/CHANGELOG.md +9 -0
- data/lib/ufo/cfn/stack/builder/resources/ecs_service.rb +6 -1
- data/lib/ufo/cfn/stack/builder/resources/elb.rb +1 -1
- data/lib/ufo/cfn/stack/builder/resources/listener.rb +3 -2
- data/lib/ufo/cfn/stack/builder/resources/listener_ssl.rb +5 -1
- data/lib/ufo/cfn/stack/builder/resources/target_group.rb +6 -1
- data/lib/ufo/cfn/stack/vars.rb +5 -0
- data/lib/ufo/cfn/stack.rb +23 -0
- data/lib/ufo/config.rb +6 -0
- data/lib/ufo/task_definition/erb.rb +1 -1
- data/lib/ufo/task_definition/helpers/stack_output.rb +1 -0
- data/lib/ufo/version.rb +1 -1
- data/lib/ufo/yaml.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96dbe1f1087d3b65bc76c0cc1372429ea662eb75d91d9b3942c0e27a49809531
|
4
|
+
data.tar.gz: e427dd248adee498f897614b5dace90fa5b61ddda04a86ad7ef6990ab87c790c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32763a18f438116170d9a3d2f7b7e45c6eb3f50ceeb2f714a49412eaf9aa236870c36d0e81b9c8242ef2f35ba01db429b0d12930613e65c093abd4b7ad15a35a
|
7
|
+
data.tar.gz: 3f9aa0e0724e55d4eb79432c7752ddb70d98081bcaea516761652afae0d6ce2b90385f6fa8515acd07335f179498a026e7b7bb990a4d29d11b030325d0d7687f
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
github: boltops-tools
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,15 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [6.3.12] - 2022-07-11
|
7
|
+
- [#179](https://github.com/tongueroo/ufo/pull/179) auto continue_update_rollback and retry once
|
8
|
+
|
9
|
+
## [6.3.11] - 2022-07-09
|
10
|
+
- [#178](https://github.com/tongueroo/ufo/pull/178) use .ufo/tmp folder instead of /tmp/ufo
|
11
|
+
|
12
|
+
## [6.3.10] - 2022-06-23
|
13
|
+
- [#177](https://github.com/tongueroo/ufo/pull/177) Enabled support for gRPC
|
14
|
+
|
6
15
|
## [6.3.9] - 2022-05-09
|
7
16
|
- [#175](https://github.com/tongueroo/ufo/pull/175) Secrets autofix and add missing trailing ::
|
8
17
|
- new env_file
|
@@ -6,11 +6,16 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
6
6
|
Properties: properties
|
7
7
|
}
|
8
8
|
|
9
|
-
attrs[:DependsOn] =
|
9
|
+
attrs[:DependsOn] = depends_on
|
10
10
|
|
11
11
|
attrs
|
12
12
|
end
|
13
13
|
|
14
|
+
def depends_on
|
15
|
+
return unless vars[:create_elb]
|
16
|
+
vars[:create_listener] ? "Listener" : "ListenerSsl"
|
17
|
+
end
|
18
|
+
|
14
19
|
def properties
|
15
20
|
props = {
|
16
21
|
Cluster: @cluster,
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class Ufo::Cfn::Stack::Builder::Resources
|
2
2
|
class Listener < Base
|
3
3
|
def build
|
4
|
+
return unless vars[:create_listener]
|
4
5
|
{
|
5
6
|
Type: "AWS::ElasticLoadBalancingV2::Listener",
|
6
7
|
Condition: "CreateElbIsTrue",
|
@@ -18,11 +19,11 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def protocol
|
21
|
-
vars[:default_listener_protocol]
|
22
|
+
Ufo.config.elb.protocol || vars[:default_listener_protocol]
|
22
23
|
end
|
23
24
|
|
24
25
|
def port
|
25
|
-
|
26
|
+
Ufo.config.elb.port
|
26
27
|
end
|
27
28
|
|
28
29
|
def default_actions
|
@@ -2,7 +2,11 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
2
2
|
class ListenerSsl < Listener
|
3
3
|
def build
|
4
4
|
return unless vars[:create_listener_ssl]
|
5
|
-
|
5
|
+
{
|
6
|
+
Type: "AWS::ElasticLoadBalancingV2::Listener",
|
7
|
+
Condition: "CreateElbIsTrue",
|
8
|
+
Properties: properties,
|
9
|
+
}
|
6
10
|
end
|
7
11
|
|
8
12
|
def properties
|
@@ -18,7 +18,6 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
18
18
|
}
|
19
19
|
],
|
20
20
|
Protocol: vars[:default_target_group_protocol],
|
21
|
-
Port: 80,
|
22
21
|
HealthCheckIntervalSeconds: 10,
|
23
22
|
HealthyThresholdCount: 2,
|
24
23
|
UnhealthyThresholdCount: 2,
|
@@ -36,6 +35,9 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
36
35
|
props[:HealthCheckIntervalSeconds] = health_check_interval_seconds
|
37
36
|
props[:HealthyThresholdCount] = healthy_threshold_count
|
38
37
|
props[:UnhealthyThresholdCount] = unhealthy_threshold_count
|
38
|
+
props[:Matcher] = matcher
|
39
|
+
props[:ProtocolVersion] = protocol_version
|
40
|
+
props[:Port] = port
|
39
41
|
|
40
42
|
props
|
41
43
|
end
|
@@ -45,6 +47,9 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
45
47
|
health_check_path
|
46
48
|
healthy_threshold_count
|
47
49
|
unhealthy_threshold_count
|
50
|
+
matcher
|
51
|
+
protocol_version
|
52
|
+
port
|
48
53
|
]
|
49
54
|
delegate *meths, to: :elb
|
50
55
|
def elb
|
data/lib/ufo/cfn/stack/vars.rb
CHANGED
@@ -8,6 +8,7 @@ class Ufo::Cfn::Stack
|
|
8
8
|
cluster: @cluster,
|
9
9
|
container: container,
|
10
10
|
create_elb: create_elb?, # helps set Ecs DependsOn
|
11
|
+
create_listener: create_listener?,
|
11
12
|
create_listener_ssl: create_listener_ssl?,
|
12
13
|
create_route53: create_route53?,
|
13
14
|
default_listener_protocol: default_listener_protocol,
|
@@ -58,6 +59,10 @@ class Ufo::Cfn::Stack
|
|
58
59
|
elb_type == 'network' ? 'TCP' : 'HTTP'
|
59
60
|
end
|
60
61
|
|
62
|
+
def create_listener?
|
63
|
+
Ufo.config.elb.listener.enabled
|
64
|
+
end
|
65
|
+
|
61
66
|
# if the configuration is set to anything then enable it
|
62
67
|
def create_listener_ssl?
|
63
68
|
elb = Ufo.config.elb
|
data/lib/ufo/cfn/stack.rb
CHANGED
@@ -55,9 +55,32 @@ module Ufo::Cfn
|
|
55
55
|
logger.info "#{action[0..-2].capitalize}ing stack #{@stack_name.color(:green)}"
|
56
56
|
cfn.send("#{action}_stack", stack_options) # Example: cfn.send("update_stack", stack_options)
|
57
57
|
rescue Aws::CloudFormation::Errors::ValidationError => e
|
58
|
+
try_continue_update_rollback = continue_update_rollback(e)
|
59
|
+
try_continue_update_rollback && retry
|
58
60
|
handle_stack_error(e)
|
59
61
|
end
|
60
62
|
|
63
|
+
# Super edge case where stack is in UPDATE_ROLLBACK_FAILED. Can reproduce by:
|
64
|
+
#
|
65
|
+
# 1. spinning ECS cluster down to 0 and deploying with ufo ship
|
66
|
+
# 2. after 3h will timeout and fail and goes into UPDATE_ROLLBACK_FAILED
|
67
|
+
#
|
68
|
+
# Screenshot: https://capture.dropbox.com/Pdr8gijnaQvoMp2y
|
69
|
+
#
|
70
|
+
# Will auto-retry once
|
71
|
+
#
|
72
|
+
def continue_update_rollback(e)
|
73
|
+
if e.message.include?('UPDATE_ROLLBACK_FAILED') && !@continue_update_rollback_tried
|
74
|
+
logger.info "Stack in UPDATE_ROLLBACK_FAILED"
|
75
|
+
logger.info "Trying a continue_update_rollback and will retry again once"
|
76
|
+
cfn.continue_update_rollback(stack_name: @stack_name)
|
77
|
+
status.wait
|
78
|
+
@continue_update_rollback_tried ||= true
|
79
|
+
else
|
80
|
+
false
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
61
84
|
def stack_options
|
62
85
|
options = {
|
63
86
|
capabilities: ["CAPABILITY_IAM", "CAPABILITY_NAMED_IAM"],
|
data/lib/ufo/config.rb
CHANGED
@@ -72,12 +72,18 @@ module Ufo
|
|
72
72
|
config.elb.healthy_threshold_count = 3 # The AWS usual default is 5
|
73
73
|
config.elb.unhealthy_threshold_count = 3
|
74
74
|
|
75
|
+
config.elb.listener = ActiveSupport::OrderedOptions.new
|
76
|
+
config.elb.listener.enabled = true
|
77
|
+
config.elb.matcher = nil
|
75
78
|
config.elb.port = 80 # default listener port
|
79
|
+
config.elb.protocol = nil
|
80
|
+
config.elb.protocol_version = nil
|
76
81
|
config.elb.redirect = ActiveSupport::OrderedOptions.new
|
77
82
|
config.elb.redirect.code = 302 # IE: 302 or 301
|
78
83
|
config.elb.redirect.enabled = false
|
79
84
|
config.elb.redirect.port = 443
|
80
85
|
config.elb.redirect.protocol = "HTTPS"
|
86
|
+
config.elb.scheme = "internet-facing"
|
81
87
|
config.elb.ssl = ActiveSupport::OrderedOptions.new
|
82
88
|
config.elb.ssl.certificates = nil
|
83
89
|
config.elb.ssl.enabled = false
|
@@ -41,7 +41,7 @@ class Ufo::TaskDefinition
|
|
41
41
|
def evaluate_code
|
42
42
|
path = @task_definition.path
|
43
43
|
text = RenderMePretty.result(path, context: self)
|
44
|
-
rendered_path = "/tmp/
|
44
|
+
rendered_path = "#{Ufo.root}/.ufo/tmp/task_definition#{File.extname(path)}"
|
45
45
|
FileUtils.mkdir_p(File.dirname(rendered_path))
|
46
46
|
IO.write(rendered_path, text)
|
47
47
|
|
data/lib/ufo/version.rb
CHANGED
data/lib/ufo/yaml.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ufo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.3.
|
4
|
+
version: 6.3.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-logs
|
@@ -460,6 +460,7 @@ files:
|
|
460
460
|
- ".cody/acceptance/project.rb"
|
461
461
|
- ".cody/shared/script/install.sh"
|
462
462
|
- ".cody/shared/script/install/ufo.sh"
|
463
|
+
- ".github/FUNDING.yml"
|
463
464
|
- ".github/ISSUE_TEMPLATE.md"
|
464
465
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
465
466
|
- ".github/ISSUE_TEMPLATE/documentation.md"
|