cfn_manage 0.8.0 → 0.8.1
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/lib/cfn_manage/cf_start_stop_environment.rb +2 -2
- data/lib/cfn_manage/handlers/ecs_cluster.rb +15 -10
- data/lib/cfn_manage/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c708f3745da3c51a41c262ea97a13160713c65f2bfd4f7725462ac19eadff1e
|
4
|
+
data.tar.gz: d4df25d986b21bd08e99a314747c5a1c43f3e0e62370a9a083bf0499a8714746
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 240eef8200a9ea1ffe5cec495206de3a92eae09ffdf196e7787460c7dbbd2739dcffeb79ceee5da87ac6a01d6af6fad4e69f95f23d3514b524891620c03fa1b4
|
7
|
+
data.tar.gz: cc1734f3debae9074455af442af6c679ad102c41b95a8c046dec5eadee27286d33bd56ec84b0a1ebd66d2abf71eeb4a006305cf433fa191087f79b1ba9e217c9
|
@@ -71,7 +71,7 @@ module CfnManage
|
|
71
71
|
options = {}
|
72
72
|
|
73
73
|
if CfnManage.find_tags?
|
74
|
-
tags = CfnManage::
|
74
|
+
tags = CfnManage::TagFinder.new(resource_id)
|
75
75
|
tags.get_tags(resource_type)
|
76
76
|
priority = !tags.priority.nil? ? tags.priority : priority
|
77
77
|
options = tags.options
|
@@ -98,7 +98,7 @@ module CfnManage
|
|
98
98
|
options = {}
|
99
99
|
|
100
100
|
if CfnManage.find_tags?
|
101
|
-
tags = CfnManage::
|
101
|
+
tags = CfnManage::TagFinder.new(resource_id)
|
102
102
|
tags.get_tags(resource_type)
|
103
103
|
priority = !tags.priority.nil? ? tags.priority : priority
|
104
104
|
options = tags.options
|
@@ -38,12 +38,16 @@ module CfnManage
|
|
38
38
|
end
|
39
39
|
|
40
40
|
if configuration.has_key?(service.service_name)
|
41
|
-
desired_count = configuration[service.service_name]['desired_count']
|
41
|
+
desired_count = configuration[service.service_name].has_key?('desired_count') ? configuration[service.service_name]['desired_count'] : 0
|
42
|
+
if desired_count == 0
|
43
|
+
$log.info("Desired count is #{desired_count}, skipping starting of service #{service.service_name}")
|
44
|
+
next
|
45
|
+
end
|
42
46
|
elsif CfnManage.ignore_missing_ecs_config?
|
43
|
-
$log.info("ECS service #{service.service_name} wasn't
|
47
|
+
$log.info("ECS service #{service.service_name} wasn't previously stopped by cfn_manage. Option --ignore-missing-ecs-config set and setting desired count to 1")
|
44
48
|
desired_count = 1
|
45
49
|
else
|
46
|
-
$log.warn("ECS service #{service.service_name} wasn't
|
50
|
+
$log.warn("ECS service #{service.service_name} wasn't previously stopped by cfn_manage. Skipping ...")
|
47
51
|
next
|
48
52
|
end
|
49
53
|
|
@@ -55,15 +59,13 @@ module CfnManage
|
|
55
59
|
})
|
56
60
|
|
57
61
|
end
|
58
|
-
|
59
|
-
if
|
60
|
-
# skip wait if desired count is purposfully set to 0
|
61
|
-
$log.info("Desired capacity is 0, skipping wait for ecs service #{service.service_name}")
|
62
|
-
elsif !@skip_wait
|
62
|
+
|
63
|
+
if !@skip_wait
|
63
64
|
@services.each do |service_arn|
|
64
65
|
wait(@wait_state,service_arn)
|
65
66
|
end
|
66
67
|
end
|
68
|
+
|
67
69
|
end
|
68
70
|
|
69
71
|
def stop
|
@@ -94,7 +96,7 @@ module CfnManage
|
|
94
96
|
def wait(type,service_arn=nil)
|
95
97
|
|
96
98
|
if service_arn.nil?
|
97
|
-
$log.warn("
|
99
|
+
$log.warn("Unable to wait for #{service_arn} service")
|
98
100
|
return
|
99
101
|
end
|
100
102
|
|
@@ -107,8 +109,11 @@ module CfnManage
|
|
107
109
|
success = wait_till_running(service_arn)
|
108
110
|
when 'HealthyInTargetGroup'
|
109
111
|
success = wait_till_healthy_in_target_group(service_arn)
|
112
|
+
when 'Skip'
|
113
|
+
$log.info("Skipping wait for #{service_arn} service")
|
114
|
+
break
|
110
115
|
else
|
111
|
-
$log.warn("
|
116
|
+
$log.warn("Unknown ECS service wait type #{type}. Skipping...")
|
112
117
|
break
|
113
118
|
end
|
114
119
|
|
data/lib/cfn_manage/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfn_manage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Base2Services
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-10-
|
13
|
+
date: 2019-10-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk-core
|