【问题标题】:Where is the cfnbootstrap folder?cfnbootstrap 文件夹在哪里?
【发布时间】:2017-05-28 06:43:30
【问题描述】:

我对某些 aws 内部结构感到好奇——这里没有实际问题,只是想了解更多相关信息。

我正在使用 windows 实例运行 beanstalk。

我在 c:\cfn 和 "C:\cfn\log\cfn-init.log" 中查找了一些日志,我发现了一些这样的行:

  File "cfnbootstrap\util.pyc", line 159, in _retry
  File "cfnbootstrap\msi_tool.pyc", line 100, in _msi_from_url
  File "cfnbootstrap\util.pyc", line 79, in __init__
  File "cfnbootstrap\util.pyc", line 573, in check_status
  File "cfnbootstrap\packages\requests\models.pyc", line 834, in raise_for_status

所以我搜索了服务器的硬盘,没有找到 cfnbootstrap 文件夹或任何 *.pyc 文件。

这个文件夹和这个 python 脚本在哪里?我想看看这些脚本(甚至可以尝试反编译 pyc 文件),看看它到底在做什么。

编辑:所以它是一个 python 模块,但似乎 python 甚至没有安装在我的 beanstalk windows 实例上? (我在任何地方都找不到)beantalk 甚至没有在 Windows 上使用它吗?

【问题讨论】:

  • 在我的回答中添加了有关如何使用 py2exe 打包 Python 脚本以进行 Windows 安装的信息。

标签: python amazon-web-services amazon-ec2 amazon-elastic-beanstalk amazon-cloudformation


【解决方案1】:

cfnbootstrap 是一个包含各种 CloudFormation 帮助脚本的 Python 包。

最新版本的 Amazon Linux AMI 在/opt/aws/bin 中默认安装了 AWS CloudFormation 帮助程序脚本,底层的cfnbootstrap Python 包可以在 OS Python 共享包目录/usr/lib/python2.7/dist-packages/cfnbootstrap/ 中找到。

在基于 Windows 的 Elastic Beanstalk 实例上,cfn-bootstrap MSI package 安装到 C:\Program Files\Amazon\cfn-bootstrap。对于 MSI 包,Python 文件使用 py2exe 编译成独立的 .exe 文件,因此不需要在实例上安装全局 Python,所有 Python 源文件都包含在包中的 library.zip 中目录。

有关此软件包的更多信息,请参阅CloudFormation Helper Scripts Reference 文档。

【讨论】:

    猜你喜欢
    • 2019-09-05
    • 2011-12-19
    • 2012-03-11
    • 2021-01-31
    • 2014-10-04
    • 2018-09-27
    • 1970-01-01
    • 1970-01-01
    • 2016-04-07
    相关资源
    最近更新 更多