[chef] Re: Re: Taking temporary downtime for a service


Chronological Thread 
  • From: Jeremy Voorhis < >
  • To:
  • Subject: [chef] Re: Re: Taking temporary downtime for a service
  • Date: Mon, 18 Mar 2013 17:13:31 -0700

That's a good question. Ideally, there should be as few one-offs as possible, and while it's common for this monit-watched application to be deployed during a chef run, that is not always the case. I think what I'm looking for is some way to wrap a resource's execution with before- and after- notifications, but I don't know if it's worth the added complexity.


On Mon, Mar 18, 2013 at 4:54 PM, Ranjib Dey < " target="_blank"> > wrote:
is this a one off task? I am using a bunch of task that are one-offs using knife-plugins and chef-apply . Tasks that does not fit very easily into periodic chef runs / does not contribute to the overall convergence are a good fit for this. knife+chef apply combo gives you the ability to interact with chef server and also chef resource dsl. Do you want to start and stop this service in every chef run ?


On Mon, Mar 18, 2013 at 4:46 PM, Jeremy Voorhis < " target="_blank"> > wrote:
Hello,

It's common to temporarily disable a service while performing certain changes:

# recipe[monit::default]
service :monit do
  # ...
  action [:enable, :start]
end

# recipe[myapp::deploy]
service :monit do
  action [:stop]
end

# deploy happens ...

service :monit do
  action [:start]
end

I'd like to know if anybody has a good pattern for triggering start/stop actions for a service without duplicating the resource within a recipe. Alternative methods to achieve the same effect are welcome!

Thanks,

--
Jeremy Voorhis




--
Jeremy Voorhis



Archive powered by MHonArc 2.6.16.

§