http://www.nuvolecomputing.com/2012/07/02/chef-node-de-registration-for-autoscaling-groups/
(Not my article)
This is not a self-cleanup, requires a backend workflow/process, but it can be expanded in any number of ways.
- alex--
On 05/17/2013 11:43 AM, Sam Darwin 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...
Alex Corley | Software as a Service Engineer
Zenoss, Inc. | Transforming IT Operations
" target="_blank"> | Skype: acorley_zenoss | Github: anthroprose
Archive powered by MHonArc 2.6.16.