[chef] Re: Taking temporary downtime for a service


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Taking temporary downtime for a service
  • Date: Mon, 18 Mar 2013 16:54:57 -0700

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




Archive powered by MHonArc 2.6.16.

§