Amazon ec2 自动缩放在cfncluster中向上旋转多个计算节点

Amazon ec2 自动缩放在cfncluster中向上旋转多个计算节点,amazon-ec2,Amazon Ec2,当我尝试在cfncluster中运行单个作业“hellojob.sh”时,多个计算节点旋转起来。这是一个非常简单的工作。请在下面找到我的脚本 hellojob.sh #!/bin/bash sleep 30 echo "Hello World from $(hostname)" 有谁能告诉我如何避免自动调整自旋到多个计算节点吗 请在下面找到我的配置文件: [root@ip-00-00-0-1000 .cfncluster]# cat config [aws] aws_region_name =

当我尝试在cfncluster中运行单个作业“hellojob.sh”时,多个计算节点旋转起来。这是一个非常简单的工作。请在下面找到我的脚本

hellojob.sh

#!/bin/bash
sleep 30
echo "Hello World from $(hostname)"
有谁能告诉我如何避免自动调整自旋到多个计算节点吗

请在下面找到我的配置文件:

[root@ip-00-00-0-1000 .cfncluster]# cat config
[aws]
aws_region_name = us-east-1
aws_access_key_id = ***************
aws_secret_access_key = *******************

[cluster default]
vpc_settings = testdev-dev
key_name = testdev-developers
initial_queue_size = 0
s3_read_write_resource =*
pre_install = s3://cfncluster/pre_install_script.sh

[vpc testdev-dev]
master_subnet_id = subnet-*****
vpc_id = vpc-*****
additional_sg=sg-*****
vpc_security_group_id =sg-*****
use_public_ips=false


[global]
update_check = true
sanity_check = true
cluster_template = default

[scaling]
scaling_cooldown = 2000

您应该能够通过在缩放配置中包含scaling_threshold(以及可选的scaling_threshold2)参数来解决此问题。scaling_threshold参数确定触发自动缩放ScaleUp事件时要添加的实例数。请参见下面的my config片段作为示例

## Scaling settings
#[scaling custom]
# Threshold for triggering CloudWatch ScaleUp action
# (defaults to 4 for default template) 
scaling_threshold = 1
# Number of instances to add when called CloudWatch ScaleUp action
# (defaults to 2 for default template) 
scaling_adjustment = 1
# Threshold for triggering CloudWatch ScaleUp2 action
# (defaults to 4 for default template) 
scaling_threshold2 = 10
# Number of instances to add when called CloudWatch ScaleUp2 action
# (defaults to 20 for default template) 
scaling_adjustment2 = 2

您没有提供有关ASG配置的任何详细信息。@Putnik我已经添加了配置文件。请查找上面的配置详细信息。