[chef] Design about Running recipes Incrementally and Cleanup after Recipe removal


Chronological Thread 
  • From: Hui Hu < >
  • To:
  • Subject: [chef] Design about Running recipes Incrementally and Cleanup after Recipe removal
  • Date: Tue, 20 Mar 2012 00:04:57 +0800

Hello everyone and Chef designers,

I'm a new Chef user, now want to find some solution for 2 problems: Incremental Recipe Running and Cleanup after Recipe removal

1)  Running recipes Incrementally
Assume a node has a run_list : [A,B,C] , now I want to add a new recipe D into its run_list, then run chef-client. So chef-client will re-run A,B,C,D.  However, re-run A,B,C is unneccessary, and sometimes I don't want A,B,C to be re-ran which will cause service provided in A,B,C to be restart.

Is it possible to let chef-client check the diff of the two run_lists and only run the added recipe and re-run the recipe which has been modified or whoes attribute is modified.

2)  Cleanup after Recipe removal
This problem is described here : http://help.opscode.com/discussions/questions/271-cleanup-after-recipe-removal .

It says when a recipe is removed from the old run_list,  can chef-client detects the change, and remove the packages/files/init.d services installed by that recipe ?   Maybe adding a rollback() method in every recipe to do this kind of removal and let chef-client call rollback() automactically ?

Looking forward to the feedback :)

Thanks & Best Regards,
Hui Hu




Archive powered by MHonArc 2.6.16.

§