We run our own chef server and clients on several machines.
We use the deploy resource and a bunch of cookbooks to deploy
our apps when chef client runs. Before chef we used capistrano
and triggered the deployment ourselves with cap deploy, now it
happens automatically but it’s not instant (we can’t tell exactly
when a deploy happens, it’s “during the next chef run”).
I’ve added a Jabber notification which sends a IM when any of our 80
apps is getting deployed/finished deploying so it helps a bit but I’ve been
thinking of a way to trigger a chef run on a node
immediately afer we git push a change to the application code so that we
don’t have to wait.
I’m wondering if there’s any tool in Chef that we could use to combine
git push hooks ( on our git server ) with restarting the chef client (to trigger
a deployment) on a node. The only thing that comes to mind is writing
a custom service that runs on every chef client node and listens for
and is able to restart chef client. Then writing a post git push hook
on the git server
that sends the “restart” even to the particular node.
I’m wondering if the above sounds like a good approach or if there’s anything
else that we could use in this case.
Any info much appreciated.