在ElasticBeanstalk Packer错误上构建自定义平台



我正在尝试使用提供的示例(nodeplatform_ubuntu(构建一个自定义平台http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html#custom-platforms-pda

我安装了EB CLI(我的操作系统是MacOSX EL Captain(:

➜  custom-platform ebp --version 
EB CLI 3.10.1 (Python 2.7.1)

出于某种原因,EB CLI坚持使用Python 2.7.1而不是已经安装的Python 3.x(Python3命令工作(,但根据http://docs.aws.aws.aws.amazon.com,这并不重要。/elasticbeanstalk/latest/dg/eb-cli3-install.html它支持python 2.7

" EBP Init"效果很好。" EBP创建"失败。

➜  custom-platform ebp create
Creating application version archive "app-170427_145319".
Uploading custom-platform/app-170427_145319.zip to S3. This may take a while.
Upload Complete.
Note: An environment called 'eb-custom-platform-builder-packer' has been created in order to build your application. This environment will not automatically be terminated and it does have a cost associated with it. Once your platform creation has completed you can terminate this builder environment using the command 'eb terminate'.
INFO: createPlatform is starting.
INFO: Initiated platform version creation for 'custom-platform/1.0.2'.
INFO: Creating Packer builder environment 'eb-custom-platform-builder-packer'.
ERROR: Packer environment eb-custom-platform-builder-packer is not available, current status: terminated.
INFO: Failed to create platform version 'custom-platform/1.0.2'.

这是错误:

ERROR: Packer environment eb-custom-platform-builder-packer is not available, current status: terminated.

更多日志(调试模式(:

2017-04-27 14:19:55,698 (DEBUG) ebcli.lib.aws : Response: {u'Events': [{u'PlatformArn': 'arn:aws:elasticbeanstalk:us-west-2:107875334514:platform/custom-platform/1.0.1', u'Message': "Failed to create platform version 'custom-platform/1.0.1'.", u'Severity': 'INFO', u'EventDate': datetime.datetime(2017, 4, 27, 11, 19, 52, 84000, tzinfo=tzutc()), u'RequestId': 'f762956d-2b3a-11e7-8cd7-c96ae1e26915'}, {u'PlatformArn': 'arn:aws:elasticbeanstalk:us-west-2:107875334514:platform/custom-platform/1.0.1', u'Message': 'Packer environment eb-custom-platform-builder-packer is not available, current status: terminated.', u'Severity': 'ERROR', u'EventDate': datetime.datetime(2017, 4, 27, 11, 19, 51, 861000, tzinfo=tzutc()), u'RequestId': 'f762956d-2b3a-11e7-8cd7-c96ae1e26915'}], 'ResponseMetadata': {'date': 'Thu, 27 Apr 2017 11:19:52 GMT', 'RetryAttempts': 0, 'HTTPStatusCode': 200, 'RequestId': '6f7dcea9-2b3b-11e7-8cd7-c96ae1e26915'}}
ERROR: Packer environment eb-custom-platform-builder-packer is not available, current status: terminated.
INFO: Failed to create platform version 'custom-platform/1.0.1'.

请注意,APP-170427_145319.ZIP成功上传到S3。

任何想法怎么了?

它与实例配置文件(角色(AWS-弹性beanstalk-custom-platform-ec2-lole失败了。

由于进行了许多修改和更改,显然是由于EB CLI bug ,因此实例配置文件被损坏,并且在尝试创建具有相同名称的配置文件时没有进行实例profile arn。-custom-platform-ec2-lole"。

因此,我们继续创建了一个名为" Custom-platform"的新版本,并附加了我在情况中提到的必要的内联策略权限。

一旦分类了IAM问题,我们就进入了Packer Bundle,进行了" EBP INIT",然后运行" EBP CREATE",但使用-ip flag,并使用了此实例配置文件自定义平台,如

ebp create -ip custom-platform

最新更新