Amazon web services &引用;你可以';t为单个实例环境启用滚动更新”;即使没有指定;自动缩放:更新策略:滚动更新”;
我正在尝试使用EB CLI创建一个新的Elastic Beanstalk环境,但由于一个无效选项而失败,即使我的配置中没有设置该选项 我正在运行的命令:Amazon web services &引用;你可以';t为单个实例环境启用滚动更新”;即使没有指定;自动缩放:更新策略:滚动更新”;,amazon-web-services,amazon-elastic-beanstalk,ebcli,Amazon Web Services,Amazon Elastic Beanstalk,Ebcli,我正在尝试使用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
$ 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
artifact.中只有我配置的新版本
问题的原因是EB CLI忽略配置文件中的某些设置。发件人:
由于建议值是在API级别设置的,因此它们将覆盖配置文件或保存的配置中设置的相同选项的值
解决方案是使用EB CLI选项--single
将EB环境显式设置为单实例类型
eb create my-new-environment -v --timeout 15 --single
您能否运行
eb config list
并检查是否保存了任何配置?不,没有。我也在控制台中进行了双重检查,但是没有为我的应用程序保存配置。那么env.yaml
文件呢?它也可以有这些设置?设置<代码>--单个<代码>似乎可以工作。。。但是,如果EB总是用CLI或控制台覆盖它,那么在配置中设置EnvironmentType:SingleInstance
选项有什么意义呢?是的,去吧:)请注意,问题仍然是“如果EB总是用CLI或控制台覆盖它,那么在配置中设置EnvironmentType:SingleInstance
选项有什么意义?”