如何设置自动缩放与elasticbeanstalk组健康检查类型 [英] How to set autoscaling group health check type with elasticbeanstalk

查看:293
本文介绍了如何设置自动缩放与elasticbeanstalk组健康检查类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了应用程序健康检查URL'(AWS:elasticbeanstalk:应用程序)为我elasticbeanstalk的应用程序,并在晚上的两个服务器启动失败该检查

I have set the 'Application Healthcheck URL' (aws:elasticbeanstalk:application) for my elasticbeanstalk application, and during the night the two servers started failing this check.

看来,自动缩放集团成立了由elasticbeanstalk具有EC2的健康检查类型,这意味着服务器没有得到终止,取而代之,留出2连接到负载平衡器服务的服务器。

It seems that the autoscaling group set up by elasticbeanstalk has a health check type of ec2 which means that the servers did not get terminated and replaced, leaving 2 out of service servers attached to the load balancer.

我如何可以改变自动缩放组的健康检查类型使用elasticbeanstalk的配置设置来ELB?我找不到改变这个值的任何记录的方式,但它必须是一个相当普遍的要求。

How can I change the autoscaling group's health check type to be elb using the elasticbeanstalk's configuration settings? I cannot find any documented way of changing this value, but it must be a fairly common requirement.

感谢

推荐答案

原来答案就在于增加一个配置文件到.ebextensions目录。

It turns out the answer lies in adding a config file to the .ebextensions directory.

在AWS文档不似乎是正确的,或者至少不是最新的。

The AWS documentation doesn't appear to be correct, or at least not up to date.

在这里,它会告诉你,你可以使用配置文件来配置EB资源: <一href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-resources.html">http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-resources.html

Here it tells you that you can configure EB resources using a config file: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-resources.html

不过,这并不告诉你在哪里把那配置文件。要查找出你需要遵循一个链接: <一href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html">http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html

But it doesn't tell you where to put that config file. To find that out you need to follow a link to: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html

第一个环节有益告诉你各方面的资源,你可以配置的名称。就我而言,我需要'AWSEBAutoScalingGroup。但它不会告诉你什么是资源类型标识符(类型)或可用的属性。它有一个链接到资源类型标识符(<一href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/aws-template-resource-type-ref-aeb.html">http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/aws-template-resource-type-ref-aeb.html),但没有提及自动缩放或弹性豆茎那里。

The first link helpfully tells you the name of various resources you can configure. In my case I needed 'AWSEBAutoScalingGroup'. But then it doesn't tell you what the resource type identifier (Type) or the available properties are. It has a link to the 'resource type identifiers' (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/aws-template-resource-type-ref-aeb.html), but there's no mention of autoscaling or elastic beanstalk there.

幸运的是在AWS论坛上有种灵魂给我发了一个链接到一些有用的文档: <一href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html">http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html

Luckily a kind soul on the AWS forums sent me a link to some helpful documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html

所以最后我能创建一个看起来像这样我的配置文件:

So finally I was able to create my config file which looks like this:

Resources:
    AWSEBAutoScalingGroup:
        Type: "AWS::AutoScaling::AutoScalingGroup"
        Properties:
            HealthCheckType: ELB
            HealthCheckGracePeriod: 600

这现在就像一个魅力!

这篇关于如何设置自动缩放与elasticbeanstalk组健康检查类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆