Roh*_*hal 1 amazon-web-services amazon-elastic-beanstalk ebcli
所以我有一个带有适当Procfile / Buildfile的Java应用程序。
我已经在临时的Elastic Beanstalk环境中运行过eb create,但我必须跟进手动配置更改,以使其成为单个实例类型vs负载平衡。
我将如何使用eb-cli在eb create $ENVIRONMENT_NAME其上生成单个实例环境的地方?
有一个.elasticbeanstalk / config.yml
branch-defaults:
development:
environment: development
group_suffix: null
staging:
environment: staging
group_suffix: null
production:
environment: production
group_suffix: null
global:
application_name: feed-engine
branch: null
default_ec2_keyname: null
default_platform: Java 8
default_region: us-east-1
profile: prod
repository: null
sc: git
Run Code Online (Sandbox Code Playgroud)
我想通了。您必须在项目的目录.ebextensions下创建一个扩展名为.config的文件。
{
"option_settings" : [
{
"namespace" : "aws:elasticbeanstalk:application",
"option_name" : "Application Healthcheck URL",
"value" : "/"
},
{
"namespace" : "aws:autoscaling:asg",
"option_name" : "MinSize",
"value" : "1"
},
{
"namespace" : "aws:autoscaling:asg",
"option_name" : "MaxSize",
"value" : "1"
},
{
"namespace" : "aws:autoscaling:asg",
"option_name" : "Custom Availability Zones",
"value" : "us-east-1a"
},
{
"namespace" : "aws:elasticbeanstalk:environment",
"option_name" : "EnvironmentType",
"value" : "SingleInstance"
},
]
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
619 次 |
| 最近记录: |