【问题标题】:Building Custom Platform on ElasticBeanstalk Packer Error在 ElasticBeanstalk Packer 错误上构建自定义平台
【发布时间】:2017-09-25 06:02:46
【问题描述】:

我正在尝试使用提供的示例 (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.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。

知道有什么问题吗?

【问题讨论】:

    标签: amazon-elastic-beanstalk packer


    【解决方案1】:

    由于实例配置文件(角色)aws-elasticbeanstalk-custom-platform-ec2-role 没有附加必要的角色内联策略而失败。

    由于进行了大量修改和更改,显然是由于 EB CLI 错误,当尝试创建具有相同名称“aws-elasticbeanstalk”的配置文件时,实例配置文件已损坏并且未采用 InstanceProfile ARN -custom-platform-ec2-role”。

    因此,我们继续创建了一个名为“custom-platform”的新平台,并附加了我在案例中提到的必要的内联策略权限。

    对 IAM 问题进行排序后,我们进入打包程序包,执行“ebp init”,然后运行“ebp create”,但使用 -ip 标志并使用此实例配置文件自定义平台,如

    ebp create -ip custom-platform
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-09-06
      • 1970-01-01
      • 1970-01-01
      • 2015-12-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多