[英]How to use Chef Opscode with AWS autoscaling
I have been facing issues with integrating chef with AWS autoscale. 我在将Chef与AWS autoscale集成时遇到了问题。
In most of my searches it tells about bootstrapping an instance and then using it's AMI to launch other instance in just the same way. 在我的大多数搜索中,它讲述了如何引导实例,然后使用AMI以相同的方式启动其他实例。
Basic issue is, Chef recognises each host with it's hostname, which in the above case is all going to be same. 基本问题是,Chef可以识别具有其主机名的每个主机,在上述情况下,它们都是相同的。 However, I was hoping for something like a Role which integrates in to AWS and does the thing better for me.
但是,我希望可以将诸如Role之类的东西集成到AWS中并对我做得更好。 Any help/Ideas will be appreciated.
任何帮助/想法将不胜感激。 I just hope someone has done it already.
我只是希望有人已经做到了。
Regards, 问候,
There are a lot of options but the general flow looks like this: 有很多选项,但是总体流程如下:
client.rb
with the server URL set. client.rb
。 Packer is great for this. UserData
field on the ASG to be a script (or cloud-init config if you want to get fancy but we'll ignore that option for now) that launches chef-client -r 'role[myrole]
where myrole
is usually based on the type of ASG you are building. UserData
字段配置为脚本(如果想要,可以使用cloud-init配置,但现在我们将忽略该选项),该脚本将启动chef-client -r 'role[myrole]
,其中myrole
通常基于根据您要构建的ASG的类型。 This will use the validator key to register with the Chef Server automatically and set the run list based on the command line you give. chef-client
cookbook/recipe in that role to install Chef as a daemon on the machine and to remove the validator key. chef-client
cookbook / recipe,以将Chef作为守护程序安装在计算机上并删除验证程序密钥。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.