james
james

Reputation: 452

how to deploy changes with chef's deploy resource?

I've got another question at chef deployment? that is perhaps a little too broad in scope. so i'll ask a more specific question here:

how do i deploy code changes with chef's Deploy Resource after the server has been set up. perhaps i'm just used to my current capistrano workflow ("git push && cap deploy") ... but the best i can tell is that after i commit my changes i'm supposed to ssh into the server and run "sudo chef-client"? something about that feels wrong. is there no cap equivalent, i.e. "chef deploy"?

Upvotes: 2

Views: 785

Answers (1)

jtimberman
jtimberman

Reputation: 8258

If you're using a Chef Server, you can use knife ssh to search for a subset of nodes to SSH to and run Chef Client.

% knife ssh "role:my_app" "sudo chef-client"

You can also run Chef Client on an interval as a daemon, or a cron job. You may be interested in the chef-client and application cookbooks by Opscode for these topics.

Upvotes: 2

Related Questions