./lib/stacco/stack.rb in stacco-0.1.37 vs ./lib/stacco/stack.rb in stacco-0.1.38
- old
+ new
@@ -173,9 +173,17 @@
'DBAdminPasswordVar' => self.secrets['db_admin_password'],
'EnvironmentTypeVar' => self.config['environment'],
'UserDataEnvironmentVar' => env_lns.join
}
+ scaling_groups = self.config['scale']
+ self.enabled_layer_names.each do |layer_name|
+ next unless scaling_groups.has_key?(layer_name)
+ camelized_layer_name = layer_name.split('-').map{ |w| w.capitalize.gsub(/api/i, 'API') }.join
+ parameters["#{camelized_layer_name}ScalingGroupMinSizeVar"] = scaling_groups[layer_name].to_s
+ parameters["#{camelized_layer_name}ScalingGroupMaxSizeVar"] = (scaling_groups[layer_name] + 1).to_s
+ end
+
if instance_ami = self.config['base_image']
parameters['InstanceAMIVar'] = instance_ami
end
Stacco::Resources::RoleScripts.each do |role_name, role_script|