[chef] Re: Possible to subscribe to Deploy Resource?


Chronological Thread 
  • From: Alex Soto < >
  • To:
  • Subject: [chef] Re: Possible to subscribe to Deploy Resource?
  • Date: Thu, 24 Jun 2010 11:12:13 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=pQKC60TFUlqFrzyBhqWwBlR76kRN70GBhxbbHEuBzbnAHUGUvHelKoe6KcjBqWQLXD uKzUohxpYCMgPvPS6LUy/Qn2fbH5HdgKyLinmCzx4g9FkTdMQhyPhybGmQNlvlXMW6U3 93ypeONUularfjcRYQCQn9BNgdY+KmaKxF9x8=

Here's an example 

execute "restart pollers" do
   command "monit -g messagebus restart"
   action :nothing
   subscribes :run, resources(:deploy => "/app/myapp")
end

On Jun 24, 2010, at 8:23 AM, Ruby Newbie wrote:

> Hello, all.
> 
> I am using Chef's "deploy_revision" Resource to deploy my application. I 
> also have some "runit_service" Resources that need to be restarted each 
> time my application deploys:
> 
> ============================
>  deploy_revision "/app/myapp" do
>      repo 
> " :mycompany/myapp.git"
>      ...
>  end
> 
>  runit_service "worker_process" do
>    ...
>    supports :restart => true
>    subscribes :restart, resources(:deploy_revision => "/app/myapp"), 
> :immediate
>  end
> ============================
> 
> Why does the above "subscribes" method not cause the service to restart 
> when the deploy_revision service fires, even when  force_deploy = true? Is 
> there a way to accomplish this with Chef 0.8.16?
> 
> Thanks,
> - RN
> 




Archive powered by MHonArc 2.6.16.

§