Amazon elastic beanstalk 无法使用“创建ElasticBeanstalk自定义平台”;“不匹配区域”;
我正试图为以下地区ap-northeast-1创建一个自定义平台Amazon elastic beanstalk 无法使用“创建ElasticBeanstalk自定义平台”;“不匹配区域”;,amazon-elastic-beanstalk,Amazon Elastic Beanstalk,我正试图为以下地区ap-northeast-1创建一个自定义平台 ebp create以失败结束,并且ebp events显示一个错误,指示创建的AMI位于与服务区域不同的区域 2018-04-28 00:49:18 INFO Initiated platform version creation for 'NodePlatform_Ubuntu/1.0.0'. 2018-04-28 00:49:22 INFO Creating Packer builder enviro
ebp create
以失败结束,并且ebp events
显示一个错误,指示创建的AMI位于与服务区域不同的区域
2018-04-28 00:49:18 INFO Initiated platform version creation for 'NodePlatform_Ubuntu/1.0.0'.
2018-04-28 00:49:22 INFO Creating Packer builder environment 'eb-custom-platform-builder-packer'.
2018-04-28 00:52:39 INFO Starting Packer building task.
2018-04-28 00:52:44 INFO Creating CloudWatch log group '/aws/elasticbeanstalk/platform/NodePlatform_Ubuntu'.
2018-04-28 01:03:48 INFO Successfully built AMI(s): 'ami-5f2f4527' for 'arn:aws:elasticbeanstalk:ap-northeast-1:392559473945:platform/NodePlatform_Ubuntu/1.0.0'
2018-04-28 01:04:03 ERROR Unmatched region for created AMI 'ami-5f2f4527': 'us-west-2' (service region: 'ap-northeast-1').
2018-04-28 01:04:03 INFO Failed to create platform version 'NodePlatform_Ubuntu/1.0.0'.
我只为builders.region
和builders.source\u ami
使用并修改了custom_platform.json,以与我的自定义平台生成器的区域相匹配
.elasticbeanstalk/config.yml
global:
application_name: Custom Platform Builder
branch: null
default_ec2_keyname: null
default_platform: null
default_region: ap-northeast-1
instance_profile: null
platform_name: NodePlatform_Ubuntu
platform_version: null
profile: eb-cli
repository: null
sc: git
workspace_type: Platform
自定义_platform.json
{
"variables": {
"platform_name": "{{env `AWS_EB_PLATFORM_NAME`}}",
"platform_version": "{{env `AWS_EB_PLATFORM_VERSION`}}",
"platform_arn": "{{env `AWS_EB_PLATFORM_ARN`}}"
},
"builders": [
{
"type": "amazon-ebs",
"name": "HVM AMI builder",
"region": "ap-northeast-1",
"source_ami": "ami-60a4b21c",
"instance_type": "m3.medium",
"ssh_username": "ubuntu",
"ssh_pty": "true",
"ami_name": "NodeJs running on Ubuntu Server 16.04 LTS (built on {{isotime \"20060102150405\"}})",
"tags": {
"eb_platform_name": "{{user `platform_name`}}",
"eb_platform_version": "{{user `platform_version`}}",
"eb_platform_arn": "{{user `platform_arn`}}"
}
}
],
"provisioners": [
{
"type": "file",
"source": "builder",
"destination": "/tmp/"
},
{
"type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo {{ .Path }}",
"scripts": [
"builder/builder.sh"
]
}
]
}
看来我对custom_platform.json的修改没有生效。我错过的是提交更改 虽然EB和Packer文档没有提及任何关于vcs或git的内容,但Packer似乎使用git创建自定义平台文件的存档,因此我所做的更改没有包含在其中,因为我没有提交它们 我注意到ebp create给了我这个警告
mac.local:NodePlatform_Ubuntu% ebp create
WARNING: You have uncommitted changes.
我错过的是提交更改 虽然EB和Packer文档没有提及任何关于vcs或git的内容,但Packer似乎使用git创建自定义平台文件的存档,因此我所做的更改没有包含在其中,因为我没有提交它们 我注意到ebp create给了我这个警告
mac.local:NodePlatform_Ubuntu% ebp create
WARNING: You have uncommitted changes.