|
5 | 5 | az_conditions_resources('SubnetCompute', maximum_availability_zones) |
6 | 6 |
|
7 | 7 | asg_ecs_tags = [] |
8 | | - asg_ecs_tags << { Key: 'Name', Value: FnJoin('-', [ Ref(:EnvironmentName), component_name, '-xx' ]), PropagateAtLaunch: true } |
| 8 | + asg_ecs_tags << { Key: 'Name', Value: FnJoin('-', [ Ref(:EnvironmentName), component_name, 'xx' ]), PropagateAtLaunch: true } |
9 | 9 | asg_ecs_tags << { Key: 'Environment', Value: Ref(:EnvironmentName), PropagateAtLaunch: true} |
10 | 10 | asg_ecs_tags << { Key: 'EnvironmentType', Value: Ref(:EnvironmentType), PropagateAtLaunch: true } |
11 | 11 | asg_ecs_tags << { Key: 'Role', Value: "ecs", PropagateAtLaunch: true } |
|
82 | 82 | user_data << ".amazonaws.com:/ /efs\n" |
83 | 83 | end |
84 | 84 |
|
| 85 | + ecs_agent_extra_config.each do |key, value| |
| 86 | + user_data << "echo #{key}=#{value}" |
| 87 | + user_data << " >> /etc/ecs/ecs.config\n" |
| 88 | + end if defined? ecs_agent_extra_config |
| 89 | + |
85 | 90 | volumes = [] |
86 | 91 | volumes << { |
87 | 92 | DeviceName: '/dev/xvda', |
|
103 | 108 |
|
104 | 109 |
|
105 | 110 | AutoScalingGroup('AutoScaleGroup') do |
106 | | - UpdatePolicy('AutoScalingRollingUpdate', { |
107 | | - "MinInstancesInService" => "0", |
108 | | - "MaxBatchSize" => "1", |
109 | | - "SuspendProcesses" => ["HealthCheck","ReplaceUnhealthy","AZRebalance","AlarmNotification","ScheduledActions"] |
110 | | - }) |
| 111 | + UpdatePolicy(asg_update_policy.keys[0], asg_update_policy.values[0]) if defined? asg_update_policy |
111 | 112 | LaunchConfigurationName Ref('LaunchConfig') |
112 | 113 | HealthCheckGracePeriod '500' |
113 | 114 | MinSize Ref('AsgMin') |
|
0 commit comments