什么是Fargate的LaunchConfiguration? [英] What LaunchConfiguration for Fargate?

查看:145
本文介绍了什么是Fargate的LaunchConfiguration?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AutoScalingGroup需要启动配置

An AutoScalingGroup needs a LaunchConfiguration

问题是启动配置需要ImageId和其他参数(自从我使用容器以来就没有)。

The problem is that the LaunchConfiguration requires things like ImageId and other parameters which I do not have since I am using containers.

使用ECS Fargate时应如何配置LaunchConfiguration?

How should the LaunchConfiguration be configured when using ECS Fargate?

AWS :: AutoScaling :: AutoScalingGroup
< a href = https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html rel = nofollow noreferrer> https://docs.aws.amazon.com /AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html

AWS::AutoScaling::AutoScalingGroup https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html

AWS :: AutoScaling :: LaunchConfiguration
https://docs.aws.amazon.com/AWSCloudFormation/ Latest / UserGuide / aws-properties-as-launchconfig.html

AWS::AutoScaling::LaunchConfiguration https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html

推荐答案

这是FARGATE的有效示例自动缩放策略可以看到,既不涉及启动配置也不涉及Auto Scaling组。您只需要插入 ScalingTargetId ,由于我们将使用目标跟踪扩展策略,因此基础架构将使您拥有一个目标最大为80%的系统CPU使用率。当使用率超过此值时,将发生自动缩放。

This is a working example of a FARGATE autoscaling policy, that, as you can see, does not involve Launch Configuration nor Auto Scaling Groups. You just have to insert the ScalingTargetId, and since we'll be using a Target Tracking Scaling Policy, the infrastructure will grant you to have a system with a target of 80% maximum CPU usage. When the usage will be more than that, autoscaling will occur.

ExampleCPUAutoScalingPolicy:
  Type: AWS::ApplicationAutoScaling::ScalingPolicy
  Properties:
    PolicyName: ECSCPUAutoScalingPolicy
    PolicyType: TargetTrackingScaling
    ScalingTargetId: !Ref ECSTarget
    TargetTrackingScalingPolicyConfiguration:
      DisableScaleIn: false
      TargetValue: 80
      ScaleInCooldown: 60
      ScaleOutCooldown: 60
      PredefinedMetricSpecification:
        PredefinedMetricType: ECSServiceAverageCPUUtilization

这篇关于什么是Fargate的LaunchConfiguration?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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