[chef] Re: aws autoscaling and chef cleanup


Chronological Thread 
  • From: Thom May < >
  • To:
  • Subject: [chef] Re: aws autoscaling and chef cleanup
  • Date: Fri, 17 May 2013 18:09:33 +0100

Hi,
AutoScaling supports notifications. You can cause Autoscaling actions to generate events in an SQS queue, which you can then process at your leisure. I'd just run a script that pops notifications, and when you see a delete notification, uses Ridley/Spice to remove the client/node from chef.
Thanks,
-Thom





On Fri, May 17, 2013 at 5:43 PM, Sam Darwin < " target="_blank"> > wrote:

If using AWS auto-scaling + Chef, the final step of instance cleanup seems to
be slightly unclear.

One solution is to run a script in /etc/rc0.d which is called on shutdown.
"knife node delete".    This requires knife to be configured and working on the
instance, which is a (minor) pain.    This method will also fail for an abrupt
machine crash.

Another solution is to have a script which queries chef server for instances
that haven't checked in for a while, and removes those.   That would require
having chef-client running very often or as a daemon.

I wonder what the security implications would be of adding functionality into
chef-client:

chef-client --remove-self-from-server

Some people have posted about a script which checks for terminated instances
and removes them.   this sounds like the best way.    Perhaps they mean to
query AWS first, and then make changes to chef-server.    now to figure out
how...




Archive powered by MHonArc 2.6.16.

§