amazon-web-services - 使用 cloudformation 为具有 Chef 角色的节点添加标签

标签 amazon-web-services chef-infra puppet aws-cloudformation

所以我的目标是使用 cloudformation 在云中启动 100 个节点,并且我想在 cloudformation 脚本中用 Chef 角色标记节点,而不是使用 Knife。我已将我的 cloudformation 节点设置为自动向 Chef 服务器注册,并且我想使用向 Chef 服务器报告其角色,以便 Chef 服务器在每个节点上安装正确的 Recipe (取决于节点角色)。我知道这可以用 Knife 实现,但我想将节点角色隐藏在我的 cloudformation 脚本中。

我该怎么做?

最佳答案

我和 Chef 一起做这个。我通常在 S3 中放置一个 json 文件,它描述了机器需要使用的角色。我在 CloudFormation 中创建一个可以访问 S3 存储桶的 IAM 用户。然后,在我的用户数据脚本中,我首先从 S3 获取文件,然后运行 ​​Chef-client -j/path/to/json/file。我对验证 key fwiw 执行相同的操作,以便节点可以自行注册。

HTH

关于amazon-web-services - 使用 cloudformation 为具有 Chef 角色的节点添加标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13594708/

相关文章:

apache2 - Vagrant + Chef Solo 不使用 Apache 属性

docker - 向Chef配置Docker镜像

ruby - 附加到 Chef 数组属性

puppet - 使用 Puppet 将用户添加到多个组

ssl - PuppetServer upgarde 因缺少私钥而失败

amazon-web-services - SNS订阅的应用协议(protocol)是什么?

amazon-web-services - CloudFormation "You are not authorized to perform this operation"创建 SubnetRouteTableAssociation

javascript - 用于获取私有(private)文件的 AWS S3 签名 url

resources - 带有标题 munge 的 puppet 资源命令

amazon-web-services - 如何在 terraform lambda 代码中引用在 s3 存储桶中上传的 zip 文件?