[chef] Re: app deployments w/ chef


Chronological Thread 
  • From: Lamont Granquist < >
  • To:
  • Subject: [chef] Re: app deployments w/ chef
  • Date: Thu, 10 Oct 2013 16:16:40 -0700


On 10/10/13 12:25 PM, Wes Morgan wrote:
It seems the main tension here is #1 requires Chef to be able to kick off a 
deploy to a single node, whereas #2 requires Chef to either never deploy code 
to nodes that already have some version of it (and thus require a separate 
manual process to do simultaneous, atomic upgrades) OR to kick off an 
orchestrated run across all nodes that need to be upgraded (which really 
isn't Chef's forte, AFAICT).

You can always do something like this for simple orchestration:

knife ssh 'role:foo_app' sudo chef-client -o 'role[foo_app]'

That'll login to every server that has role[foo_app] and run that role. As long as orthogonal stuff like user accounts and ntp and dns are in 'role[base]' which is applied seperately, then you only run the deployment for your foo_app code and whatever it depends upon. If its just one cookbook you need to run then you can do that as well, or you can use a role cookbook instead of a real role, etc (and if you have a mega-role that rolls up all your base cookbooks applied to your host then you probably have to use one of those approaches as well... there's more than one way to do it...)

AFAIK, pushy is just a better and more scalable way of doing this where you can require N hosts be up and M succeed and get back good reporting, etc and makes it easier to chain actions as long as the prior ones succeed... I don't see why you can't start with knife ssh and override run lists though...




Archive powered by MHonArc 2.6.16.

§