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.