gpt4 book ai didi

amazon-web-services - "You can' t 为单实例环境启用滚动更新 "even when not specifying "aws :autoscaling:updatepolicy:rollingupdate"

转载 作者:行者123 更新时间:2023-12-02 16:27:49 25 4
gpt4 key购买 nike

我正在尝试使用 EB CLI 创建一个新的 Elastic Beanstalk 环境,但由于选项无效而失败,即使我的配置中未设置该选项也是如此。

我正在运行的命令:

$ eb create my-new-environment -v --timeout 15

我得到的错误:

2020-09-27 08:45:00    ERROR   "option_settings" in one of the configuration files failed validation. More details to follow.
2020-09-27 08:45:00 ERROR Invalid option value: '1.0' (Namespace: 'aws:autoscaling:updatepolicy:rollingupdate', OptionName: 'MinInstancesInService'): You can't enable rolling updates for a single-instance environment.
2020-09-27 08:45:01 ERROR Failed to launch environment.

但是我的配置文件中没有指定 aws:autoscaling:updatepolicy:rollingupdate!

# .ebextensions/settings.config

option_settings:
aws:elasticbeanstalk:managedactions:
ManagedActionsEnabled: true
PreferredStartTime: "Thu:04:00"
aws:elasticbeanstalk:managedactions:platformupdate:
UpdateLevel: minor
InstanceRefreshEnabled: true
aws:elasticbeanstalk:command:
DeploymentPolicy: AllAtOnce
aws:elasticbeanstalk:environment:
EnvironmentType: SingleInstance
aws:ec2:instances:
InstanceTypes: t3.medium
aws:elasticbeanstalk:cloudwatch:logs:
StreamLogs: true
DeleteOnTerminate: true
RetentionInDays: 1
aws:elasticbeanstalk:application:
Application Healthcheck URL: /health
aws:autoscaling:launchconfiguration:
MonitoringInterval: 1 minute

这是我的 .elasticbeanstalk/config.yml:

# .elasticbeanstalk/config.yml

deploy:
artifact: out.zip
global:
application_name: my-application
branch: null
default_ec2_keyname: null
default_platform: 64bit Amazon Linux 2 v2.0.2 running .NET Core
default_region: eu-west-1
include_git_submodules: true
instance_profile: null
platform_name: null
platform_version: null
profile: null
repository: null
sc: git
workspace_type: Application

如果有帮助,我认为我在之前的尝试中确实设置了 MinInstancesInService 选项,但我已经从我的配置中删除了它;我已经双重和三次检查了我的配置的新版本是否在我的 out.zip 人工制品中。

最佳答案

基于评论。

问题是由于 EB CLI 忽略了配置文件中的某些设置。来自 docs :

Because the recommended values are set at the API level, they will override values for the same options that you set in configuration files or saved configurations.

解决方案是使用 EB CLI 选项 --single 将 EB 环境明确设置为单实例类型。

eb create my-new-environment -v --timeout 15 --single

关于amazon-web-services - "You can' t 为单实例环境启用滚动更新 "even when not specifying "aws :autoscaling:updatepolicy:rollingupdate",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64086805/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com