[chef] How to create services with the service resource?


Chronological Thread 
  • From: Steve Bennett < >
  • To:
  • Subject: [chef] How to create services with the service resource?
  • Date: Thu, 16 Aug 2012 13:00:53 +1000

Hi,
  I naively assumed (and am not the only one:
http://lists.opscode.com/sympa/arc/chef/2012-05/msg00267.html) that
the service resource could be used to define, then run services:

...
    service "atom-dataset-provider" do
       start_command "/opt/atom-dataset-provider/current/provider.sh"
       stop_command "/opt/atom-dataset-provider/current/kill_provider.sh"
       action [:enable]
     end

   end
   restart_command do
     current_release = release_path
     service "atom-dataset-provider" do
       action [:restart]
     end
  end


But apparently it doesn't. In that case:
- what is the purpose of the "restart_command" etc parameters? How are
they used, if not to write to a script in init.d/?
- what's the purpose of "supports" parameter - what does Chef do with it?
- what's the best way to create services? Foreman? A template as
suggested in that thread?
- any plans to make the service resource do this?
- could the docs be made a bit more explicit? :)

Thanks,
Steve



Archive powered by MHonArc 2.6.16.

§