Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #37 from tlisonbee/parameterize-pause-and-wait-on-…
Browse files Browse the repository at this point in the history
…signals

Parameterizing PauseTime and WaitOnResourceSignals
  • Loading branch information
tlisonbee authored Apr 19, 2017
2 parents 7bce320 + 78fd0aa commit 2804133
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

group=com.nike
artifactId=cerberus-lifecycle-cli
version=0.18.0
version=0.19.0
18 changes: 16 additions & 2 deletions smaas-cf/smaas/cms-cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,20 @@
Default="3"
))

pause_time_param = template.add_parameter(Parameter(
"pauseTime",
Description="Pause time for AutoScalingRollingUpdate e.g PT15M",
Type="String",
Default="PT15M"
))

wait_on_resource_signals_param = template.add_parameter(Parameter(
"waitOnResourceSignals",
Description="Enabling WaitOnResourceSignals allows CloudFormation to wait until you have received a success signal before performing the next scaling action.",
Type="String",
Default="True"
))

###
#
# Elastic Load Balancers
Expand Down Expand Up @@ -241,8 +255,8 @@
AutoScalingRollingUpdate=AutoScalingRollingUpdate(
MaxBatchSize=1,
MinInstancesInService=Ref(minimum_instances_param),
PauseTime="PT15M",
WaitOnResourceSignals=True
PauseTime=Ref(pause_time_param),
WaitOnResourceSignals=Ref(wait_on_resource_signals_param)
)
),
VPCZoneIdentifier=subnet_id_refs,
Expand Down
18 changes: 16 additions & 2 deletions smaas-cf/smaas/consul-cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@
Default="3"
))

pause_time_param = template.add_parameter(Parameter(
"pauseTime",
Description="Pause time for AutoScalingRollingUpdate e.g PT15M",
Type="String",
Default="PT15M"
))

wait_on_resource_signals_param = template.add_parameter(Parameter(
"waitOnResourceSignals",
Description="Enabling WaitOnResourceSignals allows CloudFormation to wait until you have received a success signal before performing the next scaling action.",
Type="String",
Default="True"
))

subnet_id_refs = []
for zone_identifier in range(1, 4):
vpc_subnet_id = template.add_parameter(Parameter(
Expand Down Expand Up @@ -158,8 +172,8 @@
AutoScalingRollingUpdate=AutoScalingRollingUpdate(
MaxBatchSize=1,
MinInstancesInService=Ref(minimum_instances_param),
PauseTime="PT15M",
WaitOnResourceSignals=True
PauseTime=Ref(pause_time_param),
WaitOnResourceSignals=Ref(wait_on_resource_signals_param)
)
),
VPCZoneIdentifier=subnet_id_refs,
Expand Down
18 changes: 16 additions & 2 deletions smaas-cf/smaas/gateway-cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,20 @@
Default="3"
))

pause_time_param = template.add_parameter(Parameter(
"pauseTime",
Description="Pause time for AutoScalingRollingUpdate e.g PT15M",
Type="String",
Default="PT15M"
))

wait_on_resource_signals_param = template.add_parameter(Parameter(
"waitOnResourceSignals",
Description="Enabling WaitOnResourceSignals allows CloudFormation to wait until you have received a success signal before performing the next scaling action.",
Type="String",
Default="True"
))

###
#
# Elastic Load Balancer
Expand Down Expand Up @@ -296,8 +310,8 @@
AutoScalingRollingUpdate=AutoScalingRollingUpdate(
MaxBatchSize=1,
MinInstancesInService=Ref(minimum_instances_param),
PauseTime="PT15M",
WaitOnResourceSignals=True
PauseTime=Ref(pause_time_param),
WaitOnResourceSignals=Ref(wait_on_resource_signals_param)
)
),
VPCZoneIdentifier=subnet_id_refs,
Expand Down
20 changes: 18 additions & 2 deletions smaas-cf/smaas/vault-cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,22 @@
Default="3"
))


pause_time_param = template.add_parameter(Parameter(
"pauseTime",
Description="Pause time for AutoScalingRollingUpdate e.g PT15M",
Type="String",
Default="PT15M"
))

wait_on_resource_signals_param = template.add_parameter(Parameter(
"waitOnResourceSignals",
Description="Enabling WaitOnResourceSignals allows CloudFormation to wait until you have received a success signal before performing the next scaling action.",
Type="String",
Default="True"
))


###
#
# Elastic Load Balancer
Expand Down Expand Up @@ -285,8 +301,8 @@
AutoScalingRollingUpdate=AutoScalingRollingUpdate(
MaxBatchSize=1,
MinInstancesInService=Ref(minimum_instances_param),
PauseTime="PT15M",
WaitOnResourceSignals=True
PauseTime=Ref(pause_time_param),
WaitOnResourceSignals=Ref(wait_on_resource_signals_param)
)
),
VPCZoneIdentifier=subnet_id_refs,
Expand Down

0 comments on commit 2804133

Please sign in to comment.