Possible to subscribe to Deploy Resource?

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 "git@github.com: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

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 "git@github.com: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