[chef] Re: Re: Re: triggering undeploy action


Chronological Thread 
  • From: Adam Jacob < >
  • To:
  • Subject: [chef] Re: Re: Re: triggering undeploy action
  • Date: Wed, 25 Aug 2010 07:02:37 -0700

Yeah, as of now, you would need to re-set the run-list with your full
list of uninstallers.  You could probably do this easily enough by
setting an attribute, say, "decommissioned" to true.  Then have a
recipe (that's always at the bottom of the run list) walk the resource
collection, turn off all the created resources, and then include all
of the contra recipes.

When you were done, though, I think it would have been easier on
everyone to re-install. :)

Adam

On Mon, Aug 23, 2010 at 1:39 PM, Boris Shulman 
< >
 wrote:
> I though that it will come down to implementing uninstall recipe. But
> the question how will I trigger that recipe to run? Will I have to add
> it to the node instead of the original?
>
> On Mon, Aug 23, 2010 at 7:08 PM, Ryan Creasey 
> < >
>  wrote:
>> Not in the way you would imagine a normal package manager to do an 
>> uninstall. You would have to write an explicit cookbook::uninstall recipe 
>> to handle the removal of a recipe.  Basically have it undo everything that 
>> your install recipe would do; there is no facility to "rewind" the actions 
>> your Resources do automatically.
>>
>> I thought it would be a cool idea to add this on the Provider level and it 
>> seems possible on the abstract level, but when you sit down to implement 
>> it... it gets complicated really fast.
>>
>> - Ryan
>>
>> On Aug 23, 2010, at 5:28 AM, Boris Shulman 
>> < >
>>  wrote:
>>
>>> Hello,
>>>
>>> I wonder if it is possible to trigger an undeploy action when removing
>>> role/recipe from a node?
>>> trigger
>>>
>>> Boris.
>>>
>>
>



-- 
Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: 




Archive powered by MHonArc 2.6.16.

§